I saving video stream from camera to file using VLC like this:
cvlc -vvv rtsp://xxx.xxx.xxx.xxx/xxx --sout '#transcode{vcodec="h263"}:standart{mux="ts",access="file",dst="cam_XXX_hour_$(date +%H).ts"}'
So at the end of the day broadcast I expected to see a few files, like:
cam_XXX_hour_05.ts
cam_XXX_hour_06.ts
....
cam_XXX_hour_23.ts
cam_XXX_hour_24.ts
But it’s not. I’ve got one BIG file named by first hour while VLC start.
How can I get the desired result? Any BASH or VLC/VLM setting?
(I’m planning to port this script to VLM schedule)
Even if not by time, then by max file size..
Thanks.
P.S. Please, do not offer to split a large file at the end of the day.
I don’t find automatic solution for this problem, but got a key idea:
Create VLM config with start file:
new cam broadcast enabled
setup cam input rtsp://xxx:xxx@xxx.xxx.xxx.xxx:xxx/xxx
setup cam output #transcode{vcodec=”h264″}:std{mux=ts,dst=/xxx/FIRST_FILE}
control cam play
Change file via telnet interface (by cron or some script)
setup cam output #transcode{vcodec=”h264″}:std{mux=ts,dst=/xxx/SECOND_FILE}
control cam stop
control cam play
Two controls commands needed for update VLM config.