how to remove audio from live stream

Marc Marc at f1-outsourcing.eu
Wed Sep 15 09:05:20 UTC 2021


> 
> Well, it takes a bit of time to learn the tricks ;)

Yes, I was watching these quite helpfull videos yesterday
https://www.youtube.com/watch?v=OkOsm9FyzdM
https://youtu.be/ZphadMGufY8?t=2293
https://youtu.be/ZphadMGufY8?t=3530


> I would recommend looking into gst-shark, it is also a very useful debug
> tool.

Yes, I saw it indeed. I already asked them if it would be possible to use something like influx/prometheus to report to so it is easier and quicker to create graphs.


> From the CAPS you can see it is a mpegts stream and that tsdemux is
> used.
> 
> So you just need to do what you tried with qtdemux, but use tsdemux
> instead.
> 
> And if you have issues you can try adding a h264parse between tsdemux
> and the new muxer.
> 

I have written the output of this working pipeline to a file[1]

gst-launch-1.0 srtsrc uri=srt://:55556?mode=listener ! filesink location=out.raw -e

If I compare it with the output[2] of this pipeline that is not playing in vlc (only changing srtsink to filesink). It looks like it has been working all along. One can notice the audio track is gone. Strange thing is, if I download this file, I can play it vlc. So I do not really get why it is not streaming in vlc. 
I thought maybe it is related to not having an audio stream, so I added a 'fake' silent stream with gstreamer, but that one also does not stream in vlc.

gst-launch-1.0 srtsrc uri=srt://:55556?mode=listener ! tsdemux ! queue ! video/x-h264 ! h264parse ! mpegtsmux name=mux ! srtsink uri=srt://:33334



[2]
[@test2 /]# mediainfo out.raw
General
ID                                       : 1 (0x1)
Complete name                            : out.raw
Format                                   : MPEG-TS
File size                                : 8.29 MiB
Duration                                 : 32 s 65 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 167 kb/s
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID                                       : 65 (0x41)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive at L3
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 27
Duration                                 : 32 s 98 ms
Bit rate                                 : 2 048 kb/s
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 30.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:4:4
Bit depth                                : 10 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.222
Stream size                              : 7.88 MiB (95%)
Writing library                          : x264 core 157 r2980 34c06d1
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=4 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=cbr / mbtree=1 / bitrate=2048 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / vbv_maxrate=2048 / vbv_bufsize=1228 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Color range                              : Limited
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601


[1]
General
ID                                       : 1 (0x1)
Complete name                            : out.raw
Format                                   : MPEG-TS
File size                                : 1.96 MiB
Duration                                 : 7 s 133 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 281 kb/s
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID                                       : 65 (0x41)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive at L3
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 27
Duration                                 : 4 s 100 ms
Bit rate                                 : 2 072 kb/s
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 30.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:4:4
Bit depth                                : 10 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.225
Stream size                              : 1.01 MiB (52%)
Color range                              : Limited
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601

Audio
ID                                       : 66 (0x42)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : 129
Duration                                 : 7 s 140 ms
Bit rate mode                            : Constant
Bit rate                                 : 96.0 kb/s
Channel(s)                               : 1 channel
Channel layout                           : C
Sampling rate                            : 44.1 kHz
Frame rate                               : 28.711 FPS (1536 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -62 ms
Stream size                              : 83.7 KiB (4%)
Service kind                             : Complete Main


More information about the gstreamer-devel mailing list