我尝试了一些其他推荐的转换命令,但都不起作用。这是基本命令:
ffmpeg -i wmvfile.wmv somefile6.mp4
输出:
ffmpeg version N-91548-g481741ece0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.1 (GCC) 20180722
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 22.100 / 58. 22.100
libavformat 58. 17.101 / 58. 17.101
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 26.100 / 7. 26.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
[vc1 @ 000002229e3a31c0] Progressive Segmented Frame mode: not supported (yet)
[asf @ 000002229e36a000] Failed to open codec in avformat_find_stream_info
[vc1 @ 000002229e3a31c0] Progressive Segmented Frame mode: not supported (yet)
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, asf, from 'wmvfile.wmv':
Duration: 00:01:27.79, start: 0.000000, bitrate: 756 kb/s
Stream #0:0: Video: vc1 (WVC1 / 0x31435657), none, 1280x720, 1k tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 64 kb/s
[vc1 @ 000002229e42eb00] Progressive Segmented Frame mode: not supported (yet)
Stream mapping:
Stream #0:0 -> #0:0 (vc1 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (wmav2 (native) -> aac (native))
Error while opening decoder for input stream #0:0 : Operation not permitted
答案1
从这个问题,如果您使用 Nvidia Docker,则必须将以下内容添加到 Dockerfile 中:
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES video,compute,utility
它解决了我的问题。