如何使用 FFMPEG 从 Apple PRORES Quicktime 转码 h264_qsv?

问题描述

我正在尝试使用 qsv 将 Apple Prores 444 转码为 H.264,但没有成功。

如果我使用这个命令行:

ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac -pix_fmt qsv chris.mp4

我明白了:

ffmpeg version 4.2.1 copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0,mov,mp4,m4a,3gp,3g2,mj2,from '10minute_Pipeline_Test.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537134592
    compatible_brands: qt  
    creation_time   : 2020-12-19T12:43:38.000000Z
    com.apple.quicktime.author: 
    com.apple.quicktime.comment: 
    com.apple.quicktime.copyright: 
    com.apple.quicktime.description: 
    com.apple.quicktime.director: 
    com.apple.quicktime.genre: 
    com.apple.quicktime.information: 
    com.apple.quicktime.keywords: 
    com.apple.quicktime.producer: 
    com.apple.quicktime.displayname: 
    timecode        : 12:43:37;28
  Duration: 00:10:06.72,start: 0.000000,bitrate: 167429 kb/s
    Stream #0:0(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 1970-01-04T00:49:14.000000Z
      timecode        : 12:43:37;28
    Stream #0:1(eng): Video: prores (Standard) (apcn / 0x6E637061),yuv422p10le(tv,GBR,progressive),1280x720,164985 kb/s,SAR 1:1 DAR 16:9,59.94 fps,59.94 tbr,60k tbn,60k tbc (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:04.000000Z
    Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69),48000 Hz,mono,s32 (24 bit),1152 kb/s (default)
    Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69),1152 kb/s (default)
    Metadata:
      creation_time   : 2003-10-05T11:26:56.000000Z
File 'chris.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:1 -> #0:0 (prores (native) -> h264 (h264_qsv))
  Stream #0:2 -> #0:1 (pcm_s24le (native) -> aac (native))
Press [q] to stop,[?] for help
[h264_qsv @ 0x56265b81a800] Selected ratecontrol mode is unsupported
[h264_qsv @ 0x56265b81a800] Low power mode is unsupported
[h264_qsv @ 0x56265b81a800] Current frame rate is unsupported
[h264_qsv @ 0x56265b81a800] Current picture structure is unsupported
[h264_qsv @ 0x56265b81a800] Current resolution is unsupported
[h264_qsv @ 0x56265b81a800] Current pixel format is unsupported
[h264_qsv @ 0x56265b81a800] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate,rate,width or height
Conversion Failed!
user@NUC:~$ ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac -pix_fmt qsv  chris.mp4
ffmpeg version 4.2.1 copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0,[?] for help
Impossible to convert between the formats supported by the filter 'Parsed_null_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 #0:1
Conversion Failed!

如果我使用:

ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac chris.mp4

我明白了:

ffmpeg version 4.2.1 copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0,[?] for help
Impossible to convert between the formats supported by the filter 'Parsed_null_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 #0:1
Conversion Failed!
user@NUC:~$ ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac  chris.mp4
ffmpeg version 4.2.1 copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0,[?] for help
[h264_qsv @ 0x55b3bb6e8800] Selected ratecontrol mode is unsupported
[h264_qsv @ 0x55b3bb6e8800] Low power mode is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current frame rate is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current picture structure is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current resolution is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current pixel format is unsupported
[h264_qsv @ 0x55b3bb6e8800] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate,width or height
Conversion Failed!

我什么都做不了。我可以毫无问题地转码其他 h264 文件。我似乎无法转码这个 prores 文件

如果有人可以提供帮助,这里是源文件链接,我真的很感激...

https://www.dropbox.com/s/ejrfzad20yzaifm/10minute_Pipeline_Test.mov?dl=1

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)