ffmpeg increase framerate

TobRein

New Member
Joined
Feb 10, 2021
Messages
1
Reaction score
0
Credits
28
Hello community,

I have a raspberry pi zero with the PI Cam NOIR.
I created with the v4l2loopback some video dummy devices.
I copy the original stream from video0 to video1 and video2 with the command
"ffmpeg -f video4linux2 -i /dev/video0 -codec copy -f v4l2 /dev/video1 -codec copy -f v4l2 /dev/video2"
and it works with 90 FPS.

Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 81313.441203, bitrate: 331776 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 331776 kb/s, 90 fps, 90 tbr, 1000k tbn, 1000k tbc
Output #0, video4linux2,v4l2, to '/dev/video1':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, q=2-31, 331776 kb/s, 90 fps, 90 tbr, 1000k tbn, 1000k tbc
Output #1, video4linux2,v4l2, to '/dev/video2':
Metadata:
encoder : Lavf58.20.100
Stream #1:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, q=2-31, 331776 kb/s, 90 fps, 90 tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:0 -> #1:0 (copy)
Press [q] to stop, [?] for help
frame= 1915 fps= 90 q=-1.0 q=-1.0 size=N/A time=00:00:21.53 bitrate=N/A speed=1.02x


But when I stream from video1 the frame rate decrease to poor 6 FPS with the command
ffmpeg -f video4linux2 -framerate 90 -i /dev/video1 -vcodec copy -an -f matroska -listen 1 http://:8080"
Here the output

Output von "ffmpeg -f video4linux2 -framerate 90 -i /dev/video1 -vcodec copy -an -f matroska -listen 1 http://:8080"

Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 81611.204607, bitrate: 331776 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 331776 kb/s, 90 fps, 90 tbr, 1000k tbn, 1000k tbc
Output #0, matroska, to 'http://:8080':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, q=2-31, 331776 kb/s, 90 fps, 90 tbr, 1k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 42 fps=6.2 q=-1.0 size= 18451kB time=00:00:11.99 bitrate=12597.3kbits/s speed=1.77x

how can I increase the framerate from video1 ?
Or is there a other software that works better ?
I only want to record and stream at the same time from video0 .

Best regards
Tob. Rein.
 


Since this is ffmpeg specific I would either ask it on the ffmpeg-user mailinglist or or their irc channel and otherwise look through their documentation. Since recording, converting and streaming video and sound isn't Linux specific but cross-platform I don't find the chances high here that someone will be able to answer your question since this a forum is mostly for GNU/Linux related topics.
 

Staff online

Members online


Latest posts

Top