Replies: 1 comment
-
You're using the wrong hook - paths:
port_huron_michigan_usa:
runOnInit: >
ffmpeg -re -i "$(/usr/local/bin/yt-dlp -g -f bestvideo https://www.youtube.com/live/mVHTqCXsZB0)"
-c:v libx264 -preset veryfast -tune zerolatency -rtsp_transport tcp
-f rtsp rtsp://localhost:8554/port_huron_michigan_usa
runOnInitRestart: yes |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
I want to be able to pull a live youtube stream of a traffic camera and push it to a local rtsp server to do some testing on object rec, etc. I can do this via yt-dlp and ffmpeg from the command line:
fmpeg -re -i "$(yt-dlp -g -f bestvideo https://www.youtube.com/live/mVHTqCXsZB0)"
-c:v libx264 -preset veryfast -tune zerolatency -rtsp_transport tcp
-f rtsp rtsp://my.video.server:8554/livestream_PortHuronMichiganUS
but if i try to make that an entry in mediamtx:
port_huron_michigan_usa:
runOnReady: >
ffmpeg -re -i "$(/usr/local/bin/yt-dlp -g -f bestvideo https://www.youtube.com/live/mVHTqCXsZB0)"
-c:v libx264 -preset veryfast -tune zerolatency -rtsp_transport tcp
-f rtsp rtsp://my.video.server:8554/livestream_PortHuronMichiganUS
runOnReadyRestart: yes
it completely skips over the entry, not even fail. I'm guessing it can't "shell out" to run anything? If not, is there a way around it?
Beta Was this translation helpful? Give feedback.
All reactions