How to Upload HLS to YouTube RTMP Stream
from videotestsrc
, successfully works
STREAM_URL="rtmp://a.rtmp.youtube.com/live2/****"
gst-launch-1.0 \
videotestsrc is-live=1 \
! videoconvert \
! "video/x-raw, width=1280, height=720, framerate=25/1" \
! queue \
! x264enc bitrate=2000 byte-stream=false key-int-max=60 bframes=0 aud=true tune=zerolatency ! "video/x-h264,profile=main" \
! flvmux streamable=true name=mux \
! rtmpsink location="${STREAM_URL} app=live2" \
audiotestsrc \
! voaacenc bitrate=128000 \
! mux.
Failed: try HLS Streaming
# SOURCE_URL="https://b-87178fb5.kinesisvideo.ap-northeast-1.amazonaws.com/hls/v1/getHLSMasterPlaylist.m3u8?SessionToken=****"
gst-launch-1.0 -v \
souphttpsrc location=$SOURCE_URL \
! hlsdemux \
! decodebin \
! videoconvert \
! "video/x-raw, width=1280, height=720, framerate=25/1" \
! queue \
! x264enc bitrate=2000 byte-stream=false key-int-max=60 bframes=0 aud=true tune=zerolatency ! "video/x-h264,profile=main" \
! flvmux streamable=true name=mux \
! rtmpsink location="${STREAM_URL} app=live2" \
audiotestsrc \
! voaacenc bitrate=128000 \
! mux.
Error: no 'moov' atom within the first 10 MB