Skip to content

Instantly share code, notes, and snippets.

@sfahadshahzad
Forked from max-verem/hls_to_sdi.sh
Created September 17, 2022 22:06
Show Gist options
  • Save sfahadshahzad/8427fd6e87d9aded2534af2676d4ea35 to your computer and use it in GitHub Desktop.
Save sfahadshahzad/8427fd6e87d9aded2534af2676d4ea35 to your computer and use it in GitHub Desktop.
hls to sdi
#!/bin/bash
ffmpeg \
-i "http://live.m2.tv:80/hls/stream.m3u8" \
-vf "scale=720:576,fps=fps=25,setdar=dar=16/9,format=pix_fmts=uyvy422" \
-af "aresample=48000" -ac 2 \
-f decklink -y "DeckLink Mini Monitor" \
-acodec copy -vcodec copy \
-f mpegts \
-y "udp://239.1.100.2:10480?localaddr=10.1.5.57&pkt_size=1316&fifo_size=1000000" \
-acodec copy -vcodec copy -f stream_segment \
-segment_time 60 \
-segment_format mpegts \
-segment_atclocktime 1 \
-strftime 1 \
-flush_packets 0 \
-y "/home/%Y-%m-%d_%H%M%S.ts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment