Gstreamer T 恤到 HLS 和 Decklink

问题描述

我正在尝试将 HLS(外部)流传输到 Decklink,并使用 tee

生成一个 HLS(内部 - 作为 Decklink 预览)

然而:

#!/bin/bash
URL=http://sample.vodoBox.com/big_buck_bunny_4k/big_buck_bunny_4k.m3u8
OP="/videos/HLS"
gst-launch-1.0 \
       uridecodebin uri=$URL  name=dec sync=true \
      ! queue2 name=q2  max-size-time=0 max-size-bytes=0 max-size-buffers=1000 low-watermark=0.2 high-watermark=0.5 use-buffering=true \
      ! tee name=t \
      t. ! queue ! videoconvert ! videoscale ! videorate \
           !   x264enc cabac=false  key-int-max=50 quantizer=0  pass=0 speed-preset=ultrafast  tune=zerolatency bitrate=8000   byte-stream=true ! video/x-h264,width=1920,height=1080,pixel-aspect-ratio=1/1,framerate=25/1,format=RGBA,profile=constrained-baseline \
           ! mpegtsmux name=mux \
           ! queue \
           ! hlssink  async-handling=true name=output location=$OP/hlssink.%05d.ts playlist-location=$OP/out.m3u8  sync=true target-duration=5 playlist-length=20 max-files=20 name=h dec. \
           ! audioconvert \
           ! audiorate \
           ! audioresample \
           ! audio/x-raw,rate=44100,layout=interleaved,format=F32LE,channels=2 ! avenc_aac bitrate=128000 ac=2 \
           ! audio/mpeg \
           !  mux. \
        t.   \
           ! queue \
           ! video/x-raw \
           ! decodebin name=dec1 \
           ! audioconvert \
           ! audioresample \
           ! queue \
           ! decklinkaudiosink async=false \
           dec1. \
           ! queue \
           ! video/x-raw,height=1080 \
           ! videoconvert \
           ! videoscale \
           !  decklinkvideosink mode=1080p60 async=false sync=true \
        t. ! queue ! fakesink sync=true \
           

            
            




            

管道卡住了,如果我删除 fakesink 太快了。 有人有想法吗?

我的基本想法是使用 uridecodebin,用 tee 将其拆分。生产:

  1. 带有 hlssink 的 HLS 输出
  2. 移至decklink(音频/视频)
  3. 同步使用 fakesink - 保持 1 倍速度

带有 gst-play 的 decklink 工作正常:

gst-play-1.0 --videosink "decklinkvideosink device-number=0 mode=15" --audiosink="decklinkaudiosink device-number=0" $URL

所以我的decklink设置似乎没问题。使用上面的命令,我遇到了一个问题,我需要一个单独的视频来展示当前在甲板链接上看到的内容

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)