FFmpeg RTSP IP Camera 영상 저장
FFmpeg 2025. 3. 14. 14:50 |FFmpeg로 IP Camera에서 스트리밍 되는 영상을 저장해 보자.
ffmpeg -rtsp_transport tcp -i rtsp://admin:123456@192.168.0.56:554/stream1 -b:a 4k -t 10 -y output.mp4
-rtsp_transport = RTSP 전송 프로토콜 설정.
FFmpeg Protocols Documentation
-b:a = audio bitrate. 너무 높으면 아래와 같은 경고가 출력된다. audio sampling frequency(-ar)를 높이거나 bitrate(-b:a or -ab)를 낮춰야 한다.
[aac @ 000001b64b5b7c00] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
-t = duration
※ 참고
HikVision Camera RTSP with Authentication
rtsp://<username>:<password>@<IP address of device>:<RTSP port>/Streaming/channels/<channel number><stream number>
NOTE: <stream number> represents main stream (01), or the sub stream (02)
Example:
rtsp://192.168.0.100:554/Streaming/channels/101 – get the main stream of the 1st channel
rtsp://192.168.0.100:554/Streaming/channels/102 – get the sub stream of the 1st channel
https://butteryoon.github.io/dev/2019/04/10/using_ffmpeg.html
4.68 segment , stream-segment, ssegment 참고
'FFmpeg' 카테고리의 다른 글
FFmpeg Subtitles Encoding/Extracting 동영상 자막 인코딩/추출 (0) | 2025.03.07 |
---|