Save screenshot from rtsp video
5,496
I just wan to wrap the correct @rogerdpack assumption in an answer, as I was stuck with the same problem and it helped.
You should specify the URL wrapped in quotes to get it work, as ffmpeg doesn't support switches for credentials specification and treats it as a invalid URL.
So just use like this:
ffmpeg -ss 2 -i "rtsp://ip:554/user=myUser&password=myPassword&channel=2&stream=0.sdp?real_stream--rtp-caching=100" -y -f image2 -qscale 0 -frames 1 /Users/User/Desktop/testFolder/sample.jpeg
Related videos on Youtube
![Matias](https://i.stack.imgur.com/vd6UN.png?s=256&g=1)
Author by
Matias
Updated on September 18, 2022Comments
-
Matias almost 2 years
I am executing the following sh.
#!/bin/sh export DATETIME=`date +%Y%m%d%H%M` export DATE=`date +%Y%m%d` export MONT=`date +%Y%m` mkdir -p /Users/User/Desktop/testFolder ffmpeg -ss 2 -i rtsp://ip:554/user=myUser&password=myPassword&channel=2&stream=0.sdp?real_stream--rtp-caching=100 -y -f image2 -qscale 0 -frames 1 /Users/User/Desktop/testFolder/sample.jpeg
However, I get the following error:
line 7: -y: command not found
And:
[rtsp @ 0x7fd55980da00] method DESCRIBE failed: 451 ERROR rtsp://ip:554/user=myUser: Server returned 4XX Client Error, but not one of 40{0,1,3,4}
What am I missing? I have ffmpeg installed with all options available.