ffmpeg nvidia transcoder problem

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
Post Reply
criptal
Level 1
Level 1
Posts: 12
Joined: Sun Sep 22, 2019 1:47 am

ffmpeg nvidia transcoder problem

Post by criptal » Tue Oct 08, 2019 12:51 am

Hello Minters,
I try to encode using nvidia hardware acceleration with ffmpeg on Tessa, and can't figure out why I have the below error. I found the parameters on nvidia support page. Can a ffmpeg expert help me please? I'm dying doing cpu enc, it takes ages...
I have a 580 GTX.

Code: Select all

$ ffmpeg -vsync 0 -hwaccel cuvid -c:v h264_cuvid -i vid-in.mp4 -i s_62x60.png -filter_complex '[0:v][1:v]overlay=0:1020[outv]' -map [outv] -map 0:a -c:a copy -c:v h264_nvenc -c:v libx264 -crf 22 -report outtst.mp4
result:

Code: Select all

ffmpeg started on 2019-10-08 at 06:42:49
Report written to "ffmpeg-20191008-064249.log"
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vin_C0054.MP4':
  Metadata:
    major_brand     : XAVC
    minor_version   : 16785407
    compatible_brands: XAVCmp42iso2
    creation_time   : 2018-09-25T05:52:09.000000Z
  Duration: 00:01:33.12, start: 0.000000, bitrate: 52250 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-4), 1920x1080 [SAR 1:1 DAR 16:9], 50101 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc (default)
    Metadata:
      creation_time   : 2018-09-25T05:52:09.000000Z
      handler_name    : Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2018-09-25T05:52:09.000000Z
      handler_name    : Sound Media Handler
    Stream #0:2(und): Data: none (rtmd / 0x646D7472), 409 kb/s (default)
    Metadata:
      creation_time   : 2018-09-25T05:52:09.000000Z
      handler_name    : Timed Metadata Media Handler
      timecode        : 01:10:08:32
Input #1, png_pipe, from 's_62x60.png':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: png, rgba(pc), 62x60 [SAR 2835:2835 DAR 31:30], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 (h264_cuvid) -> overlay:main
  Stream #1:0 (png) -> overlay:overlay
  overlay -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #1:0
Conversion failed!

Hoser Rob
Level 15
Level 15
Posts: 5508
Joined: Sat Dec 15, 2012 8:57 am

Re: ffmpeg nvidia transcoder problem

Post by Hoser Rob » Tue Oct 08, 2019 9:31 am

This doesn't seem as simple to me as just needing parameters copied and pasted, you may want to read this:

https://trac.ffmpeg.org/wiki/HWAccelIntro

criptal
Level 1
Level 1
Posts: 12
Joined: Sun Sep 22, 2019 1:47 am

Re: ffmpeg nvidia transcoder problem

Post by criptal » Wed Oct 09, 2019 12:44 am

Thank you for your reply. I realized my 580 GTX does not support hard acceleration for ffmpeg. It is not listed in the supported cards, even if it has pretty much CUDA cores.
Question closed.

Hoser Rob
Level 15
Level 15
Posts: 5508
Joined: Sat Dec 15, 2012 8:57 am

Re: ffmpeg nvidia transcoder problem

Post by Hoser Rob » Wed Oct 09, 2019 7:47 am

I wouldn't worry, GPU encoding is over rated anyway, the quality isn't as good as CPU.

If you want decent speed and quality try constant quantizer or crf mode in your encoder (I use GUI encoders myself). it's about as fast as one pass bit rate mode but has at least the same quality as 2 pass. I thinki some devices may have problems with crf mode x264 video but software players don't.

criptal
Level 1
Level 1
Posts: 12
Joined: Sun Sep 22, 2019 1:47 am

Re: ffmpeg nvidia transcoder problem

Post by criptal » Wed Oct 09, 2019 2:54 pm

okay.
I actually use crf in my scripts, don't know why but I do ;*-)
I noticed intel hypertheading gives a boost, it loads the cpu to very nearly 100%. Without there is a bit less throughoutput.
/criptal

criptal
Level 1
Level 1
Posts: 12
Joined: Sun Sep 22, 2019 1:47 am

Re: ffmpeg nvidia transcoder problem

Post by criptal » Sat Oct 12, 2019 11:23 pm

Still, I think for my video publishing needs A GPU encode would fit. Because, if I loose 3% qulity it won't be noticed on the scream. I'm not doing cinema, only peertube streaming.
I need to buy a new card,forced by Nvidia policy. If they had allowed accel on 580, I would already be fixed, I would have been way more powerful than any cpu rendering. They are sneaky...

Hoser Rob
Level 15
Level 15
Posts: 5508
Joined: Sat Dec 15, 2012 8:57 am

Re: ffmpeg nvidia transcoder problem

Post by Hoser Rob » Mon Oct 14, 2019 9:51 am

I wouldn't assume it'd just be 3% worse but it may be good enough, see here for more explanation:

https://www.reddit.com/r/hardware/comme ... mpared_to/

And no one's being sneaky. In Linux you simply can't expect devs of something like ffmpeg to support an almost 10 year old card.

Post Reply

Return to “Sound, Multimedia, & Codecs”