Replies: 2 comments 1 reply
|
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 |
1 reply
|
Just for further reference, I was not able to use the command above. After some minor tweaking, this one worked for me: paths:
home_beach:
runOnDemand: >
bash -c 'ffmpeg -re -i "$(/usr/bin/yt-dlp -g --no-warnings https://www.youtube.com/watch?v=T5U_EzpjCJk)" -c:v libx264 -preset veryfast -tune zerolatency -rtsp_transport tcp -f rtsp rtsp://localhost:8554/home_beach'
runOnDemandRestart: yes |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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?
All reactions