FFMPEG not using GPU/CUDA

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

FFMPEG not using GPU/CUDA

Mahmood Naderan
Hi,
I have built FFMPEG from source on an Ubuntu 18.04 with the following
commands:

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers/
make
sudo make install
cd ../
./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree
--enable-libnpp --extra-cflags=-I/usr/local/cuda/include
--extra-ldflags=-L/usr/local/cuda/lib64
make -j8

Everything looks fine. However, when I run the following command

./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree
--enable-libnpp --extra-cflags=-I/usr/local/cuda/include
--extra-ldflags=-L/usr/local/cuda/lib64

I don't see any ffmpeg related process on GPU. I mean the "nvidia-smi -l"
command shows nothing related to ffmpeg and that means ffmpeg is not using
GPU. The output of the command look normal and it has normal progress.

...
rame= 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


Any idea?


Regards,
Mahmood
_______________________________________________
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 not using GPU/CUDA

Carl Zwanzig
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
[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 not using GPU/CUDA

Mahmood Naderan
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 <[hidden email]> 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
> [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 not using GPU/CUDA

Mahmood Naderan
Carl,
Please see the make output at https://pastebin.com/BzpEHvjV


Regards,
Mahmood




On Wed, Jan 23, 2019 at 9:44 PM Mahmood Naderan <[hidden email]>
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 <[hidden email]> 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
>> [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 not using GPU/CUDA

Brainiarc7
On Wed, Jan 23, 2019, 21:18 Mahmood Naderan <[hidden email] 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 <[hidden email]>
> 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 <[hidden email]> 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
> >> [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".




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.
_______________________________________________
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 not using GPU/CUDA

Mahmood Naderan
So, I think the command should be similar to this

./ffmpeg -i ../fast_video.mp4 h264_nvenc -preset medium -movflags
+faststart -c:a aac ../fast_video_conv.mp4

but that fails

[NULL @ 0x558bd7fcadc0] Unable to find a suitable output format for
'h264_nvenc'
h264_nvenc: Invalid argument


Regards,
Mahmood




On Wed, Jan 23, 2019 at 10:06 PM Dennis Mungai <[hidden email]> wrote:

>
> 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.
> _______________________________________________
> 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 not using GPU/CUDA

Mahmood Naderan
Excuse me, the following command

./ffmpeg -hwaccel nvdec -i ........

utilizes GPU.
Is that all I was looking for?


$ ./ffmpeg -hwaccel nvdec -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.
File '../fast_video_conv.mp4' already exists. Overwrite ? [y/N] y
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
[mp4 @ 0x561bd68d6ac0] Starting second pass: moving the moov atom to the
beginning of the file
frame= 2348 fps=158 q=31.0 Lsize=   40272kB time=00:01:18.31
bitrate=4212.8kbits/s speed=5.26x
video:40182kB audio:22kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.169521%
[aac @ 0x561bd68d7d40] Qavg: 65536.000




Regards,
Mahmood




On Wed, Jan 23, 2019 at 10:13 PM Mahmood Naderan <[hidden email]>
wrote:

> So, I think the command should be similar to this
>
> ./ffmpeg -i ../fast_video.mp4 h264_nvenc -preset medium -movflags
> +faststart -c:a aac ../fast_video_conv.mp4
>
> but that fails
>
> [NULL @ 0x558bd7fcadc0] Unable to find a suitable output format for
> 'h264_nvenc'
> h264_nvenc: Invalid argument
>
>
> Regards,
> Mahmood
>
>
_______________________________________________
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 not using GPU/CUDA

Moritz Barsnick
In reply to this post by Mahmood Naderan
On Wed, Jan 23, 2019 at 22:13:55 +0330, Mahmood Naderan wrote:
> So, I think the command should be similar to this
>
> ./ffmpeg -i ../fast_video.mp4 h264_nvenc -preset medium -movflags
> +faststart -c:a aac ../fast_video_conv.mp4

Not quite. Do check the documentation for a guide and the wiki for
examples. (https://trac.ffmpeg.org/wiki/HWAccelIntro)

It's "... -c:v h264_nvenc ..."

> [NULL @ 0x558bd7fcadc0] Unable to find a suitable output format for
> 'h264_nvenc'
> h264_nvenc: Invalid argument

ffmpeg tried to interpret the stand-alone string "h264_nvenc" as an
output (file name).

Cheers,
Moritz
_______________________________________________
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".