Command-line video encoding - workshop notes
Jaromil and Eleonora wrote a research about video streaming, commissioned by dutch media institute Montevideo.
It has not been published yet on the net, but Jaromil brought it, and it's licensed under GNU Free Documentation License.
jaromil explains that copy protection is a bad idea, and also a waste of time.
talking about streaming, there are two ways: on-demand and 'programmed' (live).
For programmed streaming, you can use Darwin Streaming Server (with MPEG4IP as encoder), or Icecast2 (using FFMPEG as encoder).
The research also talks about codecs, focussing on open-source codecs, and takes into account licensing/patenting issues. There are 2 open source codecs that are not discussed: Dirac (BBC) and Snow (ffmpeg related) because they're not ready.
The research is about Wide Area Network streaming, so streaming for the Internet. For LAN, one could also do MPEG2 streaming, but bandwidth limitations are a major concern for internet streaming.
MPEG-4 is patented proprietary technology
XviD is an open source "MPEG4-class". US patent regulations make it somehow tricky to distribute binary versions.
Player integration is problematic, plugins for players.
H.264 / AVC: very effective, can be downscaled to low bitrates, can also be used on mobile devices.
Theora: completely open source. results are comparable to MPEG-4, but it uses very different technology.
theora encoding is still slow, because there are not many optimised implementations (except MMX).
Theora is supported by various players, but there is also a java applet, 'cortado', that plays video from the web.
Only in Linux there is a problem with java applets. FreeBSD systems do have a Java environment installed.
Jaromil and Eleonora's research also has a codec benchmark table.
They found that for most artworks, a 1200kbps gives good results for PAL.
H264, using mencoder with x264, the encoder was the only one that was doing what it was supposed to do.
Theora is the best codec
For low bitrates, H264 is the only solution
- more control
- can be scripted
- can be configured using a text file
- settings can be searched, you don't have to click around
- it can be hard to find the exact command, with all the options and switches
- especially for video encoding, there are a lot of options to set.
a simple command to try transcoding, is using the programme 'convert' which is part of ImageMagick. It is installed on most linux systems.
#convert filename.xpm filename.jpg
converts the image filiename.xpm into the jpeg format.
Eleonora and Jaromil's research includes a script that was used to encode video's in various codecs using various bitrates, using mencoder and ffmpeg2theora.
This is great as a starting point to learn about buiding the correct command-lines to encode video.
mencoder is better than ffmpeg for encoding. ffmpeg is more a library with a lot of codecs.
related projects are:
FreeJ that can also do (live) streaming, with a lot of interaction control.
Dynabolic: linux distribution for multimedia by Jaromil, just released in 2.0 version.
The research PDF and the Dynabolic image will be uploaded to the local FTP server.
Links only valid during transmission, at Forte Prenestino:
Engage! Tactical Media http://www.engagetacticalmedia.org