splitmuxsink 不使用 matroskademux 中的音频

问题描述 投票:0回答:1

我有一个以下管道,它结合了来自摄像机的视频和来自麦克风的音频,并产生两个输出:

gst-launch-1.0 -v libcamerasrc ! 'video/x-raw,width=1920,height=1080,framerate=30/1' ! v4l2convert ! clockoverlay time-format="%A | %d %B %Y | %H:%M:%S" ! v4l2h264enc extra-controls="controls, h264_profile=4, video_bitrate=2000000" ! 'video/x-h264,profile=high,level=(string)4' ! h264parse ! mux. \
alsasrc device=hw:1,0 ! queue ! audioconvert ! lamemp3enc ! mux. \
matroskamux name=mux ! tee name=t \
t. ! queue ! matroskademux ! splitmuxsink location="splitvideo-%02d.mkv" max-size-bytes=100000000 max-files=80 muxer=matroskamux \
t. ! queue ! filesink location=fullvideo.mkv

问题是

fullvideo.mkv
有音频,但
splitvideo-%02d.mkv
文件没有音频。这是为什么?似乎
matroskademux
应该提供
splitmuxsink
应该能够使用的适当上限,但它忽略了它们。

补充:

我也尝试以不同的方式实现这一目标:

gst-launch-1.0 -v libcamerasrc ! 'video/x-raw,width=1920,height=1080,framerate=30/1' ! v4l2convert ! clockoverlay time-format="%A | %d %B %Y | %H:%M:%S" ! v4l2h264enc extra-controls="controls, h264_profile=4, video_bitrate=2000000" ! 'video/x-h264,profile=high,level=(string)4' ! h264parse ! tee name=videoTee \
alsasrc device=hw:1,0 ! queue ! audioconvert ! lamemp3enc ! tee name=audioTee \
splitmuxsink location="%02d.mkv" max-size-bytes=100000000 max-files=80 muxer=matroskamux name=splitVideosMux \
matroskamux name=fullVideoMux ! filesink location=fullvideo.mkv \
audioTee. ! queue ! fullVideoMux. \
videoTee. ! queue ! fullVideoMux. \
audioTee. ! queue ! splitVideosMux. \
videoTee. ! queue ! splitVideosMux.

但由于某种原因,这最终以

WARNING: erroneous pipeline: could not link queue3 to splitVideosMux
结束。这似乎没有任何意义,因为它在简单地删除
queue
:

后就可以工作了
gst-launch-1.0 -v libcamerasrc ! 'video/x-raw,width=1920,height=1080,framerate=30/1' ! v4l2convert ! clockoverlay time-format="%A | %d %B %Y | %H:%M:%S" ! v4l2h264enc extra-controls="controls, h264_profile=4, video_bitrate=2000000" ! 'video/x-h264,profile=high,level=(string)4' ! h264parse ! tee name=videoTee \
alsasrc device=hw:1,0 ! queue ! audioconvert ! lamemp3enc ! tee name=audioTee \
splitmuxsink location="%02d.mkv" max-size-bytes=100000000 max-files=80 muxer=matroskamux name=splitVideosMux \
matroskamux name=fullVideoMux ! filesink location=fullvideo.mkv \
audioTee. ! queue ! fullVideoMux. \
videoTee. ! queue ! fullVideoMux. \
audioTee. ! splitVideosMux. \
videoTee. ! splitVideosMux.

^ 所以,这是我现在实际工作的解决方案,但它似乎有问题,因为发球台后面应该有队列。

splitmuxsink
发生了一些我不明白的事情。有人有什么想法吗?

audio gstreamer
1个回答
0
投票

在您的第一个管道中,您将建立从多路分配器到新多路复用器的一个连接。这将连接两者之间的第一个可用焊盘。那看来是视频了。建立另一个连接来连接第二个打击垫(音频)。

© www.soinside.com 2019 - 2024. All rights reserved.