Transcoding on Linux still suck. The options are pretty much limited to ffmpeg, mencoder and transcode. Underneath it all boils down to libavcodec and all three are no more then different command line frontends. Surprisingly all are quite slow. But first thing first...
MPEG-2
According to this TMpgEnc beats both transcode backends (ffmpeg and mpeg2enc) head out. I observed the same
| Encode |
FPS |
VSIM |
PSNR |
Notes |
| TMpgEnc 2-pass VRB (D600 1.6GH) |
5.33 |
61.98 |
32.00 |
Could double the speed with single pass with similar results |
| mpeg2enc (P4 2.66GH) |
4.57 |
63.03 |
34.15 |
Results are way better with instructions from the bottom on this page |
| ffmpeg-9800 kbps (P4 2.66GH |
8.2 |
65.52 |
34.37 |
1st frame is horrible despite 9800kbps |
The first surprise uncovered with
MPEGanalizzatore was that instead of IPBBPBBPBBPBB GOP, Linux tools produced no B-frames. This could be fixed controlling GOP size and number of B-frames as described
here
Bigger surprise thought was that transcode was slow on Linux despite faster CPU (1.6*1.5=2.4 vs. 2.66). Moreover, on Windows mencoder clocked 29 fps, but PSNR was 10.75 and VSIM 7.15 and GOP size was 250 frames without B frames. This could be further investigated and probably tunned with some freak command line paramenters like this
mencoder -of mpeg -mpegopts format=dvd -nosound -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:keyint=18:vbitrate=6000:aspect=4/3 -o test.mpeg input.avi
But there is no point, since mencoder crash on both Windows and Linux (mencoder needs to be recompiled with libdv and up-to-date libavcodec) and Windows tools for MPEG-2 appears to be faster and result in better quality.
MPEG-4
FFMPEG/libavcodec could now output .mp4 and as a result all frontends should be able to produce .mp4 in one pass. But is it worth to mess with command line paramenters that are different from one tool to another, when on Windows with x264 the encoding is as easy as
"C:\Program Files\x264\x264.exe" --pass 1 --bitrate 1000 --stats ".stats" --bframes 2 --subme 1 --analyse none --me dia --progress --output NUL "N:\assets\03590578.avs"
"C:\Program Files\x264\x264.exe" --pass 2 --bitrate 1000 --stats ".stats" --bframes 2 --subme 6 --b-rdo --analyse p8x8,b8x8,i4x4,p4x4 --progress --output 1000-QT.mp4 "N:\assets\03590578.avs"