No data passes through my mp4mux
Katerina Voulgary
katerina.voulgary at iccs.gr
Fri Dec 4 13:04:57 UTC 2020
Hello everyone,//
I want to mux one video stream (h264) and one audio stream (opus). My
pipelines (not the best) that produce the streams are from an rpi0:
gst-launch-1.0 -v v4l2src device=/dev/video1 !
video/x-h264,width=1440,height=1080,framerate=15/1 ! h264parse !
rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.1.2 port=8004
sync=false async=false
gst-launch-1.0 -v alsasrc ! audio/x-raw, channels=2, rate=8000,
depth=16, format="S16LE" ! queue ! opusenc audio-type=voice
bitrate=12000 bandwidth=narrowband frame-size=60 bitrate-type=vbr !
audio/x-opus, rate=8000, channels=2, channel-mapping-family=0 ! queue !
rtpopuspay pt=127 ! queue ! udpsink host=192.168.1.2 port=8002
sync=false async=false
In the receiving end my pipeline doesn't seem to roll (no Redistribute
latency... message) and it creates a 0 byte file.:
gst-launch-1.0 udpsrc port=8004 !
application/x-rtp,encoding-name=H264,payload=96 ! rtpjitterbuffer !
rtph264depay ! queue ! mp4mux name=mux ! filesink location="video.mp4"
udpsrc port=8002
caps="application/x-rtp,encodingcoding-params=2,media=audio,
clock-rate=48000,encoding-name="OPUS",payload=127" ! queue !
rtpopusdepay ! mux.
Data doesn't seem to pass through mp4mux. This pipeline produces no
significant output:
gst-launch-1.0 -v udpsrc port=8004
caps="application/x-rtp,encoding-name=H264,payload=96" ! rtpjitterbuffer
! rtph264depay ! queue ! mp4mux name=mux ! fakesink dump=true
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps =
application/x-rtp, encoding-name=(string)H264, payload=(int)96,
media=(string)video, clock-rate=(int)90000
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink:
caps = application/x-rtp, encoding-name=(string)H264,
payload=(int)96, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:src:
caps = application/x-rtp, encoding-name=(string)H264,
payload=(int)96, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink:
caps = application/x-rtp, encoding-name=(string)H264,
payload=(int)96, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src:
caps = video/x-h264, stream-format=(string)avc,
alignment=(string)au,
codec_data=(buffer)01640028ffe1001027640028ac2b402d0113f2c03c489a8001000528ee025cb0,
level=(string)4, profile=(string)high
While this pipeline gives the continuous hex output:
gst-launch-1.0 -v udpsrc port=8004
caps="application/x-rtp,encoding-name=H264,payload=96" ! rtpjitterbuffer
! rtph264depay ! queue ! fakesink dump=true
Also, this pipeline for audio with oggmux and its output:
gst-launch-1.0 -v udpsrc port=8002
caps="application/x-rtp,encoding-params=2,media=audio,
clock-rate=48000,encoding-name="OPUS",payload=127" ! queue !
rtpopusdepay ! oggmux ! fakesink dump=true
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps =
application/x-rtp, encoding-params=(int)2, media=(string)audio,
clock-rate=(int)48000, encoding-name=(string)OPUS, payload=(int)127
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps =
application/x-rtp, encoding-params=(int)2, media=(string)audio,
clock-rate=(int)48000, encoding-name=(string)OPUS, payload=(int)127
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
application/x-rtp, encoding-params=(int)2, media=(string)audio,
clock-rate=(int)48000, encoding-name=(string)OPUS, payload=(int)127
/GstPipeline:pipeline0/GstRTPOpusDepay:rtpopusdepay0.GstPad:src:
caps = audio/x-opus, channel-mapping-family=(int)0
/GstPipeline:pipeline0/GstOggMux:oggmux0.GstPad:audio_1941964111:
caps = audio/x-opus, channel-mapping-family=(int)0
/GstPipeline:pipeline0/GstRTPOpusDepay:rtpopusdepay0.GstPad:sink:
caps = application/x-rtp, encoding-params=(int)2,
media=(string)audio, clock-rate=(int)48000,
encoding-name=(string)OPUS, payload=(int)127
/GstPipeline:pipeline0/GstOggMux:oggmux0.GstPad:src: caps =
application/ogg, streamheader=(buffer)<
4f676753000200000000000000004f05c07300000000fe1a62aa014918e074ce494cf6782d85bdf3d7b01f9be4e5e7e2ea47bb64d2368aaf89e435872ebca27f5270821dffa9adb6c01ae98b63c9503a2a6ef1dea84e52d21f6f36c9e342eb52c5d63107b0
>
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
application/ogg, streamheader=(buffer)<
4f676753000200000000000000004f05c07300000000fe1a62aa014918e074ce494cf6782d85bdf3d7b01f9be4e5e7e2ea47bb64d2368aaf89e435872ebca27f5270821dffa9adb6c01ae98b63c9503a2a6ef1dea84e52d21f6f36c9e342eb52c5d63107b0
>
00000000 (0x7fd74400a090): 4f 67 67 53 00 02 00 00 00 00 00 00 00 00
4f 05 OggS..........O.
00000010 (0x7fd74400a0a0): c0 73 00 00 00 00 fe 1a 62 aa 01 49 18 e0
74 ce .s......b..I..t.
00000020 (0x7fd74400a0b0): 49 4c f6 78 2d 85 bd f3 d7 b0 1f 9b e4 e5
e7 e2 IL.x-...........
00000030 (0x7fd74400a0c0): ea 47 bb 64 d2 36 8a af 89 e4 35 87 2e bc
a2 7f .G.d.6....5.....
00000040 (0x7fd74400a0d0): 52 70 82 1d ff a9 ad b6 c0 1a e9 8b 63 c9
50 3a Rp..........c.P:
00000050 (0x7fd74400a0e0): 2a 6e f1 de a8 4e 52 d2 1f 6f 36 c9 e3 42
eb 52 *n...NR..o6..B.R
00000060 (0x7fd74400a0f0): c5 d6 31 07
b0 ..1..
But I have succefully oggmuxed video and beep with this pipeline, but of
sorter duration than I expected:
gst-launch-1.0 udpsrc port=8004 !
application/x-rtp,encoding-name=H264,payload=96 ! rtpjitterbuffer !
rtph264depay ! queue ! decodebin ! videoconvert ! queue ! videorate !
video/x-raw,framerate=15/1 ! queue ! theoraenc ! queue ! oggmux name=mux
! filesink location="video.ogg" udpsrc port=8002
caps="application/x-rtp,encoding-params=2,media=audio,
clock-rate=48000,encoding-name="OPUS",payload=127" ! queue !
rtpopusdepay ! opusdec ! audioconvert ! audioresample ! opusenc ! mux.
Also, decoding and re-encoding produces a valid, playable file:
gst-launch-1.0 -v udpsrc port=8002
caps="application/x-rtp,encoding-params=2,media=audio,
clock-rate=48000,encoding-name="OPUS",payload=127" ! queue !
rtpopusdepay ! opusdec ! audioconvert ! audioresample ! opusenc ! oggmux
! filesink location=audio.ogg
So, what is wrong with these pipelines and I can't write to .mp4?
I use Gstreamer 1.16.2, Ubuntu 20.04.1 LTS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201204/e787706d/attachment-0001.htm>
More information about the gstreamer-devel
mailing list