我已经创建了一个web服务器并托管了一个用于HLS流的AAC流,我可以使用以下命令在另一台机器上播放该文件
gst-launch-0.10 souphttpsrc location=http://xx.xx.xx.xx/prog_index.m3u8 ! hlsdemux ! decodebin2 ! alsasink但是当我这样做的时候
souphttpsrc location=http://xx.xx.xx.xx/prog_index.m3u8 ! hlsdemux ! aacparse ! faad ! alsasink我在hlsdemux日志中得到这个错误,并且没有音频输出,因为aacparse没有接收到任何数据
0:00:00.066165787 8139 0xb07098f0 INFO hlsdemux gsthlsdemux.c:734:gst_hls_demux_loop:<hlsdemux0> First fragments cached successfully
0:00:00.066190861 8139 0xb07098f0 DEBUG hlsdemux gsthlsdemux.c:680:switch_pads: Switching pads (oldpad:(nil))
0:00:00.066450610 8139 0xb07098f0 DEBUG hlsdemux gsthlsdemux.c:757:gst_hls_demux_loop:<hlsdemux0> Sending new-segment. segment start:0:00:00.000000000
0:00:00.066510536 8139 0xb07098f0 DEBUG hlsdemux gsthlsdemux.c:796:gst_hls_demux_loop:<hlsdemux0> error, stopping task
Pipeline is PREROLLED ...
0:00:00.066541057 8139 0xb07098f0 DEBUG hlsdemux gsthlsdemux.c:989:gst_hls_demux_stop_update:<hlsdemux0> Stopping updates thread我可以使用以下命令播放单个片段文件
gst-launch-0.10 filesrc location=fileSequence0.aac ! aacparse ! faad ! alsasink发布于 2012-10-23 15:00:02
尝试添加大写字母:... ! hlsdemux ! audio/mpeg ! aacparse ! ...
发布于 2013-06-20 14:48:34
尝试在hlsdemux和aacparse之间添加mpegtsdemux ...因为hlsdemux会在获得.ts流之前获取uri,所以需要mpegtsdemux才能对其进行解复用。
发布于 2016-06-22 21:53:22
这是HLS音频流的解决方案:
... m3u8 ! hlsdemux ! decodebin ! audioconvert ! autoaudiosink或者,如果您需要再次将其作为UDP进行流式传输:
... m3u8 ! hlsdemux ! decodebin ! audioconvert ! faac ! audio/mpeg, stream-format=raw ! aacparse ! mpegtsmux ! udpsink host=230.0.0.1 port=5000https://stackoverflow.com/questions/13024370
复制相似问题