Requirement: Got a video that was encoded using HEVC, couldn’t play it on my device so have to convert it to mpeg4.
The tool ffmpeg was replaced in previous releases (Ubuntu 14.04 Trusty) by the avconv program from the libav project.
To install avconv you need to install the libav-tools package:
avconv is very similar to ffmpeg, but they also have some differences in syntax.
To see what codecs your tool supports use:
Result was the libav that comes with the repos does not support hevc. Tried installing the hevc decoder.
NOTE: The following does NOT work, it only installs the decoder it does not the necessary libraries:
Run avprobe again no hevc support so this only install the decoder hevc still not found so have to build libav
So we have to compile libav from source.
Download libav
Install necessary dependencies:
Commands for building libav
Problems met when buliding:
This means it still can not found x265 so we have to install x265.
Building x265
So libx265 is installed, before installing libav remember to remove the repos libav:
After building libav, Run avprobe to check everything is working
This means the libraries have been installed in the wrong location, copy them to /usr/lib:
Check that the codec is now available as decoder and encoder:
If you specify ‘aac’ as the audio encoder you might encounter the problem:
Use ‘copy’ to just copy the audio stream it is much easier.
If you have a video that is encoded in avc:
avprobe InputVideo.mkv
…
Format : AVC
Format/Info : Advanced Video Codec
…
Then you have to enable libx264.
avconv -codecs|grep h264
avconv version 11.6, Copyright (c) 2000-2014 the Libav developers
built on Mar 19 2016 17:33:32 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
D.V.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Here it shows it only has decoder no encoder.
./configure –enable-libx264 –enable-gpl
Once it is built and installed you can check for its availability
avconv -codecs | grep h264
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (encoders: libx264 )
If you want both hevc and avc for example: input codec is hevc, output format to be h264 then enable both
Some basic commands for transcoding:
My results show that h264 encoding is too slow stick with mpeg4.
I was using this wrapper around PWA(Progress Web Apps) APIs register-service-worker and was wondering how does it detect when there is a new build and the pa...
Comments