fdsrc or filesrc with pipes/fifos odd behavior with mp4mux

Danilo Gasques Rodrigues drodrigues at daitangroup.com
Wed Jul 16 06:50:32 PDT 2014


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/20140716/803c4a9f/attachment.html>


More information about the gstreamer-devel mailing list