Dust Signs
13th January 2009, 07:57
Hi,
as I need to convert MPEG-2 to H.264 (video only, no audio) for a test scenario in the company I'm working for, I tried both using ffmpeg with --enable-libx264 as well as ffmpeg outputting raw video data to x264 over a pipe. Here are the commands I used:
./ffmpeg -y -deinterlace -itsoffset -600 -i /home/testuser/x264test/test/snippet.mpg -t 30 -vcodec libx264 -level 41 -b 2000000 -bf 3 -b_strategy 1 -qmax 51 -trellis 2 -refs 2 -b_strategy 1 -flags2 +bpyramid+dct8x8 -f rawvideo -an /home/testuser/x264test/test/test_direct.264
./ffmpeg -deinterlace -itsoffset -600 -i /home/testuser/x264test/test/snippet.mpg -t 30 -f rawvideo - | x264 -o /home/testuser/x264test/test/test.264 - 720x576 --bitrate 2000 --sar 4:3 --level 4.1 --trellis 2 -8 --b-pyramid --ref 2 --b-adapt 1 --progress
I used this page to get the corresponding ffmpeg/x264 options: http://ffmpeg.x264.googlepages.com/mapping
The problem now is that
* The ffmpeg with libx264 encode looks significantly worse compared to the other one
* There is a difference of about 100kBit/s between both encodes (which I assume can be at least reduced using the bit rate tolerance parameters, but this is not crucial at the moment)
* Using pipes, encoding is about 150% faster (6fps compared to 2,5fps using ffmpeg with libx264)
I compiled x264 and ffmpeg myself, using yesterday's sources of both. Did I miss anything in my configuration or are there any default values which I did not consider? Does anyone have any idea why there is such a discrepancy between the two approaches?
Dust Signs
PS.: I'm sorry that I can't post any samples as I'm not allowed to
as I need to convert MPEG-2 to H.264 (video only, no audio) for a test scenario in the company I'm working for, I tried both using ffmpeg with --enable-libx264 as well as ffmpeg outputting raw video data to x264 over a pipe. Here are the commands I used:
./ffmpeg -y -deinterlace -itsoffset -600 -i /home/testuser/x264test/test/snippet.mpg -t 30 -vcodec libx264 -level 41 -b 2000000 -bf 3 -b_strategy 1 -qmax 51 -trellis 2 -refs 2 -b_strategy 1 -flags2 +bpyramid+dct8x8 -f rawvideo -an /home/testuser/x264test/test/test_direct.264
./ffmpeg -deinterlace -itsoffset -600 -i /home/testuser/x264test/test/snippet.mpg -t 30 -f rawvideo - | x264 -o /home/testuser/x264test/test/test.264 - 720x576 --bitrate 2000 --sar 4:3 --level 4.1 --trellis 2 -8 --b-pyramid --ref 2 --b-adapt 1 --progress
I used this page to get the corresponding ffmpeg/x264 options: http://ffmpeg.x264.googlepages.com/mapping
The problem now is that
* The ffmpeg with libx264 encode looks significantly worse compared to the other one
* There is a difference of about 100kBit/s between both encodes (which I assume can be at least reduced using the bit rate tolerance parameters, but this is not crucial at the moment)
* Using pipes, encoding is about 150% faster (6fps compared to 2,5fps using ffmpeg with libx264)
I compiled x264 and ffmpeg myself, using yesterday's sources of both. Did I miss anything in my configuration or are there any default values which I did not consider? Does anyone have any idea why there is such a discrepancy between the two approaches?
Dust Signs
PS.: I'm sorry that I can't post any samples as I'm not allowed to