Audio video mux

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Audio video mux

vaishnavi
Hi

I want to demux the audio and video,then mux it and play back again.
Its an mp4 file with h264 video and mpeg4-aac audio.
I have tried many pipelines but most of them give out only audio in the o/p file or the pipeline is erroneous.
Can you suggest me the correct pipeline to get both audio and video after muxing.

1.gst-launch filesrc location=vid.mp4 ! queue ! muxer. filesrc location=audio.mp4 ! queue ! muxer. qtmux name=muxer ! filesink location=av.mp4

ERROR: from element /GstPipeline:pipeline0/GstQTMux:muxer: Internal GStreamer error: negotiation problem.  Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
Additional debug info:
gstqtmux.c(1744): gst_qt_mux_add_buffer (): /GstPipeline:pipeline0/GstQTMux:muxer:
format wasn't negotiated before buffer flow on pad audio_01

2.
Output file contains only audio

gst-launch filesrc location=Videos/Waka\ Waka\ \(Official\ Video\)\ NEW.mp4 ! qtdemux name=demux demux.video_00 ! queue ! videoparse mux. demux.audio_00 ! queue ! qtmux name=mux ! filesink location= av.mp4 mux.

3. Only audio present in the o/p file

gst-launch filesrc location=Videos/Waka\ Waka\ \(Official\ Video\)\ NEW.mp4 ! qtdemux name=demux demux.video_00 ! queue ! videoparse mux. demux.audio_00 ! queue ! audio/mpeg ! qtmux name=mux ! filesink location=av.mp4

4.Adding audioparse/aacparse gives the following error

gst-launch filesrc location=Videos/Waka\ Waka\ \(Official\ Video\)\ NEW.mp4 ! qtdemux name=demux demux.video_00 ! queue ! videoparse ! qtmux name=mux demux.audio_00 ! queue ! audioparse mux. ! filesink location= av.mp4

ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(2959): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:demux:
streaming stopped, reason not-negotiated

Thank you