Skip to content

Instantly share code, notes, and snippets.

@sfahadshahzad
Forked from trickkiste/config
Last active May 19, 2023 12:41
Show Gist options
  • Save sfahadshahzad/d54bacb809fcdd2720ab936aa0c7e1da to your computer and use it in GitHub Desktop.
Save sfahadshahzad/d54bacb809fcdd2720ab936aa0c7e1da to your computer and use it in GitHub Desktop.
obe_sd
#!/bin/bash
NAME=obe_sd
screen -d -m -S $NAME obecli
sleep 2
screen -p 0 -S $NAME -X stuff $'set input decklink\012'
screen -p 0 -S $NAME -X stuff $'set input opts card-idx=3\012'
screen -p 0 -S $NAME -X stuff $'set input opts video-format=pal\012'
screen -p 0 -S $NAME -X stuff $'probe input\012'
sleep 5
screen -p 0 -S $NAME -X stuff $'add stream 2:type=audio\012'
sleep 2
screen -p 0 -S $NAME -X stuff $'set stream opts 0:pid=1000,vbv-maxrate=1700,vbv-bufsize=1700,bitrate=1700,keyint=24,bframes=3,profile=high,level=4,format=avc,threads=2,aspect-ratio=16:9\012'
sleep 1
screen -p 0 -S $NAME -X stuff $'set stream opts 1:pid=1001,bitrate=64,format=aac,aac-profile=he-aac-v1,aac-encap=adts\012'
sleep 1
screen -p 0 -S $NAME -X stuff $'set stream opts 2:pid=1002,format=mp2,bitrate=128\012'
screen -p 0 -S $NAME -X stuff $'set muxer opts pmt-pid=100,ts-muxrate=2500000,ts-type=dvb\012'
screen -p 0 -S $NAME -X stuff $'set output udp\012'
screen -p 0 -S $NAME -X stuff $'set output opts target=udp://232.40.3.2:2000?ttl=20\012'
screen -p 0 -S $NAME -X stuff $'start\012'
Open Broadcast Encoder command line interface.
Version 0.1-beta
obecli> set input decklink
obecli> set input opts card-idx=3
obecli> set input opts video-format=pal
obecli> probe input
Probing device: Decklink card 3. Timeout 20 seconds
..
Detected input streams:
Input-stream-id: 0 - Video: RAW 720x576i 25/1fps
Input-stream-id: 1 - Audio: PCM 16 channels 48kHz
Encoder outputs:
Output-stream-id: 0 - Input-stream-id: 0 - Video: AVC
Output-stream-id: 1 - Input-stream-id: 1 - Audio: RAW - SDI audio pair: 1
obecli> add stream 2:type=audio
NOTE: output-stream-ids have CHANGED!
Encoder outputs:
Output-stream-id: 0 - Input-stream-id: 0 - Video: AVC
Output-stream-id: 1 - Input-stream-id: 1 - Audio: RAW - SDI audio pair: 1
Output-stream-id: 2 - Input-stream-id: 1 - Audio: RAW - SDI audio pair: 1
obecli> set stream opts 0:pid=1000,vbv-maxrate=1700,vbv-bufsize=1700,bitrate=1700,keyint=24,bframes=3,profile=high,level=4,format=avc,threads=2,aspect-ratio=16:9
obecli> set stream opts 1:pid=1001,bitrate=64,format=aac,aac-profile=he-aac-v1,aac-encap=adts
obecli> set stream opts 2:pid=1002,format=mp2,bitrate=128
obecli> set muxer opts pmt-pid=100,ts-muxrate=2500000,ts-type=dvb
obecli> set output udp
obecli> set output opts target=udp://232.40.3.2:2000?ttl=20
obecli> start
Encoding started
obecli>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment