Replies: 2 comments
-
Hello, as written in the README, to re-encode it's enough to use the runOnPublish option, so to change fps to, for instance, 20: paths:
cam:
runOnInit: ffmpeg -f dshow -i video="AV TO USB2.0" -f rtsp rtsp://localhost:$RTSP_PORT/$RTSP_PATH
runOnInitRestart: yes
runOnPublish: ffmpeg -i rtsp://localhost:$RTSP_PORT/$RTSP_PATH -c:v libx264 -preset ultrafast -b:v 500k -max_muxing_queue_size 1024 -filter:v fps=fps=20 -f rtsp rtsp://localhost:$RTSP_PORT/newfps
runOnPublishRestart: yes HLS is also written in the readme; since the previous configuration writes the new stream to the /newfps path, you can convert to HLS after changing the framerate, with: paths:
newfps:
runOnPublish: ffmpeg -re -i rtsp://localhost:$RTSP_PORT/$RTSP_PATH -c copy -f hls -hls_time 1 -hls_list_size 3 -hls_flags delete_segments -hls_allow_cache 0 stream.m3u8
runOnPublishRestart: yes |
Beta Was this translation helpful? Give feedback.
-
Thank you for fast response..
and got error:
then instead of changing frame rate.. wanted to switch to hls directly.. and assumed.. instad of newfps I need to write it down in cam path. So new config seems like;
Now, output screen shows as;
and keeps on increasing.. |
Beta Was this translation helpful? Give feedback.
-
Which version are you using?
v0.12.2
Which operating system are you using?
Windows
Question
I am trying to stream a video from a video capture card.
paths:
cam:
runOnInit: ffmpeg -f dshow -i video="AV TO USB2.0" -f rtsp rtsp://localhost:$RTSP_PORT/$RTSP_PATH
runOnInitRestart: yes
command makes it work.
But I want to do two things.
First I want to change the frame rate of the streaming video.. it is default 30 frames..
Output #0, rtsp, to 'rtsp://localhost:8554/cam':
Metadata:
encoder : Lavf58.64.100
Stream #0:0: Video: mpeg4, yuv420p(tv, progressive), 720x480, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc
Metadata:
encoder : Lavc58.114.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame= 9585 fps= 30 q=31.0 size=N/A time=00:05:19.46 bitrate=N/A dup=1 drop=0 speed= 1x
Second, is it possible to change this stream to HLS on the fly and if yes how?
Beta Was this translation helpful? Give feedback.
All reactions