GPU speed increase

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GPU speed increase

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
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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: GPU speed increase

Carl Eugen Hoyos-2
2018-11-17 20:02 GMT+01:00, Joshua Grauman <[hidden email]>:

> 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: GPU speed increase

Brainiarc7
In reply to this post by Joshua Grauman
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.

On Sun, Nov 18, 2018, 05:13 Joshua Grauman <[hidden email] wrote:

> 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
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: GPU speed increase

Bo Zhou
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.

On Sun, Nov 18, 2018 at 5:58 PM Dennis Mungai <[hidden email]> wrote:

> 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.
>
> On Sun, Nov 18, 2018, 05:13 Joshua Grauman <[hidden email] wrote:
>
> > 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
> > [hidden email]
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > [hidden email] with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".