<div>Hello,</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>gst-launch filesrc location=... ! audio/mpeg, rate=\(int\)8000, channels=\(int\)2, mpegversion=\(int\)4 ! ffmux_mp4 ! filesink location=...</div>
<div> </div>
<div>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?</div>
<div> </div>
<div>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.</div>
<div> </div>
<div> buffer=gst_collect_pads_peek(ffmpegmux->collect, (GstCollectData *)collect_pad);</div>
<div> if(buffer){</div>
<div> st->codec->frame_size = st->codec->sample_rate * GST_BUFFER_DURATION(buffer)/GST_SECOND;</div>
<div> gst_buffer_unref(buffer);</div>
<div> }</div>
<div> </div>
<div>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?
</div>
<div> </div>
<div>Can anybody help with this much of info?</div>
<div> </div>
<div>Regards,</div>
<div>Deeptendu</div>