我ffmpeg从命令行运行(Windows 7,64bit)从RTSP流(我的DVR的第二个频道)获取帧:
ffmpeg -i "rtsp://xxx.xxx.xxx.xxx:554/user=xxxx&password=xxxx&channel=2&stream=0.sdp" -rtsp_transport tcp -y video.jpg
Run Code Online (Sandbox Code Playgroud)
运行后,等待大约10秒然后我得到:
[rtsp @ 026fd840] UDP timeout, retrying with TCP
Run Code Online (Sandbox Code Playgroud)
经过另一个漫长的等待(2分钟左右),我得到:
[rtsp @ 028dd840] Could not find codec parameters for stream 0 (Video: h264): unspecified size
Run Code Online (Sandbox Code Playgroud)
我在某处读到了我必须强制使用TCP,因为从UDP更改为TCP将无法正常工作.
我不明白为什么-rtsp_transport tcp不工作.
我正在使用ffmpeg version N-62509-g97751e1 built on Apr 17 2014 22:01:31 with gcc 4.8.2 (GCC).
请帮我.谢谢.