

CentOS7でffmpegを使ってmovファイルをデコードしてmp4ファイルに変換したいと思っています。  
以下の通りコマンドを入力しましたがエラーが出て実行できません。  
何が原因で対処方法がわかりません。ffmpegのビルドオプションに何かつけなければいけないのでしょうか？

ご存知の方はご教示お願いします。

[code]

    # ffmpeg -i test.mov -vcodec copy -acodec copy out.mp4
    ffmpeg version n3.1.8 Copyright (c) 2000-2017 the FFmpeg developers
      built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
      configuration: --enable-pic --enable-gpl --disable-stripping --enable-shared --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx265 --enable-libzvbi --enable-openal --enable-opengl --enable-libopenh264 --enable-libx264 --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-libxcb --enable-ffserver
      libavutil      55. 28.100 / 55. 28.100
      libavcodec     57. 48.101 / 57. 48.101
      libavformat    57. 41.100 / 57. 41.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 47.100 /  6. 47.100
      libavresample   3.  0.  0 /  3.  0.  0
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  1.100 /  2.  1.100
      libpostproc    54.  0.100 / 54.  0.100
    Guessed Channel Layout for Input Stream #0.1 : hexadecagonal
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
      Metadata:
        creation_time   : 2017-02-12 09:33:36
      Duration: 02:07:29.07, start: 0.000000, bitrate: 63734 kb/s
        Stream #0:0(eng): Video: prores (apco / 0x6F637061), yuv422p10le(bt709), 1920x1080, 45269 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
          encoder         : Apple ProRes 422 Proxy
        Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
    [mp4 @ 0x902a40] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
        Last message repeated 1 times
    [mp4 @ 0x902a40] Could not find tag for codec prores in stream #0, codec not currently supported in container
    Output #0, mp4, to 'out.mp4':
      Metadata:
        encoder         : Lavf57.41.100
        Stream #0:0(eng): Video: prores (apco / 0x6F637061), yuv422p10le(bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 45269 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
          encoder         : Apple ProRes 422 Proxy
        Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, hexadecagonal (24 bit), 18432 kb/s (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (copy)
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    
[/code]

またいただいた回答より

[code]

    # ffmpeg -i test.mov test.mp4
    
[/code]

を実行しました。

[code]

    # ffmpeg -i test.mov test.mp4
    ffmpeg version n3.1.8 Copyright (c) 2000-2017 the FFmpeg developers
      built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
      configuration: --enable-pic --enable-gpl --disable-stripping --enable-shared --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx265 --enable-libzvbi --enable-openal --enable-opengl --enable-libopenh264 --enable-libx264 --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-libxcb --enable-ffserver
      libavutil      55. 28.100 / 55. 28.100
      libavcodec     57. 48.101 / 57. 48.101
      libavformat    57. 41.100 / 57. 41.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 47.100 /  6. 47.100
      libavresample   3.  0.  0 /  3.  0.  0
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  1.100 /  2.  1.100
      libpostproc    54.  0.100 / 54.  0.100
    Guessed Channel Layout for Input Stream #0.1 : hexadecagonal
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
      Metadata:
        creation_time   : 2017-02-12 09:33:36
      Duration: 02:07:29.07, start: 0.000000, bitrate: 63734 kb/s
        Stream #0:0(eng): Video: prores (apco / 0x6F637061), yuv422p10le(bt709), 1920x1080, 45269 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
          encoder         : Apple ProRes 422 Proxy
        Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0xf56160] using SAR=1/1
    [libx264 @ 0xf56160] using cpu capabilities: none!
    [libx264 @ 0xf56160] profile High 4:2:2, level 4.0, 4:2:2 8-bit
    [libx264 @ 0xf56160] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [aac @ 0xf56bc0] Unsupported number of channels: 16
    Output #0, mp4, to 'test.mp4':
        Stream #0:0(eng): Unknown: none (libx264), SAR 1:1 DAR 0:0 (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
          encoder         : Lavc57.48.101 libx264
        Side data:
          cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
        Stream #0:1(eng): Unknown: none (default)
        Metadata:
          creation_time   : 2017-02-12 09:33:36
          handler_name    : Apple Alias Data Handler
          encoder         : Lavc57.48.101 aac
    Stream mapping:
      Stream #0:0 -> #0:0 (prores (native) -> h264 (libx264))
      Stream #0:1 -> #0:1 (pcm_s24le (native) -> aac (native))
    Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
    
[/code]

という結果でできませんでした。

[code]

    # ffmpeg -i test.mov -ac 2 test.mp4
    
[/code]

でできるようになりました。


CC BY-SA 3.0
2017-07-09T14:20:31.140
36225
2017-07-17T15:59:08.350
2017-07-17T15:59:08.350
8593
8593
question
ffmpeg mov
ffmpegでmovファイルをデコードしたい


>
[code]

>     ffmpeg -i test.mov -vcodec copy -acodec copy out.mp4
>  
[/code]

上記コマンドは、入力ファイル(MOV形式)から抽出した「映像コーデックを単純コピー」「音声コーデックを単純コピー」し、出力ファイル(MP4形式)に多重化せよという指定です。

>
[code]

>     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
>       Duration: 02:07:29.07, start: 0.000000, bitrate: 63734 kb/s
>         Stream #0:0(eng): Video: prores (apco / 0x6F637061),
> yuv422p10le(bt709), 1920x1080, 45269 kb/s, SAR 1:1 DAR 16:9, 29.97 fps,
> 29.97 tbr, 30k tbn, 30k tbc (default)
>         Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16
> channels, s32 (24 bit), 18432 kb/s (default)
>     [mp4 @ 0x902a40] Could not find tag for codec prores in stream #0, codec
> not currently supported in container
>  
[/code]

上記メッセージが示すとおり、出力に指定しているMP4メディアコンテナ形式では、映像コーデック prores （Apple ProRes 422
Proxy）をサポートしません。

* * *

単にMP4形式に変換したいだけであれば、下記コマンドで十分かと思います。この場合、一度prores 映像コーデックからデコード処理が行われ、自動的に
H.264 映像コーデックによるエンコード処理が行われます。

[code]

    ffmpeg -i test.mov out.mp4
    
[/code]


CC BY-SA 3.0
2017-07-10T03:20:40.747
36240
2017-07-10T03:20:40.747
49
36225
answer