Contents

Video

On our website

Believe it or not, it is quite difficult to display a video which you host yourself (that is, not inheriting its display from somewhere else). That is, it is difficult if you want to do it well and clean (using only open source throughout and HTML5 protocol).

If you use. In our case, we currently use MediawikiPlayer which relies on longtail video, which is at least partly open source.

Extraction

To extract a segment from an mp4 between frames with timestamps 180.04 and 225 (timestamp is frame number / fps):

ffmpeg -ss 180.04 -to 225 -i lecture12-integrals.mp4 -c:v libx264 -c:a aac extracted-segment.mp4

Using -t instead of -to specifies a duration, not start-stop frames. See Stitching mp4 for a guided example.

Conversion

To convert avi to mp4:

ffmpeg -i input.avi -b:a 128k -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 output.mp4

https://superuser.com/questions/848584/convert-avi-file-to-mp4-in-linux

To convert mkv to mp4:

 ffmpeg -i input.mkv -codec copy output.mp4