[Ffmpeg-devel] problem with ASF encoding?
Michael Niedermayer
michaelni
Tue Mar 20 01:36:44 CET 2007
Hi
On Mon, Mar 19, 2007 at 04:39:59PM -0700, Pascal Massimino wrote:
> Hi Michael, all,
>
> On 3/19/07, Michael Niedermayer <michaelni at gmx.at> wrote:
> >
> >Hi
> >
> >On Mon, Mar 19, 2007 at 09:13:00AM -0700, Pascal Massimino wrote:
> >> Hi everybody (long time! :))
> >>
> >> seems like asf-enc.c is currently generating WMVs unplayable with
> >> Windows Media Player (version 10.00.00.4036 here).
> >>
> >> for instance, with fresh svn from this morning, and using
> >> ftp://mplayerhq.hu/MPlayer/samples/FLV/zelda.flv as input (just a
> >random
> >> pick):
> >>
> >> ffmpeg -i zelda.flv -acodec mp3 -vcodec msmpeg4 -f asf -vtag MP43 -b 512
> >-ab
> >> 64 -y zelda.wmv
> >>
> >> Input #0, flv, from 'zelda.flv':
> >> Duration: 00:00:29.6, start: 0.000000, bitrate: N/A
> >> Stream #0.0: Video: flv, yuv420p, 160x120, 12.00 fps(r)
> >> Stream #0.1: Audio: adpcm_swf, 22050 Hz, mono
> >> Output #0, asf, to 'zelda.wmv':
> >> Stream #0.0: Video: msmpeg4, yuv420p, 160x120, q=2-31, 200 kb/s,
> >> 12.00fps(c)
> >> Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
> >> Stream mapping:
> >> Stream #0.0 -> #0.0
> >> Stream #0.1 -> #0.1
> >> Press [q] to stop encoding
> >> [msmpeg4 @ 0x85afb34]warning, clipping 1 dct coefficients to -127..127
> >> [msmpeg4 @ 0x85afb34]warning, clipping 1 dct coefficients to -127..127
> >> [msmpeg4 @ 0x85afb34]warning, clipping 1 dct coefficients to -127..127
> >> [msmpeg4 @ 0x85afb34]warning, clipping 1 dct coefficients to -127..127
> >> [msmpeg4 @ 0x85afb34]warning, clipping 1 dct coefficients to -127..127
> >> [msmpeg4 @ 0x85afb34]warning, clipping 1 dct coefficients to
> >-127..127s/s
> >> frame= 358 fps= 0 q=2.0 Lsize= 1kB time=29.7 bitrate= 0.2kbits
> >/s
> >> video:541kB audio:232kB global headers:0kB muxing overhead -99.928603%
> >>
> >> WMP says "Windows Media Player cannot play the file because it is
> >> corrupted."
> >> MPC cannot play it either ("Cannot render file"). Note that mplayer
> >decode
> >> this .wmv right.
> >>
> >> Now, it seems related to audio track, since changing to -acodec
> >> pcm_s16le, for instance,
> >> generates correctly playable bitstreams.
> >>
> >> Rolling back the svn revisions a little, I've tracked the problem a
> >> little to the /*ERROR correction*/ part, asf-enc.c:397
> >> If i remove all of the /*ERROR correction*/ part, set extra_size2 to 0
> >> instead of 8, and put back put_guid(pb, &video_conceal_none)
> >> instead of &audio_conceal_spred, i get files playable with WMP and
> >MPC.
> >> These were changed around rev 7960.
> >>
> >> Don't know if it's the correct spot to dig further, though.
> >
> >well sadly the new code is correct and the old is not for wma audio at
> >least,
> >i dont have any M$ generated mp3 in asf files to check ...
> >also the old code doesnt work correctly with many other players (like wmp
> >on
> >mac or embeded players)
> >all tips to improve the asf muxer are welcome ...
>
>
>
> an update: i overlooked the fact that -b and -ab are now expressed in
> bits/sec. Hence the bitrate settings were insanely low. Now, using some
> more reasonable values (-b 200000 -ab 64000, say), i get valid mp3-in-wmv
> bitstreams.
> Might be just hidding the bug. Or maybe ASF muxing is broken for extremely
> small packets (multi_payload case, maybe??)
might be, placing of audio packets in asf is tricky, for example it doesnt
work if audio packets are split while with video they can (and must as they
can be too large), the old code identified audio half as video and
the spliting also halfway worked ...
but all asf files i have use the audio_conceal_spred method of storing audio
and they also never contain split audio packets beyond that iam plain not
sure what is wrong, just that the asf files dont work well on some players
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070320/24413ad6/attachment.pgp>
More information about the ffmpeg-devel
mailing list