As promised - I deliver you my tests and results:
Here's the link to 5sec HDV sequence considered as 'master':
http://www.prowokator.com/dehutiwebavi/compression_tests/test 5sec HDV.mov
As you'll soon discover it's a piece of footage which not very easy for any mpeg-4 encoder, as there's almost no static fields of image; so it's ideal for tests. Now when you play that sequence it looks good. You can discover mpeg2 artifacts but they appear due to bandwidth limit od HDV. The idea is to convert this footage to the 5mbps H264 file without loosing much of the quality. It's all in line with thr use scenario from
http://www.apple.com/quicktime/technologies/h264/
...which says:
Use Scenario Resolution & Frame Rate Example Data Rates
High Definition 1280x720, 24p 5-6 Mbps
Full High Definition 1920x1080, 24p 7-8 Mbps
So i took my 1080i HDV clip, I down converted it to 720p by performing adaptive deinterlace at the same time and as a result I got 720p uncompressed sequence, which in the next step - I tried to compress using H264 and x264 as you suggested.
Results:
QuickTime H264 compressor:
Video: http://www.prowokator.com/dehutiwebavi/compression_tests/h264 720p 9kbps.mov.video.mp4
PNG screenshot: http://www.prowokator.com/dehutiwebavi/compression_tests/h264 720p 9kbps.mov.video.png
ffmpeg x264 compressor:
Video: http://www.prowokator.com/dehutiweb...720pbrightness7contrast3 VBR15k.mov.video.mp4
PNG screenshot: http://www.prowokator.com/dehutiweb...720pbrightness7contrast3 VBR15k.mov.video.png
After those tests I realized, that:
- the quality of h264 compressed footage at the end is far worse than my HDv footage
- I'm nowhere near to the 5-6Mbps provided by specification, 9Mbps is almost acceptable, 13Mbps gives proper result .
- 1st conversion (with deinterlace)
HDV->Uncompressed can be replaced with
HDV->Pixlet(Best Quality) without noticeable difference at the end.
- x264 from ffmpeg has problems with brightness/contrast balance - it downgrades those parameters during the compression, therefore input material has to be adjusted by QuickTime filters using the key: brightness +7 contrast +3
- Be sure to check the PNG still images - they show how HDV-mpeg2 artifacts get's magnified during the compression to h264 in the dark areas of the picture.
- x264 is much muuuuch faster than QT h264. And yes - deinterlacing is most processor-intensive operation.
So perhaps what I try to do is impossible at the end, and you're not allowed to get low-data rates H264 by providing such poor quality input video HDV offers...