[FFmpeg-devel] Translating 1080i HD, from h264 to mpeg2-hd is buggy.

Michael Niedermayer michaelni
Fri Oct 2 12:00:24 CEST 2009


On Fri, Oct 02, 2009 at 12:34:37AM +0200, wallak at free.fr wrote:
> 
> I've tried to encode some HD streams to 1080i MPEG2-HD, with the following
> command, but that failed with bad video artifacts, using the last ffmpeg git
> release:
> 
> ffmpeg -i h264hd-test.ts -r 25 -vsync 2 -top 1 -fflags genpts -packetsize 2048
> -g 15 -qmin 1 -qmax 31 \
> -vcodec mpeg2video -vb 20000kb -minrate 800kb -maxrate 25000kb -bufsize
> $[(512)*8]kb -flags +ildct+ilme -bf 2    -acodec mp2  -ab 192kb -ar 48000 -ac 2
> \
> -f mpegts -y output--mpeg2hd.ts
> 
> After some tests, I found that, the conversion failed to work after the release 
> 19147 . When I apply the 19146 to 19147 release patch back,  I get a compliant
> MPEG2-HD output.

19147 contains 2 bugs
first, its wrong for h.264, h264 allows b frames without requireing a >=1
sized buffer, silly but it cant be helped, a != H264 check is needed in there
second, low_delay must be set to 0 when has_b_frames is set to 1 otherwise
variables are inconsistent
i dont know if these are the only 2 issues but as the condition would no
longer trigger for h264 they should fix this bug

patches fixing above are welcome

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091002/74e4859a/attachment.pgp>



More information about the ffmpeg-devel mailing list