I am running this command ffmpeg-git -y \ -vaapi_device /dev/dri/renderD128 \ -framerate 60 -i ./image.jpg \ -stream_loop -1 -i ./audio.mp3 \ -map 0:v \ -c:v h264_vaapi \ -vf 'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p' \ -rc_mode 2 -b:v 20M \ -c:v libx264 \ -map 1:a \ -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \ -af "dynaudnorm=f=150:g=15" \ -f flv /dev/null the encoding speed is very fast, typically 1.78x frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36 bitrate=11046.8kbits/s speed=1.79x Is there any way to limit this speed to a standard 1x?
On 01/25/2021 07:09 PM, owen s wrote:
I am running this command
ffmpeg-git -y \ -vaapi_device /dev/dri/renderD128 \ -framerate 60 -i ./image.jpg \ -stream_loop -1 -i ./audio.mp3 \ -map 0:v \ -c:v h264_vaapi \ -vf 'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p' \ -rc_mode 2 -b:v 20M \ -c:v libx264 \ -map 1:a \ -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \ -af "dynaudnorm=f=150:g=15" \ -f flv /dev/null
the encoding speed is very fast, typically 1.78x
frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36 bitrate=11046.8kbits/s speed=1.79x
Is there any way to limit this speed to a standard 1x?
With no guide to report formats you are understandably misinterpreting what ffmpeg is trying to tell you. The "speed=1.79x" means that the encoder time was 1.79x the running time. In other words, it took less time to encode than to play the video. To see the video's playback speed, look for lines that look like this: Output #0, matroska, to ...: Metadata: encoder : Lavf58.65.100 Stream #0:0, 0, 1/1000: Video: hevc, yuv420p(tv, progressive), 720x240 [SAR 8:9 DAR 8:3], q=2-31, 59.94 fps, 1k tbn -- Someone's sneaking in and turning up the range so that my food burns. I'm sure of it. And the older I get, the more sure of it I become.
I think it's the encoding speed that's causing the problem. Typically, encoding faster than real time would be a good problem to have but in this situation, when I stream this fast, it fills up the streaming platform buffer after some point the streaming platform gets too far behind and cuts the stream. This is why I would like to limit the speed to something closer to 1x. On Tue, Jan 26, 2021 at 9:48 AM Mark Filipak (ffmpeg) <markfilipak@bog.us> wrote:
On 01/25/2021 07:09 PM, owen s wrote:
I am running this command
ffmpeg-git -y \ -vaapi_device /dev/dri/renderD128 \ -framerate 60 -i ./image.jpg \ -stream_loop -1 -i ./audio.mp3 \ -map 0:v \ -c:v h264_vaapi \ -vf
'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p'
\ -rc_mode 2 -b:v 20M \ -c:v libx264 \ -map 1:a \ -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \ -af "dynaudnorm=f=150:g=15" \ -f flv /dev/null
the encoding speed is very fast, typically 1.78x
frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36 bitrate=11046.8kbits/s speed=1.79x
Is there any way to limit this speed to a standard 1x?
With no guide to report formats you are understandably misinterpreting what ffmpeg is trying to tell you. The "speed=1.79x" means that the encoder time was 1.79x the running time. In other words, it took less time to encode than to play the video. To see the video's playback speed, look for lines that look like this: Output #0, matroska, to ...: Metadata: encoder : Lavf58.65.100 Stream #0:0, 0, 1/1000: Video: hevc, yuv420p(tv, progressive), 720x240 [SAR 8:9 DAR 8:3], q=2-31, 59.94 fps, 1k tbn
-- Someone's sneaking in and turning up the range so that my food burns. I'm sure of it. And the older I get, the more sure of it I become. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Am 26.01.2021 um 01:09 schrieb owen s:
I am running this command
ffmpeg-git -y \ -vaapi_device /dev/dri/renderD128 \ -framerate 60 -i ./image.jpg \ -stream_loop -1 -i ./audio.mp3 \ -map 0:v \ -c:v h264_vaapi \ -vf 'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p' \ -rc_mode 2 -b:v 20M \ -c:v libx264 \ -map 1:a \ -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \ -af "dynaudnorm=f=150:g=15" \ -f flv /dev/null
the encoding speed is very fast, typically 1.78x
frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36 bitrate=11046.8kbits/s speed=1.79x
Is there any way to limit this speed to a standard 1x?
You could try the -re option. The documentation says it's not suitable for all types of input streams. I'm not sure if it works with your input. Michael
On Tue, 26 Jan 2021, 03:14 owen s, <owen94012@gmail.com> wrote:
I am running this command
ffmpeg-git -y \ -vaapi_device /dev/dri/renderD128 \ -framerate 60 -i ./image.jpg \ -stream_loop -1 -i ./audio.mp3 \ -map 0:v \ -c:v h264_vaapi \ -vf
'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p' \ -rc_mode 2 -b:v 20M \ -c:v libx264 \ -map 1:a \ -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \ -af "dynaudnorm=f=150:g=15" \ -f flv /dev/null
the encoding speed is very fast, typically 1.78x
frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36 bitrate=11046.8kbits/s speed=1.79x
Is there any way to limit this speed to a standard 1x? _______________________________________________
Add the realtime filter to your filter chain, right before crop. So you'd have -vf "realtime,crop..." etc
adding realtime before the crop filter dropped the bitrate and increased the encoding speed to 80x i moved the realtime t filter after hwdownload, but the speed was still about 1.78 I looked over the filter documentation: https://ffmpeg.org/ffmpeg-filters.html#realtime_002c-arealtime and noticed there's a speed or limit options; adding realtime=speed=1.04 keeps the speed at 1.04 and the problem is resolved. Thanks for the help! On Tue, Jan 26, 2021 at 4:47 PM Dennis Mungai <dmngaie@gmail.com> wrote:
On Tue, 26 Jan 2021, 03:14 owen s, <owen94012@gmail.com> wrote:
I am running this command
ffmpeg-git -y \ -vaapi_device /dev/dri/renderD128 \ -framerate 60 -i ./image.jpg \ -stream_loop -1 -i ./audio.mp3 \ -map 0:v \ -c:v h264_vaapi \ -vf
'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p'
\ -rc_mode 2 -b:v 20M \ -c:v libx264 \ -map 1:a \ -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \ -af "dynaudnorm=f=150:g=15" \ -f flv /dev/null
the encoding speed is very fast, typically 1.78x
frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36 bitrate=11046.8kbits/s speed=1.79x
Is there any way to limit this speed to a standard 1x? _______________________________________________
Add the realtime filter to your filter chain, right before crop. So you'd have -vf "realtime,crop..." etc
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
I am running this command [snip] Is there any way to limit this speed to a standard 1x?
Adding -re in the input stage of the command. ffmpeg -re -vaapi_device and so on. Cheers Alex
participants (5)
-
Alessandro Molon -
Dennis Mungai -
Mark Filipak (ffmpeg) -
Michael Koch -
owen s