[FFmpeg-user] FFMPEG not using GPU/CUDA

Dennis Mungai dmngaie at gmail.com
Wed Jan 23 20:29:59 EET 2019


On Wed, Jan 23, 2019, 21:18 Mahmood Naderan <mahmood.nt at gmail.com wrote:

> Carl,
> Please see the make output at https://pastebin.com/BzpEHvjV
>
>
> Regards,
> Mahmood
>
>
>
>
> On Wed, Jan 23, 2019 at 9:44 PM Mahmood Naderan <mahmood.nt at gmail.com>
> wrote:
>
> >
> > Thanks for the quick reply. The config log can be seen at
> > https://pastebin.com/WeYbXiWW
> > Also, the full output of the command I ran is shown below. Please note
> the
> > I think the \n character is not inserted after
> >
> > frame=   39 fps=0.0 q=31.0 size=     768kB time=00:00:01.74
> > bitrate=3596.7kbits/s speed=3.4
> >
> > and they are all shown sequentially.
> >
> >
> > $ ./ffmpeg -i ../fast_video.mp4  -preset medium -movflags +faststart -c:a
> > aac ../fast_video_conv.mp4
> > ffmpeg version N-93005-gd92f06eb66 Copyright (c) 2000-2019 the FFmpeg
> > developers
> >   built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
> >   configuration: --enable-cuda --enable-cuvid --enable-nvenc
> > --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include
> > --extra-ldflags=-L/usr/local/cuda/lib64
> >   libavutil      56. 26.100 / 56. 26.100
> >   libavcodec     58. 44.100 / 58. 44.100
> >   libavformat    58. 26.100 / 58. 26.100
> >   libavdevice    58.  6.101 / 58.  6.101
> >   libavfilter     7. 48.100 /  7. 48.100
> >   libswscale      5.  4.100 /  5.  4.100
> >   libswresample   3.  4.100 /  3.  4.100
> > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../fast_video.mp4':
> >   Metadata:
> >     major_brand     : isom
> >     minor_version   : 512
> >     compatible_brands: isomiso2avc1mp41
> >     encoder         : Lavf57.83.100
> >   Duration: 00:01:18.35, start: 0.000000, bitrate: 8249 kb/s
> >     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> > 1920x1080 [SAR 1:1 DAR 16:9], 8239 kb/s, 29.97 fps, 29.97 tbr, 30k tbn,
> > 59.94 tbc (default)
> >     Metadata:
> >       handler_name    : VideoHandler
> >     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
> > stereo, fltp, 2 kb/s (default)
> >     Metadata:
> >       handler_name    : SoundHandler
> > Codec AVOption preset (Set the encoding preset) specified for output file
> > #0 (../fast_video_conv.mp4) has not been used for any stream. The most
> > likely reason is either wrong type (e.g. a video option with no video
> > streams) or that it is a private option of some encoder which was not
> > actually used for any stream.
> > Stream mapping:
> >   Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
> >   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
> > Press [q] to stop, [?] for help
> > Output #0, mp4, to '../fast_video_conv.mp4':
> >   Metadata:
> >     major_brand     : isom
> >     minor_version   : 512
> >     compatible_brands: isomiso2avc1mp41
> >     encoder         : Lavf58.26.100
> >     Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p,
> 1920x1080
> > [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
> > (default)
> >     Metadata:
> >       handler_name    : VideoHandler
> >       encoder         : Lavc58.44.100 mpeg4
> >     Side data:
> >       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
> >     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
> > stereo, fltp, 128 kb/s (default)
> >     Metadata:
> >       handler_name    : SoundHandler
> >       encoder         : Lavc58.44.100 aac
> > frame=   39 fps=0.0 q=31.0 size=     768kB time=00:00:01.74
> > bitrate=3596.7kbits/s speed=3.4frame=   97 fps= 96 q=31.0 size=    1792kB
> > time=00:00:03.69 bitrate=3977.7kbits/s speed=3.6frame=  155 fps=102
> q=31.0
> > size=    2560kB time=00:00:05.63 bitrate=3723.7kbits/s speed=3.7frame=
> 215
> > fps=107 q=31.0 size=    3584kB time=00:00:07.63 bitrate=3844.3kbits/s
> > speed=3.7frame=  277 fps=110 q=31.0 size=    4608kB time=00:00:09.70
> > bitrate=3889.0kbits/s speed=3.8frame=  340 fps=113 q=31.0 size=    5632kB
> > time=00:00:11.79 bitrate=3910.9kbits/s speed=3.9frame=  398 fps=113
> q=24.8
> > size=    6656kB time=00:00:13.73 bitrate=3968.8kbits/s speed= 3.frame=
> 460
> > fps=114 q=31.0 size=    7936kB time=00:00:15.80 bitrate=4112.6kbits/s
> > speed=3.9frame=  516 fps=114 q=31.0 size=    8960kB time=00:00:17.66
> > bitrate=4155.4kbits/s speed= 3.frame=  570 fps=113 q=31.0 size=    9984kB
> > time=00:00:19.47 bitrate=4199.2kbits/s speed=3.8frame=  623 fps=113
> q=31.0
> > size=   11264kB time=00:00:21.24 bitrate=4342.8kbits/s speed=3.8frame=
> 682
> > fps=113 q=24.8 size=   12288kB time=00:00:23.21 bitrate=4337.0kbits/s
> > speed=3.8frame=  741 fps=113 q=31.0 size=   13056kB time=00:00:25.19
> > bitrate=4245.1kbits/s speed=3.8frame=  802 fps=114 q=24.8 size=   13824kB
> > time=00:00:27.22 bitrate=4160.2kbits/s speed=3.8frame=  863 fps=114
> q=31.0
> > size=   14592kB time=00:00:29.24 bitrate=4087.0kbits/s speed=3.8frame=
> 924
> > fps=115 q=31.0 size=   15616kB time=00:00:31.29 bitrate=4087.6kbits/s
> > speed=3.8frame=  985 fps=115 q=31.0 size=   16896kB time=00:00:33.32
> > bitrate=4153.7kbits/s speed=3.8frame= 1047 fps=116 q=31.0 size=   17664kB
> > time=00:00:35.39 bitrate=4088.6kbits/s speed=3.9frame= 1105 fps=115
> q=31.0
> > size=   18432kB time=00:00:37.33 bitrate=4044.5kbits/s speed= 3.frame=
> 1167
> > fps=116 q=31.0 size=   19456kB time=00:00:39.40 bitrate=4045.0kbits/s
> > speed=3.9frame= 1223 fps=115 q=31.0 size=   20224kB time=00:00:41.25
> > bitrate=4015.5kbits/s speed= 3.frame= 1275 fps=115 q=31.0 size=   20992kB
> > time=00:00:43.00 bitrate=3998.5kbits/s speed=3.8frame= 1329 fps=115
> q=31.0
> > size=   21760kB time=00:00:44.80 bitrate=3979.0kbits/s speed=3.8frame=
> 1389
> > fps=115 q=31.0 size=   22784kB time=00:00:46.80 bitrate=3987.7kbits/s
> > speed=3.8frame= 1445 fps=115 q=31.0 size=   23552kB time=00:00:48.66
> > bitrate=3964.9kbits/s speed=3.8frame= 1504 fps=115 q=31.0 size=   24320kB
> > time=00:00:50.64 bitrate=3933.8kbits/s speed=3.8frame= 1561 fps=115
> q=24.8
> > size=   25600kB time=00:00:52.54 bitrate=3991.2kbits/s speed=3.8frame=
> 1623
> > fps=115 q=31.0 size=   26368kB time=00:00:54.61 bitrate=3955.2kbits/s
> > speed=3.8frame= 1689 fps=115 q=31.0 size=   27136kB time=00:00:56.81
> > bitrate=3913.0kbits/s speed=3.8frame= 1745 fps=115 q=31.0 size=   28160kB
> > time=00:00:58.68 bitrate=3930.7kbits/s speed=3.8frame= 1810 fps=116
> q=31.0
> > size=   28928kB time=00:01:00.84 bitrate=3894.9kbits/s speed=3.8frame=
> 1872
> > fps=116 q=31.0 size=   29696kB time=00:01:02.91 bitrate=3866.8kbits/s
> > speed= 3.frame= 1931 fps=116 q=31.0 size=   30720kB time=00:01:04.89
> > bitrate=3877.9kbits/s speed= 3.frame= 1992 fps=116 q=31.0 size=   31744kB
> > time=00:01:06.92 bitrate=3885.8kbits/s speed= 3.frame= 2040 fps=115
> q=31.0
> > size=   32512kB time=00:01:08.52 bitrate=3886.9kbits/s speed=3.8frame=
> 2085
> > fps=115 q=31.0 size=   33536kB time=00:01:10.01 bitrate=3923.8kbits/s
> > speed=3.8frame= 2137 fps=114 q=24.8 size=   34560kB time=00:01:11.76
> > bitrate=3945.0kbits/s speed=3.8frame= 2181 fps=114 q=31.0 size=   35840kB
> > time=00:01:13.21 bitrate=4010.1kbits/s speed=3.8frame= 2223 fps=113
> q=31.0
> > size=   36864kB time=00:01:14.62 bitrate=4046.8kbits/s speed=3.7frame=
> 2280
> > fps=113 q=31.0 size=   38400kB time=00:01:16.52 bitrate=4110.8kbits/s
> > speed=3.7frame= 2334 fps=113 q=31.0 size=   39936kB time=00:01:18.20
> > bitrate=4183.2kbits/s speed=3.7[mp4 @ 0x55c859ecd3c0] Starting second
> pass:
> > moving the moov atom to the beginning of the file
> > frame= 2348 fps=113 q=31.0 Lsize=   40272kB time=00:01:18.31
> > bitrate=4212.8kbits/s speed=3.76x
> > video:40182kB audio:22kB subtitle:0kB other streams:0kB global
> headers:0kB
> > muxing overhead: 0.169521%
> > [aac @ 0x55c859e9b880] Qavg: 65536.000
> >
> >
> >
> >
> > Regards,
> > Mahmood
> >
> >
> >
> >
> > On Wed, Jan 23, 2019 at 9:37 PM Carl Zwanzig <cpz at tuunq.com> wrote:
> >
> >> On 1/23/2019 9:48 AM, Mahmood Naderan wrote:
> >> > Any idea?
> >>
> >> Post the full output of the command you're trying? (it's really needed
> to
> >> help see what's going on).
> >>
> >> z!
> >>
> >> _______________________________________________
> >> ffmpeg-user mailing list
> >> ffmpeg-user at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> >
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".




Hello there,

You must select the nvenc encoders and optionally, a CUDA based filter,
such as scale_cuda, yadif_cuda, etc to utilize the GPU.

For the encoders, see:

ffmpeg -h encoder=h264_nvenc

ffmpeg -h encoder=hevc_nvenc

The scalers above will work with any CUDA capable GPU (supported by the
CUDA SDK), but for NVENC, you'll need to ensure that you have a supported
GPU. Typically Kepler and above.

Regards,

Dennis.


More information about the ffmpeg-user mailing list