[英]How can I get the resolution (width and height) for a video file from a linux command line?
[英]How can I record an rtsp video stream to a file from a linux command line?
我有一個網絡攝像頭,可通過默認的554端口提供rtsp流。
打開rtsp://192.168.1.7/1234時,可以使用VLC(GUI模式)完美地查看流
(“ 1234”是設備要在網址中要求的[默認]密碼,用於那些想限制對流的訪問的人)
我需要的是讓cli-only linux盒記錄流。
谷歌搜索了一下這個建議:
mplayer -noframedrop -dumpfile out.rm -dumpstream rtsp://192.168.1.7/1234
但是,這導致:
MPlayer UNKNOWN-4.2.1 (C) 2000-2009 MPlayer Team
141 audio & 304 video codecs
Playing rtsp://192.168.1.7:554/1234.
Resolving 192.168.1.7 for AF_INET6...
Couldn't resolve name for AF_INET6: 192.168.1.7
Connecting to server 192.168.1.7[192.168.1.7]: 554...
rtsp_session: unsupported RTSP server. Server type is 'unknown'.
Resolving 192.168.1.7 for AF_INET6...
Couldn't resolve name for AF_INET6: 192.168.1.7
Connecting to server 192.168.1.7[192.168.1.7]: 554...
http_read_response read 0 (i.e. EOF).
No stream found to handle url rtsp://192.168.1.7:554/1234
Exiting... (End of file)
我在Debian和OS X 10.6機器上都嘗試過。
有任何想法嗎?
謝謝!
我已經使用openRTSP來執行此任務。 它可以用於將音頻/視頻基本流轉儲到單獨的文件中,或者如果您具有兼容的編解碼器,則可以將其寫入mpeg4文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.