Discussion:
[FFmpeg-user] GPU speed increase
Joshua Grauman
2018-11-17 19:02:17 UTC
Permalink
Hi all,

I am looking at getting a new laptop and was wondering if getting a GPU
will increase ffmpeg speed. I am thinking of getting a laptop with a
Nvidia Geforce MX150 and I'm wondering if that will speed up the following
command:

shm is a program that outputs video frames for ffmpeg to encode:

shm | ffmpeg -f rawvideo -pixel_format bgra -video_size 1920x1080 -framerate 24 -i - -vcodec utvideo vid.avi

Also, how would I figure out of the GPU would speed up the following
command with lots of complex filters?

ffmpeg -y -ss 78 -i "Video1.MTS" -ss 78 -i "Video1.wav" -loop 1 -i
logo.png -ss 0.9 -i vidpipe -i Intro.mp4 -c:a aac -filter_complex
"[0:0]curves=master='0/0 0.04/0 1/1'[out1];
[out1]fade=t=in:st=0:n=24[out2];
[4:v][4:a][out2][1:0] concat=n=2:v=1:a=1[out3][aud1];
[2:0]fade=t=in:st=5.1:n=24[logo];
[out3][logo]overlay=10:main_h-overlay_h-10:format=rgb[out4];
[out4]drawtext=fontfile=Montserrat-Medium.ttf:text=Josh:fontsize=50:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=210:y=(h-text_h-110),
drawtext=fontfile=Montserrat-Light.ttf:text=Test:fontsize=50:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=210:y=(h-text_h-45)[out5];
[3:0]colorkey=0x000000:0.01:0.9[ovl1]; [ovl1]fade=t=in:st=5.1:n=24[ovl2];
[ovl2]drawbox=0:0:1920:44:color=0x000000ff:t=fill:replace=1:enable='gt(t,5.1)'[ovl3];
[out5][ovl3]overlay=format=rgb:enable='gt(t,5.1)'[out6];
[out6]drawtext=fontfile=GentiumPlus-R.ttf:text=Test2:fontsize=24:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=7:y=7,
drawtext=fontfile=GentiumPlus-R.ttf:text=Test:fontsize=24:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=(w-text_w-7):y=7[out7];
[out7]fade=t=out:st=1128.1:n=24[out8]; aevalsrc=0:d=5[sil];
color=black:1920x1080:d=5[blk]; [out8]trim=duration=1129.1[trimv];
[aud1]atrim=duration=1129.1[trima];
[trimv][trima][blk][sil]concat=n=2:v=1:a=1[out9][aud2]" -strict
experimental -shortest -map [out9] -map [aud2] -t 1134.1 "Video1.mp4"

Josh
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsu
Carl Eugen Hoyos
2018-11-18 02:30:24 UTC
Permalink
Post by Joshua Grauman
I am looking at getting a new laptop and was wondering if
getting a GPU will increase ffmpeg speed.
Definitely not when encoding utvideo.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "uns
Dennis Mungai
2018-11-18 08:58:28 UTC
Permalink
A few observations:

The MX150 does not support NVENC, meaning that any NVENC-based hwaccels are
out of the window.
However, that same laptop is most likely to have Optimus, giving you access
to the Intel's Integrated graphics platform from which you can use either
QSV or VAAPI for hwaccel (filters and encoders), with OpenCL also in the
mix.

However, in the command you posted, you'll see no benefit whatsoever from
hwaccel based on the filters you're using.
Post by Joshua Grauman
Hi all,
I am looking at getting a new laptop and was wondering if getting a GPU
will increase ffmpeg speed. I am thinking of getting a laptop with a
Nvidia Geforce MX150 and I'm wondering if that will speed up the following
shm | ffmpeg -f rawvideo -pixel_format bgra -video_size 1920x1080
-framerate 24 -i - -vcodec utvideo vid.avi
Also, how would I figure out of the GPU would speed up the following
command with lots of complex filters?
ffmpeg -y -ss 78 -i "Video1.MTS" -ss 78 -i "Video1.wav" -loop 1 -i
logo.png -ss 0.9 -i vidpipe -i Intro.mp4 -c:a aac -filter_complex
"[0:0]curves=master='0/0 0.04/0 1/1'[out1];
[out1]fade=t=in:st=0:n=24[out2];
[4:v][4:a][out2][1:0] concat=n=2:v=1:a=1[out3][aud1];
[2:0]fade=t=in:st=5.1:n=24[logo];
[out3][logo]overlay=10:main_h-overlay_h-10:format=rgb[out4];
[out4]drawtext=fontfile=Montserrat-Medium.ttf:text=Josh:fontsize=50:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=210:y=(h-text_h-110),
drawtext=fontfile=Montserrat-Light.ttf:text=Test:fontsize=50:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=210:y=(h-text_h-45)[out5];
[3:0]colorkey=0x000000:0.01:0.9[ovl1]; [ovl1]fade=t=in:st=5.1:n=24[ovl2];
[ovl2]drawbox=0:0:1920:44:color=0x000000ff:t=fill:replace=1:enable='gt(t,5.1)'[ovl3];
[out5][ovl3]overlay=format=rgb:enable='gt(t,5.1)'[out6];
[out6]drawtext=fontfile=GentiumPlus-R.ttf:text=Test2:fontsize=24:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=7:y=7,
drawtext=fontfile=GentiumPlus-R.ttf:text=Test:fontsize=24:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=(w-text_w-7):y=7[out7];
[out7]fade=t=out:st=1128.1:n=24[out8]; aevalsrc=0:d=5[sil];
color=black:1920x1080:d=5[blk]; [out8]trim=duration=1129.1[trimv];
[aud1]atrim=duration=1129.1[trima];
[trimv][trima][blk][sil]concat=n=2:v=1:a=1[out9][aud2]" -strict
experimental -shortest -map [out9] -map [aud2] -t 1134.1 "Video1.mp4"
Josh
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsubscrib
Bo Zhou
2018-11-19 03:24:14 UTC
Permalink
You can get more information here.

https://developer.nvidia.com/nvidia-video-codec-sdk

NVIDIA GPU works with the GPU newer than Kepler, MX150 is too old to
support NVENC, the only way is DXVA.

NVIDIA VideoCodec only supports MPEG1/2 H.264, HEVC and VP9, also the
ffmpeg must be built with the NVENC support.

Also it only supports the color layout in NV12 means YUV420 for H264 and
HEVC and VP9.
Post by Dennis Mungai
The MX150 does not support NVENC, meaning that any NVENC-based hwaccels are
out of the window.
However, that same laptop is most likely to have Optimus, giving you access
to the Intel's Integrated graphics platform from which you can use either
QSV or VAAPI for hwaccel (filters and encoders), with OpenCL also in the
mix.
However, in the command you posted, you'll see no benefit whatsoever from
hwaccel based on the filters you're using.
Post by Joshua Grauman
Hi all,
I am looking at getting a new laptop and was wondering if getting a GPU
will increase ffmpeg speed. I am thinking of getting a laptop with a
Nvidia Geforce MX150 and I'm wondering if that will speed up the
following
Post by Joshua Grauman
shm | ffmpeg -f rawvideo -pixel_format bgra -video_size 1920x1080
-framerate 24 -i - -vcodec utvideo vid.avi
Also, how would I figure out of the GPU would speed up the following
command with lots of complex filters?
ffmpeg -y -ss 78 -i "Video1.MTS" -ss 78 -i "Video1.wav" -loop 1 -i
logo.png -ss 0.9 -i vidpipe -i Intro.mp4 -c:a aac -filter_complex
"[0:0]curves=master='0/0 0.04/0 1/1'[out1];
[out1]fade=t=in:st=0:n=24[out2];
[4:v][4:a][out2][1:0] concat=n=2:v=1:a=1[out3][aud1];
[2:0]fade=t=in:st=5.1:n=24[logo];
[out3][logo]overlay=10:main_h-overlay_h-10:format=rgb[out4];
[out4]drawtext=fontfile=Montserrat-Medium.ttf:text=Josh:fontsize=50:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=210:y=(h-text_h-110),
drawtext=fontfile=Montserrat-Light.ttf:text=Test:fontsize=50:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=210:y=(h-text_h-45)[out5];
Post by Joshua Grauman
[3:0]colorkey=0x000000:0.01:0.9[ovl1]; [ovl1]fade=t=in:st=5.1:n=24[ovl2];
[ovl2]drawbox=0:0:1920:44:color=0x000000ff:t=fill:replace=1:enable='gt(t,5.1)'[ovl3];
Post by Joshua Grauman
[out5][ovl3]overlay=format=rgb:enable='gt(t,5.1)'[out6];
[out6]drawtext=fontfile=GentiumPlus-R.ttf:text=Test2:fontsize=24:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=7:y=7,
drawtext=fontfile=GentiumPlus-R.ttf:text=Test:fontsize=24:fontcolor=ffffff:alpha='if(lt(t,5.1),0,1)':x=(w-text_w-7):y=7[out7];
Post by Joshua Grauman
[out7]fade=t=out:st=1128.1:n=24[out8]; aevalsrc=0:d=5[sil];
color=black:1920x1080:d=5[blk]; [out8]trim=duration=1129.1[trimv];
[aud1]atrim=duration=1129.1[trima];
[trimv][trima][blk][sil]concat=n=2:v=1:a=1[out9][aud2]" -strict
experimental -shortest -map [out9] -map [aud2] -t 1134.1 "Video1.mp4"
Josh
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "

Continue reading on narkive:
Loading...