[FFmpeg-user] Multicore CPU run

Mahmood Naderan mahmood.nt at gmail.com
Sat Feb 2 21:09:56 EET 2019


>Correction:
>
>./ffmpeg -init_hw_device cuda=0 -filter_hw_device 0 -i ../4k_normal.mp4 -vf
>format=nv12,hwupload,scale_npp=1280:720 -c:v h264_nvenc 720p1.mp4




OK that is good

$ time ./ffmpeg -init_hw_device cuda=0 -filter_hw_device 0 -i
../4k_normal.mp4 -vf  format=nv12,hwupload,scale_npp=1280:720 -c:v
h264_nvenc 720p1.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-filter=scale_cuda --enable-cuda-sdk
--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 '../4k_normal.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.71.100
  Duration: 00:01:31.91, start: 0.000000, bitrate: 32684 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
3840x2160 [SAR 1:1 DAR 16:9], 32482 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), 44100 Hz,
stereo, fltp, 195 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
File '720p1.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to '720p1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.26.100
    Stream #0:0(und): Video: h264 (h264_nvenc) (Main) (avc1 / 0x31637661),
cuda, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 29.97 fps, 30k tbn,
29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.44.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay:
-1
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.44.100 aac
frame=   51 fps=0.0 q=17.0 size=     256kB time=00:00:02.15 bitrate=
971.3kbits/s speed=4frame=  156 fps=153 q=19.0 size=    1280kB
time=00:00:05.66 bitrate=1850.8kbits/s speed=5frame=  261 fps=171 q=19.0
size=    2048kB time=00:00:09.17 bitrate=1829.2kbits/s speed=6frame=  365
fps=180 q=35.0 size=    3584kB time=00:00:12.63 bitrate=2324.4kbits/s
speed=6frame=  464 fps=184 q=23.0 size=    4352kB time=00:00:15.92
bitrate=2238.2kbits/s speed= frame=  566 fps=187 q=23.0 size=    4608kB
time=00:00:19.34 bitrate=1951.6kbits/s speed=6frame=  671 fps=190 q=20.0
size=    5376kB time=00:00:22.84 bitrate=1927.5kbits/s speed=6frame=  771
fps=191 q=20.0 size=    5888kB time=00:00:26.19 bitrate=1841.6kbits/s
speed=6frame=  877 fps=193 q=18.0 size=    6656kB time=00:00:29.72
bitrate=1834.6kbits/s speed=6frame=  979 fps=194 q=22.0 size=    7680kB
time=00:00:33.11 bitrate=1900.1kbits/s speed=6frame= 1086 fps=196 q=21.0
size=    8448kB time=00:00:36.68 bitrate=1886.4kbits/s speed=6frame= 1185
fps=196 q=20.0 size=    9216kB time=00:00:39.96 bitrate=1889.3kbits/s
speed= frame= 1289 fps=197 q=22.0 size=   10496kB time=00:00:43.46
bitrate=1978.1kbits/s speed=6frame= 1392 fps=197 q=23.0 size=   11520kB
time=00:00:46.90 bitrate=2012.0kbits/s speed=6frame= 1499 fps=198 q=22.0
size=   12288kB time=00:00:50.48 bitrate=1994.1kbits/s speed=6frame= 1605
fps=199 q=23.0 size=   13568kB time=00:00:54.00 bitrate=2058.0kbits/s
speed= frame= 1708 fps=200 q=19.0 size=   14080kB time=00:00:57.42
bitrate=2008.7kbits/s speed=6frame= 1813 fps=200 q=19.0 size=   15104kB
time=00:01:00.95 bitrate=2030.0kbits/s speed=6frame= 1917 fps=200 q=20.0
size=   15872kB time=00:01:04.41 bitrate=2018.6kbits/s speed=6frame= 2023
fps=201 q=19.0 size=   16896kB time=00:01:07.96 bitrate=2036.5kbits/s
speed=6frame= 2120 fps=201 q=20.0 size=   17408kB time=00:01:11.19
bitrate=2003.1kbits/s speed=6frame= 2225 fps=201 q=21.0 size=   18688kB
time=00:01:14.69 bitrate=2049.5kbits/s speed=6frame= 2328 fps=201 q=20.0
size=   19456kB time=00:01:18.13 bitrate=2039.8kbits/s speed=6frame= 2434
fps=202 q=21.0 size=   20480kB time=00:01:21.66 bitrate=2054.4kbits/s
speed=6frame= 2542 fps=202 q=23.0 size=   21504kB time=00:01:25.26
bitrate=2066.1kbits/s speed=6frame= 2632 fps=201 q=27.0 size=   22784kB
time=00:01:28.25 bitrate=2114.8kbits/s speed=6frame= 2738 fps=202 q=22.0
size=   23808kB time=00:01:31.81 bitrate=2124.3kbits/s speed=6frame= 2755
fps=202 q=24.0 Lsize=   24066kB time=00:01:31.89 bitrate=2145.4kbits/s
speed=6.73x
video:22548kB audio:1441kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.322354%
[aac @ 0x56136ee35d40] Qavg: 135.844

real    0m15.387s
user    1m50.342s
sys    0m1.897s


15 seconds compared to 20 seconds which I achieved before.


Regards,
Mahmood


More information about the ffmpeg-user mailing list