Ffmpeg Nvenc GPU decode , set hwaccel_device not work

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

Ffmpeg Nvenc GPU decode , set hwaccel_device not work

dd
Dear my friend,
We replace cpu with gpu to ffmpeg recently, I set the gpu device no, but it still use default device 0.
As the following problem Code:
ffmpeg -hwaccel_device 2 -hwaccel cuvid -i a.mp4 -vf “scale=1080:720,overlay=()” -c:v h264_nvenc out.mp4


I found if use “scale_npp” replace  “scale” will work with device 2, but in that way, we will lost some filter functions
like overlay,suntitles burning,and so on.Is there some parameters of scale_npp with the same functions?
Or how can I implement add water picture on gpu platform with seted device number?
Linux server has 5 NVIDIA card, i see it use device 0 always by the nvidia-smi tool.
Hope your help, thank you!









_______________________________________________
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: Ffmpeg Nvenc GPU decode , set hwaccel_device not work

Brainiarc7
On Mon, 24 Dec 2018 at 21:23, dd <[hidden email]> wrote:

> Dear my friend,
> We replace cpu with gpu to ffmpeg recently, I set the gpu device no, but
> it still use default device 0.
> As the following problem Code:
> ffmpeg -hwaccel_device 2 -hwaccel cuvid -i a.mp4 -vf
> “scale=1080:720,overlay=()” -c:v h264_nvenc out.mp4
>
>
> I found if use “scale_npp” replace  “scale” will work with device 2, but
> in that way, we will lost some filter functions
> like overlay,suntitles burning,and so on.Is there some parameters of
> scale_npp with the same functions?
> Or how can I implement add water picture on gpu platform with seted device
> number?
> Linux server has 5 NVIDIA card, i see it use device 0 always by the
> nvidia-smi tool.
> Hope your help, thank you!


>

>
>
>
>
>
>
>
> _______________________________________________
> 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".


Hey,

You must add the -gpu option to ffmpeg, passed to the NVENC encoder(s), as
shown below with the example you provided::

ffmpeg -hwaccel_device 2 -hwaccel cuvid -i a.mp4 -vf
“scale=1080:720,overlay=()” -c:v h264_nvenc -gpu 2 out.mp4

That should use the selected device, ie gpu 2.

Now, retest and report back.
_______________________________________________
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".
dd
Reply | Threaded
Open this post in threaded view
|

Re: Ffmpeg Nvenc GPU decode , set hwaccel_device not work

dd

Very magical with your guide, it works well.
Thanks a lot for your quickly reply, I am very grateful.
Merry Christmas!
















At 2018-12-25 02:35:35, "Dennis Mungai" <[hidden email]> wrote:

>On Mon, 24 Dec 2018 at 21:23, dd <[hidden email]> wrote:
>
>> Dear my friend,
>> We replace cpu with gpu to ffmpeg recently, I set the gpu device no, but
>> it still use default device 0.
>> As the following problem Code:
>> ffmpeg -hwaccel_device 2 -hwaccel cuvid -i a.mp4 -vf
>> “scale=1080:720,overlay=()” -c:v h264_nvenc out.mp4
>>
>>
>> I found if use “scale_npp” replace  “scale” will work with device 2, but
>> in that way, we will lost some filter functions
>> like overlay,suntitles burning,and so on.Is there some parameters of
>> scale_npp with the same functions?
>> Or how can I implement add water picture on gpu platform with seted device
>> number?
>> Linux server has 5 NVIDIA card, i see it use device 0 always by the
>> nvidia-smi tool.
>> Hope your help, thank you!
>
>
>>
>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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".
>
>
>Hey,
>
>You must add the -gpu option to ffmpeg, passed to the NVENC encoder(s), as
>shown below with the example you provided::
>
>ffmpeg -hwaccel_device 2 -hwaccel cuvid -i a.mp4 -vf
>“scale=1080:720,overlay=()” -c:v h264_nvenc -gpu 2 out.mp4
>
>That should use the selected device, ie gpu 2.
>
>Now, retest and report back.
>_______________________________________________
>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: Ffmpeg Nvenc GPU decode , set hwaccel_device not work

Brainiarc7
On Tue, 25 Dec 2018 at 07:22, dd <[hidden email]> wrote:

>
> Very magical with your guide, it works well.
> Thanks a lot for your quickly reply, I am very grateful.
> Merry Christmas!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> At 2018-12-25 02:35:35, "Dennis Mungai" <[hidden email]> wrote:
> >On Mon, 24 Dec 2018 at 21:23, dd <[hidden email]> wrote:
> >
> >> Dear my friend,
> >> We replace cpu with gpu to ffmpeg recently, I set the gpu device no, but
> >> it still use default device 0.
> >> As the following problem Code:
> >> ffmpeg -hwaccel_device 2 -hwaccel cuvid -i a.mp4 -vf
> >> “scale=1080:720,overlay=()” -c:v h264_nvenc out.mp4
> >>
> >>
> >> I found if use “scale_npp” replace  “scale” will work with device 2, but
> >> in that way, we will lost some filter functions
> >> like overlay,suntitles burning,and so on.Is there some parameters of
> >> scale_npp with the same functions?
> >> Or how can I implement add water picture on gpu platform with seted
> device
> >> number?
> >> Linux server has 5 NVIDIA card, i see it use device 0 always by the
> >> nvidia-smi tool.
> >> Hope your help, thank you!
> >
> >
> >>
> >
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> 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".
> >
> >
> >Hey,
> >
> >You must add the -gpu option to ffmpeg, passed to the NVENC encoder(s), as
> >shown below with the example you provided::
> >
> >ffmpeg -hwaccel_device 2 -hwaccel cuvid -i a.mp4 -vf
> >“scale=1080:720,overlay=()” -c:v h264_nvenc -gpu 2 out.mp4
> >
> >That should use the selected device, ie gpu 2.
> >
> >Now, retest and report back.
> >_______________________________________________
> >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".


Merry Christmas to you too!
_______________________________________________
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".