Message ID | d8f1056f-8dd1-e3a4-f0d5-7c1fa765df58@sky.com |
---|---|
State | Superseded |
Headers | show |
applied
On 07/09/16 17:52, Timo Rothenpieler wrote: > applied > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel I've updated my git clone and it is now seg faulting. Sven $ ffmpeg -f x11grab -framerate 200 -s hd1080 -i :0.0 -c:v hevc_nvenc -y test.mkv ffmpeg version N-81588-g3e886e7 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 6.2.0 (GCC) configuration: --prefix=/home/sven/av --enable-gpl --enable-version3 --enable-nonfree --arch=x86_64 --cpu=native --disable-debug --disable-shared --enable-static --enable-libvorbis --enable-libopus --enable-libx264 --enable-libx265 --enable-opengl --enable-opencl --enable-vaapi --enable-vdpau --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp --extra-cflags='-I/home/sven/av/include -I/usr/local/cuda/include -I/usr/local/Video_Codec_SDK_7.0.1/Samples/common/inc' --extra-ldflags='-L/home/sven/av/lib -L/usr/local/cuda/lib64' --ar=gcc-ar --nm=gcc-nm --ranlib=true libavutil 55. 29.100 / 55. 29.100 libavcodec 57. 55.101 / 57. 55.101 libavformat 57. 48.102 / 57. 48.102 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 61.100 / 6. 61.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 [x11grab @ 0x2352fe0] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, x11grab, from ':0.0': Duration: N/A, start: 1473268691.319742, bitrate: N/A Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 200 fps, 1000k tbr, 1000k tbn, 1000k tbc [matroska @ 0x235b2a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. Output #0, matroska, to 'test.mkv': Metadata: encoder : Lavf57.48.102 Stream #0:0: Video: hevc (hevc_nvenc) (Main), bgr0, 1920x1080, q=-1--1, 2000 kb/s, 1000k fps, 1k tbn, 1000k tbc Metadata: encoder : Lavc57.55.101 hevc_nvenc Side data: cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> hevc (hevc_nvenc)) Press [q] to stop, [?] for help Segmentation fault
Your patch was truncated before being applied [1], someone needs to revert and apply it properly. [1] - http://ffmpeg.org/pipermail/ffmpeg-devel/2016-September/199079.html <http://ffmpeg.org/pipermail/ffmpeg-devel/2016-September/199079.html>
--- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -81,6 +81,8 @@ const enum AVPixelFormat ff_nvenc_pix_fmts[] = { AV_PIX_FMT_P010, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P16, + AV_PIX_FMT_0RGB32, + AV_PIX_FMT_0BGR32, #if CONFIG_CUDA AV_PIX_FMT_CUDA, #endif @@ -1032,6 +1034,14 @@ static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx) ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_YUV444_10BIT; break; + case AV_PIX_FMT_0RGB32: + ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_ABGR; + break; + + case AV_PIX_FMT_0BGR32: + ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_ARGB; + break; + default: av_log(avctx, AV_LOG_FATAL, "Invalid input pixel format\n");