fdsrc or filesrc with pipes/fifos odd behavior with mp4mux
Danilo Gasques Rodrigues
drodrigues at daitangroup.com
Thu Jul 17 07:08:22 PDT 2014
I forgot to say that I'm using Gstreamer 0.10 (and its python bindings).
Moreover, Today I implemented a version that makes use of appsrc (that can't seek) and got the very same results: audio is always fine, video works only if it's not mixed with audio.
Interestingly I have no problems when decoding VP8 pcaps.
From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Danilo Gasques Rodrigues
Sent: Wednesday, July 16, 2014 10:51 AM
To: gstreamer-devel at lists.freedesktop.org
Subject: fdsrc or filesrc with pipes/fifos odd behavior with mp4mux
Hello all,
I have a pipeline for reading two pcaps, decoding them and mixing them to a .mp4 file:
filesrc location=video.pcap ! pcapparse ! (**) ! ffenc_mpeg4 ! mux.
filesrc location=audio.pcap ! pcapparse ! (*)! audioconvert ! lamemp3enc ! mux.
mp4mux name=mux ! filesink location=output.mp4
(**) equals to " application/x-rtp, payload=96 ! rtph264depay ! video/x-h264 ! h264parse ! decodebin ! videoscale ! video/x-raw-yuv, width=640, height=480 "
(*) equals to application/x-rtp, payload=9, clock-rate=8000 ! rtpg722depay ! ffdec_g722
It works fine when video.pcap and audio.pcap are regular files.
Oddly enough, I have problems when the video input is a FIFO like this:
mkfifo video
cat video.pcap > video &
By using it, the output is a .mp4 with audio and video streams, but the video will never decode (mplayer doesn't play, vlc plays only the sound). I tried to use fdsrc with a pipe and I get the very same result.
Interestingly, I can use either filesrc with a fifo or fdsrc with a pipe for the audio and it just works.
Finally, if I'm to encode video alone it works perfectly fine with both methods of input.
Looking at gstreamer debug logs I couldn't spot any difference between using filesrc with a regular and filesrc with a fifo.
Does anyone have a hint of how could I solve this problem? I tried using queues after filesrc with no success at all!
I think it's somewhat related to the fact that one can't fseek a pipe/fifo, but I can't understand why it would work for the video alone but not when mixing audio and video.
Thanks in advance,
Danilo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140717/5fdbfd30/attachment.html>
More information about the gstreamer-devel
mailing list