Code Monkey home page Code Monkey logo

ffmpeg-nvenc's Introduction

FFmpeg + nvenc build script

This script will compile FFmpeg with Nvidia NVENC support enabled. It can also build OBS Studio or Simple Screen Recorder using that FFmpeg build thus providing NVENC for OBS.

It is brought to you by Linux GameCast and Lutris #lgccares

Usage

Clone the repo then use the build.sh script to compile the binaries

git clone https://github.com/lutris/ffmpeg-nvenc.git
cd ffmpeg-nvenc
./build.sh --dest $HOME/apps/ffmpeg-nvenc

The following command line options are available:

  • -d / --dest : Destination path for FFmpeg / OBS
  • -o / --obs : Build OBS Studio
  • -h / --help : Usage

TODO

  • Add support for multiple distributions (currently only tested on Ubuntu 16.04)

Supporting the authors

If you find this script useful, you can consider supporting Linux GameCast and Lutris.

ffmpeg-nvenc's People

Contributors

cybik avatar ericek111 avatar strycore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg-nvenc's Issues

files missing

On a new kubuntu 16.04 kvm gpu passthrough install, I ran into a couple problems. First, I had to install git to use the script. Please add that to the list of programs to install via apt. After everything compiled, I could not use nvenc as ffmpeg gave me the following error:
error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory
I had libavdevice-ffmpeg56 installed, but I suppose it wants libavdevice-ffmpeg57.

Found no assembler

When I try to build it shows an error.

Found no assembler
Minimum version is nasm-2.13
If you really want to compile without asm, configure with --disable-asm.

Error.txt

libx264 not found on some systems

I've received two reports that the script fails to build on some system with ffmpeg being unable to find libx264. Here is a detailed report of the errors below:

The error I get appears to be during the configure for ffmpeg:

2016-07-27 13:53:19 (1.72 MB/s) - ‘ffmpeg-3.1.tar.bz2’ saved [9329359/9329359]
ERROR: libx264 not found

I've looked at source/ffmpeg-3.1/config.log and determined that the x264 headers were not in place:

/tmp/ffconf.J7WYN2Vg.c:1:18: fatal error: x264.h: No such file or directory

compilation terminated.

I was able to correct this by adding "make install-lib-dev" to the x264 install after "make install" but I still have an issue finding libx264:

/usr/bin/ld: cannot find -lx264

The only file I could find that I think might match is libx264.a which does not get installed by x264's makefile. I think this might be a bug on x264's end. I added a simple cp after the "make install-lib-dev" added above and the build gets further:

cp libx264.a $build_dir/lib/

Now I get the following when building:

/usr/bin/ld: /home/redkrieg/nvenc/ffmpeg-nvenc/lib/libx264.a(common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/home/redkrieg/nvenc/ffmpeg-nvenc/lib/libx264.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
library.mak:99: recipe for target 'libavcodec/libavcodec.so.57' failed
make: *** [libavcodec/libavcodec.so.57] Error 1
make: *** Waiting for unfinished jobs....

No Sources option for Window/Desktop

OS: Ubuntu 16.04

Had to do "Installing the libx264-dev package is a workaround but it shouldn't be needed, we already provide it from our script"

But now when I launch OBS there is no option for window or desktop capture, unlike if I just installed ffmpeg & OBS through CLI

OBS-Studio installation fails

Tried installing OBS-Studio to enable nvenc on ubuntu 16.04 using build script provided here. After installation, obs-studio nvenc encoder lists in the drop-down, but fails when I start recording.

Now, I am unable to uninstall obs-studio. Tried below options.

  1. Not able to see this in Ubuntu software list.
  2. This does not get identified with "sudo apt-get remove --purge OBS*"
  3. Tried sudo make uninstall - says uninstall script is not available.

However, when I search for OBS-Studio, it shows up and I am able to open the application as well.

Please help with the uninstallation steps.

24p DVD defaulting output to 30p framerate

I ran into an audio sync problem with staxrip that traced back to nvenc (3.23 (r667)).

Input file was originally bitstream-encoded to .iso using dvdfab 6, later converted .iso was to .mkv using MakeMKV and plays fine (good audio sync) in mpc-hc, etc:
------------------------ MediaInfo Source File ------------------------
G:\DVD\2012\2012.mkv
General
Complete name : G:\DVD\2012\2012.mkv
Format : Matroska
Format version : Version 2
File size : 4.78 GiB
Duration : 2 h 37 min
Overall bit rate mode : Variable
Overall bit rate : 4 334 kb/s
Encoded date : UTC 2017-10-29 19:24:15
Writing application : MakeMKV v1.10.7 win(x64-release)
Writing library : libmakemkv v1.10.7 (1.3.3/1.4.4) win(x64-release)

Video
ID : 1
ID in the original source medium : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings : CustomMatrix / BVOP
Format, BVOP : Yes
Format, Matrix : Custom
Format, GOP : Variable
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 2 h 37 min
Bit rate mode : Variable
Bit rate : 3 881 kb/s
Maximum bit rate : 9 800 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Scan order : 2:3 Pulldown
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.468
Time code of first frame : 01:00:00;15
Time code source : Group of pictures header
Stream size : 4.28 GiB (90%)
Language : English
Default : No
Forced : No
Original source medium : DVD-Video

Audio
ID : 2
ID in the original source medium : 189 (0xBD)128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Format, Endianness : Big
Codec ID : A_AC3
Duration : 2 h 37 min
Bit rate mode : Constant
Bit rate : 448 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 506 MiB (10%)
Title : Surround 5.1
Language : English
Service kind : Complete Main
Default : Yes
Forced : No
Original source medium : DVD-Video

Command line is:
NVEncC64.exe --vbrhq 3979 --codec h265 --preset quality --level 5.1 --output-depth 10 --weightp --gop-len 90 --lookahead 32 --qp-init 1 --qp-max 27 --qp-min 24 --vbr-quality 26 --aq --sar 40:33 --vpp-edgelevel -i G:\DVD\2012\2012.mkv -o D:\Temp\StaxRip\2012_temp\2012_new_out.h265

Console output is:

Temporal AQ unsupported.
NVEncC (x64) 3.23 (r667) by rigaya, Sep 26 2017 20:51:36 (VC 1900/Win/avx2)
OS Version Windows 10 x64 (14393)
CPU Intel Core i7-7700K @ 4.20GHz [TB: 4.70GHz] (4C/8T)
GPU #0: GeForce GTX 1080 (20 EU) @ 1860 MHz (378.78)
NVENC / CUDA NVENC API 8.0, CUDA 8.0, schedule mode: auto
Input Buffers CUDA, 36 frames
Input Info avcuvid: MPEG2, 720x480, 30000/1001 fps
Vpp Filters cspconv(nv12 -> yv12(16bit))
edgelevel: strength 5.0, threshold 20.0, black 0.0, white 0.0
cspconv(yv12(16bit) -> p010)
Output Info H.265/HEVC main10 @ Level auto
720x480p 97:80 29.970fps (30000/1001fps)
Encoder Preset quality
Rate Control VBRHQ
Bitrate 3979 kbps (Max: 38400 kbps)
Target Quality 26.00
Initial QP I:1 P:1 B:1
QP range I:24-27 P:24-27 B:24-27
VBV buf size auto
Lookahead on, 32 frames, Adaptive I, B Insert
GOP length 90 frames
B frames 0 frames
Ref frames 3 frames, LTR: off
AQ on
CU max / min auto / auto
Others mv:auto
encoded 227030 frames, 972.17 fps, 792.21 kbps, 715.39 MB
encode time 0:03:53, CPU: 6.2, GPU: 19.1, VE: 50.8, GPUClock: 100MHz, VEClock: 119MHz
frame type IDR 2523
frame type I 2523, total size 24.70 MB
frame type P 224507, total size 690.70 MB

Bug is the framerate detected by nvenc is 30p when mediainfo reports 24p. This issue reproduces in other (all) 24p files.

Adding --fps 23.976 to the command line changes input & output framerates to 24p and fixes the audio-sync problem.

Thanks for sharing nvenc, its a great tool.

libx264 failed to compile on ubuntu 16.10

i downloaded the scrip and even did the extra mile to get the newer codecs from nvidia but when the time comes to compile x264 it fails, attaching log file of the build, ignore the nvidia codec part, it's a dummy address.

Part of the terminal messages that are not in the log:

`Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/simos/.wget-hsts'. HSTS will be disabled.
--2016-10-29 04:52:18-- http://developer.download.nvidia.com/designworks/video-codec-sdk/secure/7.0/02/Video_Codec_SDK_7.0.1.zip?autho=1477633173_e636809b4d2fd0de7a35cb387bd87669&file=Video_Codec_SDK_7.0.1.zip
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 213.140.213.176, 213.140.213.169
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|213.140.213.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 252 [text/html]
Saving to: ‘Video_Codec_SDK_7.0.1.zip?autho=1477633173_e636809b4d2fd0de7a35cb387bd87669&file=Video_Codec_SDK_7.0.1.zip.3’

Video_Codec_SDK_7.0.1.zip?autho=1477633173_e636809b4d2fd0de 100%[=========================================================================================================================================>] 252 --.-KB/s in 0s

2016-10-29 04:52:19 (20,6 MB/s) - ‘Video_Codec_SDK_7.0.1.zip?autho=1477633173_e636809b4d2fd0de7a35cb387bd87669&file=Video_Codec_SDK_7.0.1.zip.3’ saved [252/252]

replace Video_Codec_SDK_7.0.1/doc/NVDEC_DA-06209-001_v08.pdf? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/simos/.wget-hsts'. HSTS will be disabled.
--2016-10-29 04:52:24-- http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
Resolving www.tortall.net (www.tortall.net)... 69.55.226.36
Connecting to www.tortall.net (www.tortall.net)|69.55.226.36|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1492156 (1,4M) [application/octet-stream]
Saving to: ‘yasm-1.3.0.tar.gz.3’

yasm-1.3.0.tar.gz.3 100%[=========================================================================================================================================>] 1,42M 503KB/s in 2,9s

2016-10-29 04:52:27 (503 KB/s) - ‘yasm-1.3.0.tar.gz.3’ saved [1492156/1492156]

configure: WARNING: xmlto not found, manpages will not be rebuilt.
ar: u' modifier ignored sinceD' is the default (see `U')
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/simos/.wget-hsts'. HSTS will be disabled.
--2016-10-29 04:52:29-- http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
Resolving download.videolan.org (download.videolan.org)... 88.191.250.2
Connecting to download.videolan.org (download.videolan.org)|88.191.250.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 732999 (716K) [application/octet-stream]
Saving to: ‘last_x264.tar.bz2.3’

last_x264.tar.bz2.3 100%[=========================================================================================================================================>] 715,82K 778KB/s in 0,9s

2016-10-29 04:52:30 (778 KB/s) - ‘last_x264.tar.bz2.3’ saved [732999/732999]

filters/video/resize.c: In function ‘pick_closest_supported_csp’:
filters/video/resize.c:212:9: warning: ‘depth_minus1’ is deprecated [-Wdeprecated-declarations]
if( pix_desc->comp[i].depth_minus1 >= 8 )
^~
In file included from filters/video/resize.c:46:0:
/usr/include/x86_64-linux-gnu/libavutil/pixdesc.h:65:30: note: declared here
attribute_deprecated int depth_minus1;
^~~~~~~~~~~~
input/lavf.c: In function ‘read_frame_internal’:
input/lavf.c:104:17: warning: ‘av_free_packet’ is deprecated [-Wdeprecated-declarations]
av_free_packet( &pkt );
^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:318:0,
from input/lavf.c:30:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4040:6: note: declared here
void av_free_packet(AVPacket _pkt);
^~~~~~~~~~~~~~
/usr/bin/ld: libx264.a(cabac-a.o): relocation R_X86_64_32 against symbol x264_cabac_range_lps' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: libx264.a(quant-a.o): relocation R_X86_64_32 against hidden symbolx264_pb_01' can not be used when making a shared object
/usr/bin/ld: libx264.a(dct-a.o): relocation R_X86_64_32 against hidden symbol x264_pw_8000' can not be used when making a shared object /usr/bin/ld: libx264.a(deblock-a.o): relocation R_X86_64_32 against hidden symbolx264_pb_1' can not be used when making a shared object
/usr/bin/ld: libx264.a(mc-a.o): relocation R_X86_64_32 against hidden symbol x264_pw_64' can not be used when making a shared object /usr/bin/ld: libx264.a(mc-a2.o): relocation R_X86_64_32 against hidden symbolx264_pw_32' can not be used when making a shared object
/usr/bin/ld: libx264.a(pixel-a.o): relocation R_X86_64_32 against hidden symbol x264_pw_00ff' can not be used when making a shared object /usr/bin/ld: libx264.a(predict-a.o): relocation R_X86_64_32 against hidden symbolx264_pb_1' can not be used when making a shared object
/usr/bin/ld: libx264.a(dct-64.o): relocation R_X86_64_32 against hidden symbol x264_hsub_mul' can not be used when making a shared object /usr/bin/ld: libx264.a(sad-a.o): relocation R_X86_64_32 against hidden symbolx264_pw_8' can not be used when making a shared object
/usr/bin/ld: libx264.a(trellis-64.o): relocation R_X86_64_32 against symbol x264_cabac_entropy' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make: *_\* [x264] Error 1
log.txt

Error compiling on Ubuntu 16.04

The script fails on Ubuntu 16.04. Output log below.

In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0,
from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacdecoder_lib.h:347,
from libavcodec/libfdk-aacdec.c:20:
/home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function]
int IS_LITTLE_ENDIAN(void) {
^
CC libavcodec/libmp3lame.o
In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0,
from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacenc_lib.h:706,
from libavcodec/libfdk-aacenc.c:20:
/home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function]
int IS_LITTLE_ENDIAN(void) {
^
CC libavcodec/libopus.o
CC libavcodec/libopusdec.o
CC libavcodec/libopusenc.o
CC libavcodec/libtheoraenc.o
CC libavcodec/libvorbisdec.o
CC libavcodec/libvorbisenc.o
CC libavcodec/libvpx.o
CC libavcodec/libvpxdec.o
CC libavcodec/libvpxenc.o
CC libavcodec/libx264.o
CC libavcodec/ljpegenc.o
libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth > 8)
^
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth == 8)
^
common.mak:60: polecenia dla obiektu 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Exit code 1
make: *** Waiting to terminate the task....

missing libcuda

I ran the script but when I run FFmpeg I get the error

Cannot load libcuda.so
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

libx264 build error Ubuntu 16.04

libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
     if (x264_bit_depth > 8)
         ^
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
     if (x264_bit_depth == 8)
         ^
common.mak:60: recipe for target 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Error 1
make: *** Waiting for unfinished jobs....

Error compiling on nodejs Docker container

fftools/ffmpeg.c:227:9: warning: ignoring return value of 'av_buffersrc_add_frame_flags', declared with attribute warn_unused_result [-Wunused-result]
         av_buffersrc_add_frame_flags(ist->filters[i]->filter, frame,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      AV_BUFFERSRC_FLAG_KEEP_REF |
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      AV_BUFFERSRC_FLAG_PUSH);
                                      ~~~~~~~~~~~~~~~~~~~~~~~
fftools/ffmpeg.c: In function 'sub2video_flush':
fftools/ffmpeg.c:302:9: warning: ignoring return value of 'av_buffersrc_add_frame', declared with attribute warn_unused_result [-Wunused-result]
         av_buffersrc_add_frame(ist->filters[i]->filter, NULL);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC	fftools/ffmpeg_cuvid.o
LD	ffmpeg_g
/usr/bin/ld: /ffmpeg_build/lib/libvpx.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /ffmpeg_build/lib/libvpx.a(highbd_subpel_variance_impl_sse2.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
Makefile:108: recipe for target 'ffmpeg_g' failed

Hi guys,

I'm trying to build ffmpeg version 3.4.4 in a docker container using node:6-slim image.

However, I'm hitting the following error.
I tried adding --extra-cflags="-I$BUILD_DIR/include -fPIC" without any success.

Any ideas?

Error while compiling libx264 on Ubuntu 16.04

--2018-01-02 13:41:01-- http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
Auflösen des Hostnamen »download.videolan.org (download.videolan.org)«... 88.191.250.2
Verbindungsaufbau zu download.videolan.org (download.videolan.org)|88.191.250.2|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 765706 (748K) [application/octet-stream]
In »»last_x264.tar.bz2«« speichern.

last_x264.tar.bz2 100%[=====================================================================================================================>] 747,76K 1,43MB/s in 0,5s

2018-01-02 13:41:02 (1,43 MB/s) - »last_x264.tar.bz2« gespeichert [765706/765706]

platform: X86_64
byte order: little-endian
system: LINUX
cli: yes
libx264: internal
shared: yes
static: no
asm: yes
interlaced: yes
avs: avxsynth
lavf: yes
ffms: no
mp4: no
gpl: yes
thread: posix
opencl: yes
filters: resize crop select_every
lto: no
debug: no
gprof: no
strip: no
PIC: yes
bit depth: all
chroma format: all

You can run 'make' or 'make fprofiled' now.
cat common/opencl/x264-cl.h common/opencl/motionsearch.cl common/opencl/subpel.cl common/opencl/intra.cl common/opencl/weightp.cl common/opencl/downscale.cl common/opencl/bidir.cl | ./tools/cltostr.sh common/oclobj.h
dependency file generation...
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c x264.c -o x264.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c input/input.c -o input/input.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c input/timecode.c -o input/timecode.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c input/raw.c -o input/raw.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c input/y4m.c -o input/y4m.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c output/raw.c -o output/raw.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c output/matroska.c -o output/matroska.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c output/matroska_ebml.c -o output/matroska_ebml.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c output/flv.c -o output/flv.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c output/flv_bytestream.c -o output/flv_bytestream.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c filters/filters.c -o filters/filters.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c filters/video/video.c -o filters/video/video.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c filters/video/source.c -o filters/video/source.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c filters/video/internal.c -o filters/video/internal.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c filters/video/resize.c -o filters/video/resize.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c filters/video/fix_vfr_pts.c -o filters/video/fix_vfr_pts.o
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -fPIC -fomit-frame-pointer -fno-tree-vectorize -c filters/video/select_every.c -o filters/video/select_every.o
filters/video/resize.c: In function ‘pick_closest_supported_csp’:
filters/video/resize.c:215:30: error: ‘AVComponentDescriptor {aka const struct AVComponentDescriptor}’ has no member named ‘depth’
if( pix_desc->comp[i].depth > 8 )

^
Makefile:277: die Regel für Ziel „filters/video/resize.o“ scheiterte
make: *** [filters/video/resize.o] Fehler 1
make: *** Auf noch nicht beendete Prozesse wird gewartet …

error while loading shared libraries: libavdevice.so.58

I tried compiling on my Debian stretch and i got this error when executing the ffmpeg binary

./ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory
the worst thing is that this dependency is only available on the testing and unstable debian repo :(

ffmpeg failed to compile on ubuntu17.10

I'm trying to install ffmpeg on a ubuntu 17.10
i follwed the the steps https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu given in the link

while running make

LD ffmpeg_g LD ffplay_g LD ffprobe_g LD ffserver_g /usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(highbd_subpel_variance_impl_sse2.asm.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:107: recipe for target 'ffserver_g' failed make: *** [ffserver_g] Error 1 make: *** Waiting for unfinished jobs.... /usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(highbd_subpel_variance_impl_sse2.asm.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:107: recipe for target 'ffplay_g' failed make: *** [ffplay_g] Error 1 /usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(highbd_subpel_variance_impl_sse2.asm.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:107: recipe for target 'ffmpeg_g' failed make: *** [ffmpeg_g] Error 1 /usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/pas/ffmpeg_build/lib/libvpx.a(highbd_subpel_variance_impl_sse2.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:107: recipe for target 'ffprobe_g' failed
make: *** [ffprobe_g] Error 1

`
this error is shown.kindly share your views to solve the issue

nvidia headers need to be installed

It seems that ffmpeg removed the nvidia headers from their source so you'll have to do it yourself or add it to the make script

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
make
sudo make install

as documented in this post

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.