반응형

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 Stream

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://stackoverflow.com/questions/56423581/save-rtsp-stream-continuously-into-multi-mp4-files-with-specific-length-10-minu

https://butteryoon.github.io/dev/2019/04/10/using_ffmpeg.html

 

 

FFmpeg Formats Documentation

4.68 segment , stream-segment, ssegment 참고

 

반응형
Posted by J-sean
: