Muxing halts when no audio stream

Peter Biro pettair at gmail.com
Tue Mar 22 20:47:13 UTC 2022


Hi Nirbheek,

Thanks for the suggestion!

I started to change my implementation based on your suggestions, when I noticed a strange thing that I cannot understand.

It was enough to just add the the audiomixer into the pipeline and the halting issue not occurs anymore (I can stop the audio sending during recording or dont event start it and the video is recorded properly, without the sound of course)

This is how my pipeline looks now:

udpsrc multicast-group=<DCL_FILEWRITER_UDP_SOURCE_IP> auto-multicast=true port=<DCL_FILEWRITER_UDP_SOURCE_PORT>
        ! application/x-rtp,media=video,encoding-name=VP8,payload=96 ! rtpjitterbuffer ! rtpvp8depay ! tee name=video_stream_spilt
        udpsrc port=<DCL_FILEWRITER_UDP_AUDIO_SOURCE_PORT>
        ! application/x-rtp,media=audio,clock-rate=44100,encoding-name=L24,encoding-params=1,channels=1,payload=96,ssrc=687131883,timestamp-offset=3784732336,seqnum-offset=8272
        ! rtpL24depay ! audioconvert
        ! audiomixer name=audio_mixer
        ! audioresample ! queue name=file_sink_audio_queue ! voaacenc ! video_mux.
        video_stream_spilt. ! queue name=file_sink_video_queue ! omxvp8dec ! videoconvert ! omxh264enc bitrate=<DCL_RECORD_VIDEO_BITRATE> control-rate=2 insert-sps-pps=true ! matroskamux name=video_mux
        ! filesink name=file_sink location=<DCL_FILEWRITER_INITIAL_TEMP_FILE_NAME>
        video_stream_spilt. ! fakesink

The only thing I changed is the addition of audiomixer in between the audioconvert and the audioresample elements.

Can you think of any logical explanation for this? I mean since Im not aware of the internals I'm afraid that I dont see something and this simple "solution" has some drawbacks.

Bests,
Peter 

> On 2022. Mar 21., at 20:11, Nirbheek Chauhan <nirbheek.chauhan at gmail.com> wrote:
> 
> On Sat, Mar 19, 2022 at 9:15 PM Peter Biro via gstreamer-devel
> <gstreamer-devel at lists.freedesktop.org> wrote:
>> I want to improve the reliability by making the file writing continuous regardless if I have the audio or not (by making the audio is optional). I already tried to add an audio mixer which would mix a muted audio stream (audiotestsrc wave=silence) but that adds extra resource usage and I feel that its more like a workaround since the root cause is that the muxer is waiting for the audio stream.
>> 
> 
> This is actually the correct solution. You can eliminate most of the
> overhead by muting the audiomixer sinkpad on which silence is
> arriving.
> 
> I don't know if the matroska format supports GAP-like instructions for
> audio or video, but I would imagine it's unlikely.
> 
> Cheers,
> Nirbheek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220322/8b8b7f8d/attachment.htm>


More information about the gstreamer-devel mailing list