LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-27-2016, 11:28 AM   #1
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Rep: Reputation: 44
Slackware 14.1, ffmpeg nvenc encoding


Hi, i got a GTX 970. Did anyone manage to get nvenc to work with ffmpeg?

ffmpeg -i input.mkv -c:v nvenc_h264 test.mkv
[nvenc_h264 @ 0x15c5a40] >> dl_fn->cu_init(0) - failed with error code 0x3e7

Do i need new drivers? i use Slackware 14.1
$ ls /var/log/packages/|grep nvidia
nvidia-driver-352.63-x86_64-1_SBo
nvidia-kernel-352.63_3.10.17-x86_64-3_SBo

Building ffmpeg like this:
CPPFLAGS=-I/home/root/ffmpeg/nvidia_video_sdk_6.0.1/Samples/common/inc/ ./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--shlibdir=/usr/lib${LIBDIRSUFFIX} \
--docdir=/usr/doc/$PRGNAM-$VERSION/html \
--mandir=/usr/man \
--disable-debug \
--enable-shared \
--disable-static \
--enable-pthreads \
--enable-libtheora \
--enable-libvorbis \
--enable-gpl \
--enable-version3 \
--enable-postproc \
--enable-swscale \
--enable-x11grab \
--enable-avfilter \
--enable-gnutls \
--enable-libcdio \
--enable-libssh \
--enable-libcaca \
--enable-libsmbclient \
--enable-opengl \
--arch=$ARCH \
--enable-nvenc \
$openjpeg \
$libdc1394 \
$mp3lame \
$libfaac \
$libxvid \
$libx264 \
$libspeex \
$dirac_fast \
$non_free \
$libgsm \
$libvpx \
$librtmp \
$opencore_amr \
$libfrei0r \
$libcelt \
$libbluray \
$libass \
$libopenal \
$libiec61883 \
$libilbc \
$libmodplug \
$libopus \
$libtwolame \
$ladspa \
$pulse \
$fdk \
$libflite \
$libquvi \
$libvidstab \
$libx265 \
$libzvbi \
$libopencv \
$decklink \
$ssl

# ls /home/root/ffmpeg/nvidia_video_sdk_6.0.1/Samples/common/inc/|grep -i nvEncodeAPI.h
nvEncodeAPI.h
 
Old 06-27-2016, 11:42 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
hi slacktroll, looking at the the list of supported GPU doesn't seem GTX 970 is between them... it seems to work only with some high end GPUs (no such hardware here).

also, the Readme.txt of the nvidia_video_sdk_6.0.1 says that drivers 358.x or greater are needed: you can find those on SBo's git master branch but they have been tested only on current.

Last edited by ponce; 06-27-2016 at 12:24 PM.
 
Old 06-28-2016, 03:51 AM   #3
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Original Poster
Rep: Reputation: 44
It says
Desktop and Mobile Computers (2 encode concurrent streams per system)
GeForce (Kepler & Maxwell GPUs only)

Geforce GTX 970 is Maxwell.

... I installed the new drivers from SBo's git master. They worked. Seems that i need to read more manuals.
Thanks for you help!

Last edited by slacktroll; 06-28-2016 at 04:27 AM.
 
Old 06-28-2016, 04:45 AM   #4
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Original Poster
Rep: Reputation: 44
GREAT NEWS PONCE!

How to fix:
1) upgrade drivers to drivers in sbo branch (361.xx)

2)
get nvidia_video_sdk_6.0.1
add this to ffmpeg.SlackBuild
CPPFLAGS=-I/root/ffmpeg/nvidia_video_sdk_6.0.1/Samples/common/inc/ ./configure \

3)
/usr/lib64# ln -s libnvidia-encode.so.361.45.11 libnvidia-encode.so

4)
get ffmpeg-3.1 for more human readable errors, see below

NEW ERROR MESSAGE ->
[nvenc_h264 @ 0x21ab1a0] This encoder is deprecated, use 'h264_nvenc' instead
[nvenc_h264 @ 0x21ab1a0] Cannot load libnvidia-encode.so
/usr/lib64# ln -s libnvidia-encode.so.361.45.11 libnvidia-encode.so

AND IT WORKS

Thank you ponce!

Benchmark:
# ffmpeg -i input.mkv -c:v nvenc_h264 test.mkv
frame=12159 fps=705 q=22.0 Lsize= 7534kB time=00:03:22.86 bitrate= 304.2kbits/s speed=11.8x
# ffmpeg -i input.mkv -c:v h264 test.mkv
frame=12159 fps=205 q=-1.0 Lsize= 7859kB time=00:03:22.86 bitrate= 317.3kbits/s speed=3.42x

Last edited by slacktroll; 06-28-2016 at 04:57 AM. Reason: clarification
 
1 members found this post helpful.
Old 06-28-2016, 08:43 PM   #5
Candelabrus
Member
 
Registered: Apr 2015
Location: Ponta Grossa - PR
Distribution: Slackware64
Posts: 173

Rep: Reputation: 26
I cant compile VLC with ffmpeg + nvenc can you reproduce this please?
 
Old 06-29-2016, 10:47 AM   #6
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by Candelabrus View Post
I cant compile VLC with ffmpeg + nvenc can you reproduce this please?
Can you give me the link to vlc source? i can give it a try.. for the record, i use ffmpeg-3.1 and -current nvidia drivers...
 
Old 10-24-2016, 05:39 AM   #7
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by ponce View Post
hi slacktroll, looking at the the list of supported GPU doesn't seem GTX 970 is between them... it seems to work only with some high end GPUs (no such hardware here).

also, the Readme.txt of the nvidia_video_sdk_6.0.1 says that drivers 358.x or greater are needed: you can find those on SBo's git master branch but they have been tested only on current.
I gave up, went back to
nvidia-driver-352.63-x86_64-1_SBo
nvidia-kernel-352.63_4.4.26-x86_64-3_SBo

nvenc works anyway. must be wrong on their homepage.

new drivers really sucks, fpsdrops etc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg encoding mpegts adismsc Linux - Software 0 11-08-2011 04:25 AM
ffmpeg encoding script. error InvRa Linux - Newbie 6 02-27-2011 04:13 AM
[SOLVED] Using ffmpeg to convert to .mov with h264 encoding. crosstalk Linux - Desktop 3 02-18-2011 12:36 AM
ffmpeg encoding help SentralOrigin Linux - Software 5 04-23-2008 10:35 AM
ffmpeg - psp [] Need help encoding to mp4 nomb Linux - Software 7 01-08-2007 07:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration