[Ffmpeg-devel] [PATCH] VP6 to flv muxing

Benjamin Larsson banan
Thu Jun 8 03:18:05 CEST 2006


Michael Niedermayer wrote:

>Hi
>
>On Thu, Jun 08, 2006 at 01:11:48AM +0200, Benjamin Larsson wrote:
>[...]
>  
>
>>-
>>-    put_be24(pb,size+1); // include flags
>>+    if (enc->codec_id == CODEC_ID_VP6)
>>+        put_be24(pb,size+2);
>>+    else
>>+        put_be24(pb,size+1); // include flags
>>     put_be24(pb,pkt->pts);
>>     put_be32(pb,flv->reserved);
>>     put_byte(pb,flags);
>>+    if (enc->codec_id == CODEC_ID_VP6)
>>+        put_byte(pb,0);
>>    
>>
>
>is this really supposed to be part of the muxer layer cant this be part
>of the codec layer?
>
>[...]
>
>  
>
You would think so, but this hack is needed to get VP6 in avi to VP6 in
flv muxing to work. What they did was altering the bitstream abit. VP6
in flv adds an extra byte in the start of the bitstream (cropping
parameters) and the picture is flipped. I realise now that VP6 in flv to
flv would be broken with this patch. Maybe a better solution would be to
define a new codec id for VP6 in flv(CODEC_ID_VP6FLV). And use that id
when muxing flv to flv and later decoding vp6 in flv. But in the end if
we want to mux to flv with mencoder or remux vp6 in avi something like
this is needed.

And btw the patch was broken, new attached. And it turned out that I
don't know mencoder internals, there is no need to encode to avi first.
One can do it all in one step:

mencoder file.avi -nosound -vf flip -ovc vfw -xvfwopts codec=vp6vfw.dll
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -of lavf
-o out.flv

MvH
Benjamin Larsson

-- 
"incorrect information" is an oxymoron. Information is, by definition, factual, correct.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vp6inflv.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060608/b527e6ba/attachment.txt>



More information about the ffmpeg-devel mailing list