How to solve problems with FFmpeg and HTML5 formats

Editions: Light,Community, Professional, Enterprise, Ultimate, Corporate
Versions: all

Even if you installed FFmpeg according to instructions, it can sometimes happen that videos cannot be transcoded into one or several HTML5 formats.

Normally it concerns individual videos, but the uploader interprets it as if no video at all could be transcoded.

The transcoding logfile (log/framework.convert.log) may only give insufficient information in those cases.

So we need the direct output from FFmpeg, which contains detailed information about the transcoding task.

In the following, we'll first find out where the source video file is located in ViMP, then we will transcode it manually to the formats .m4v, .ogv and .webm.

Point your browser to the ViMP backend (Administration -> Media) and click the title of the video with status "error".

What we need is the key (in our example cb05ec1291cbe64b31ab6195d262c108).

Next, connect to your webserver via SSH and change to the ViMP installation folder. Now search for the complete ViMP name of the source file:

#> cd /path/to/ViMPinstallation/
#> find ./web/images/source/ -name cb05ec1291cbe64b31ab6195d262c108*
Example output:
 ./web/images/source/cb05ec1291cbe64b31ab6195d262c108_1346341584.mp4 #>

In our example you receive the path and name of the original source video:
./web/images/source/cb05ec1291cbe64b31ab6195d262c108_1346341584.mp4

Next, create a tmp folder where we save the manually transcoded videos:

#> mkdir tmp

Depending on the format that couldn't be transcoded, execute one of the following commands.

It is important to enter the complete path to FFmpeg here (e.g. /usr/bin/ffmpeg or /usr/local/bin/ffmpeg)!

.m4v

/usr/bin/ffmpeg -i ./web/images/source/cb05ec1291cbe64b31ab6195d262c108_1346341584.mp4 -b 800k -vcodec libx264 -vpre slow -vpre ipod640 -acodec libfaac -ar 22050 -ab 56k -g 30 -f mp4 -s 640x360 -y ./tmp/video.m4v

.ogv

/usr/bin/ffmpeg -i ./web/images/source/cb05ec1291cbe64b31ab6195d262c108_1346341584.mp4 -b 800k -vcodec libtheora -acodec libvorbis -ar 22050 -ab 56k -g 30 -f ogg -s 640x360 -y ./tmp/video-ogv.ogv

.webm

/usr/bin/ffmpeg -i ./web/images/source/cb05ec1291cbe64b31ab6195d262c108_1346341584.mp4 -b 800k -vcodec libvpx -acodec libvorbis -ar 22050 -ab 56k -g 30 -f webm -s 640x360 -y ./tmp/video-webm.webm

With these commands you receive the direct output of FFmpeg with helpful information about the transcoding error.

Important:
FFmpeg is an open source software that neither is delivered with ViMP nor can be supported by us. But of course we try to answer your questions in our forum within our possibilities.

Last update on 2017/07/06 by Admin.

Go back