[gst-devel] ffmux_mp4 (gst-ffmpeg- CVS version) not correctly muxing AAC file to MP4

Ronald S. Bultje rbultje at ronald.bitfreak.net
Sat Nov 4 17:01:58 CET 2006

Hi Deeptendu,

I've received this question from numerous people, the ffmux_mp4 is  
broken, I don't know why, I'm suspecting tat the protocol wrapper is  
somehow broken, most likely some seeking problem (messing up cur/set,  
not setting return value correctly or so). You could try the 0.8  
version, which is known to work fine (packages for most distributions  
should still be available), or file a bug (http:// 
bugzilla.gnome.org/) and hope that someone will fix it. I'm not  
interested in fixing it.


On Nov 3, 2006, at 10:20 PM, Deeptendu Bikash wrote:

> Hello,
> I am using the latest CVS version of gst-ffmpeg to mux raw AAC  
> files into MP4 format, but there seems to be some problem with the  
> duration.
> gst-launch filesrc location=... ! audio/mpeg, rate=\(int\)8000,  
> channels=\(int\)2, mpegversion=\(int\)4 ! ffmux_mp4 ! filesink  
> location=...
> The resulting file has the MP4 file format but has a huge duration  
> (8000 hours etc) and a zero bitrate. And of course, no player,  
> including VLC, could play it. Any suggestions on how to fix this?
> Looking at the code (gstffmpegmux.c), the portion that sets the  
> framerate for audio, looks to incomplete/incorrect. There is a  
> comment saying that this might not work for any kind of audio.
>     buffer=gst_collect_pads_peek(ffmpegmux->collect,  
> (GstCollectData *)collect_pad);
>     if(buffer){
>         st->codec->frame_size = st->codec->sample_rate *  
>         gst_buffer_unref(buffer);
>     }
> When I print the values of st->codec->frame_size, st->codec- 
> >sample_rate and GST_BUFFER_DURATION(buffer)/GST_SECOND, I get the  
> values 1266874889, 8000 and 1266874889. Evidently, the buffer  
> duration is wrong. How can I correct it?
> Can anybody help with this much of info?
> Regards,
> Deeptendu

More information about the gstreamer-devel mailing list