Adding Preview Audio & Video files -March 2025

Introduction

jDownloads supports adding either an audio or video file into a Download. Typically video files also have a sound track  Typically these are shown in the Downloads and the Download Details views as controlled by the relevant layout.

Further you may add a preview file, which is generally a short version of the downloadable file.  If you do not add a preview file then jDownloads will use the main downloadable file as the preview.

If you require visitors to have login accounts on your site, to pay for the file or similar in a Download please note that these requirements are easily circumvented for both audio and video file download. If you show a full sized audio or video please note that most browsers will be able download what is showing. There is no known and reliable way of inhibiting that ability in browsers

So we would strongly recommend that you create a short preview as a separate file.  There is a note at the bottom of this article on a  simple ways to make a preview file using web based services. That is your Downloads will have two different files, one as a short previw and the other as the enire audio or vdeo file.
Typical examples of audio and video preview files are show opposite.

The Audio preview file may be shown as a simple control bar, or if an mp3 file optionally also with additional details.

preview01 preview02
Either type of preview is shown by including the place holder variable {preview_player} in the layout. The extra information in an MP3 audio file requires an {mp3_id3_tag} in the layout. It has no effect if it is not mp3 type.

Most of the standard layouts already have the {preview_player} in place. This just shows the location and name of the relevantpreview file.

Options Settings

To access the settings click on V4 button components, then on  V4 button jDownloads. Next  click on V4 button control panel blue. Then at top right click on  V4 button options This opens up a set of tabs. so click on theV4 tab mediaplayer tab.


The first thing is to decide if the audio and video support is to be through HTML5 elements or by using the Flowplayer addon.  That is set either  'Use HTLM5 Eelements' or 'Activate Flow Payer' to Yes.

The Video width and height options are set as maximum values. jDownloads will use the appropriate one so that the actual aspect ratio is maintained.

As usual if the first option is set to No then the other four options are hidden.

V4 use HTML media player

The other part that may need setting is the MP3 details mini layout.

This is also in the V4 button optionsV4 tab mediaplayer tab.  In most cases no change is required.


preview17

User Groups settings

It is also essential to set up the appropriate setting in those User Groups allowed to create and edit Downloads in the Front End.
In the  V4 button user group settingsV4 tab group creation edit tab set the Allowed File types and the allowed Preview File Types.

jDownloads supports mp3, wav, wma and oga audio files and mp4, webm, ogv and ogg video files.

Also in the V4 tab files sectionin the 'tick box' section ensure you set the preview tick box.
V4 tickbox preview
preview10

Here we show adding in the Front End, adding in the backend is very similar.

The Files tab in the Create/Edit form is the place where the preview is added as illustrated opposite.

The 'Allowed Preview File Types' of preview file and the permitted 'Maximum Upload Size in kB' needs to be set for each User Group that has permission to create or edit a Download.

One could also allow ogg types which are assumed as video.

preview03
Note: According to Wikipedia, https://en.wikipedia.org/wiki/HTML5_video (opens in new window/tab), MP4 is the regular H264 version seems to be supported in all browsers.

Making a Preview

There are numerous applications for audio and video editting that you can download to you device.  These generally comprehensive features so there could be a 'learning curve' challenge.  So if you are just wanting to make a short preview clip for a few file files or to only make previews occaisionally then perhaps a web based service might be a solution.  The limiting factor here is the upload time for the original file, particularly videos as they tend to be large!

For audio previews a simple effective and free service is at https://audiotrimmer.com (opens in new window/tab)
Similarly for videos https://online-video-cutter.com/ (opens in a new window/tab)

ColinM July 2019 modified June 2023, March 2025

Print Email

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.