[gst-devel] Does ffmux_mov support muxing both audio and video?

Deeptendu Bikash dbikash at gmail.com
Thu Nov 9 06:16:00 CET 2006

Hi Ronald,

I added the following line to gstffmpegenc.c on your advice:
ffmpegenc->context->flags |= CODEC_FLAG_GLOBAL_HEADER;

Have I done what you meant?

I also changed the caps of mp4 to accept audio/AMR. After I encode with
ffenc_mpeg4 and amrnbenc, and mux is, the output file behaviour is as

Muxer: ffmux_mp4. When I play using gst-launch playbin, I get the audio but
not the video. When I play in VLC player, I get the video but not the audio
(thats maybe because VLC player does not support AMR?). When I play using
quicktime, I get Error -2010: The input file contains some invalid data.
When I open using mp4UI, it is able to detect it as a valid mp4 file with an
audio and a video track, of which it recognizes the video track to be of
MPEG-4 Video but cannot recognize the auido format (maybe it does not know
about AMR).

Muxer: ffmux_mov. With gst-launch playbin and VLC player, the output is the
same as above. When I play using quicktime, a screen of the same size as the
video opens up, but there is no video; I do get to hear the audio, however.
And of course, mp4UI cannot open the mov file because it is not exactly a
mp4 file.

Any idea of what's happening? I'm totally confused.

And yes, players that are able to open the above files show the duration of
the audio as 2 mins 54 secs and video as 3 secs, which is correct.

On 11/8/06, Ronald S. Bultje <rbultje at ronald.bitfreak.net> wrote:
> On Wed, 2006-11-08 at 06:23 -0800, Deeptendu Bikash wrote:
> > I found out that my pipeline was actually muxing both audio and video,
> > despite gstreamer giving that error. Also gstreamer playbin itself was
> not
> > capable of playing the movie. VLC player could play it, though it got
> the
> > duration wrong. Quicktime could not play it. So I guess it again boils
> down
> > to the bug/s in ffmpeg regarding handling audio duration which we
> discussed
> > in another mail thread. So let me start looking into it.
> You need to set the global header flag in the AVCodecContext of
> ffenc_mpeg4 for Quicktime to play it back. Without it, ffmpeg doesn't
> write the esds atom, which makes the MPEG-4 stream embeddable in .avi,
> for example (e.g. divx). However, Quicktime doesn't eat MPEG-4 without
> global headers (esds atoms).
> You can autodetect this by seeing whether the caps of the output video
> (in ffenc_mpeg4) is video/x-divx or video/mpeg,mpegversion=4. With that
> flag set, Quicktime will be able to play back the resulting stream also
> (I confirmed this with the 0.8 version, it shouldn't differ nowadays in
> 0.10).
> Ronald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20061109/51067ad6/attachment.htm>

More information about the gstreamer-devel mailing list