I want to decode the mov file with ffmpeg

Asked 1 years ago, Updated 1 years ago, 112 views

I would like to decode the mov file using ffmpeg in CentOS7 and convert it to mp4 file.
I entered the following command, but an error occurred and I cannot execute it.
I don't know how to deal with it.Do I have to add something to the ffmpeg build option?

Please let me know if you know.

#ffmpeg-itest.mov-vcodec copy-acodec copy out.mp4
ffmpeg version n3.1.8 Copyright (c) 2000-2017 the FFmpeg developers
  build 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
  libpostproc54.0.100/54.0.100
Guided Channel Layout for Input Stream #0.1—hexadecagonal
Input#0,mov,mp4,m4a,3gp,3g2,mj2,from 'test.mov':
  Metadata:
    creation_time:2017-02-1209:33:36
  Duration: 02:07:29.07, start: 0.000000, bitrate: 63734 kb/s
    Stream#0:0(eng):Video:pores(apco/0x6F637061), yuv422p10le(bt709), 1920x1080,45269 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30ktbn, 30ktbc(default)
    Metadata:
      creation_time:2017-02-1209:33:36
      handler_name —Apple Alias Data Handler
      encoder:Apple ProRes422 Proxy
    Stream# 0-1(eng): Audio: pcm_s24le(lpcm/0x6D63706C), 48000 Hz, 16 channels, s32(24bit), 18432 kb/s(default)
    Metadata:
      creation_time:2017-02-1209:33:36
      handler_name —Apple Alias Data Handler
[mp4@0x902a40] Using AVStream.codec to pass codec parameters to muxers is precluded, use AVStream.codecpar installed.
    Last message repeated 1 times
[mp4@0x902a40] Could not find tag for codec processes 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, 30ktbn, 30ktbc(default)
    Metadata:
      creation_time:2017-02-1209:33:36
      handler_name —Apple Alias Data Handler
      encoder:Apple ProRes422 Proxy
    Stream# 0-1(eng): Audio: pcm_s24le(lpcm/0x6D63706C), 48000Hz, hexadecagonal(24bit), 18432kb/s(default)
    Metadata:
      creation_time:2017-02-1209: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

From the answers you gave me again

#ffmpeg-itest.mov test.mp4

was run.

#ffmpeg-itest.mov test.mp4
ffmpeg version n3.1.8 Copyright (c) 2000-2017 the FFmpeg developers
  build 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
  libpostproc54.0.100/54.0.100
Guided Channel Layout for Input Stream #0.1—hexadecagonal
Input#0,mov,mp4,m4a,3gp,3g2,mj2,from 'test.mov':
  Metadata:
    creation_time:2017-02-1209:33:36
  Duration: 02:07:29.07, start: 0.000000, bitrate: 63734 kb/s
    Stream#0:0(eng):Video:pores(apco/0x6F637061), yuv422p10le(bt709), 1920x1080,45269 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30ktbn, 30ktbc(default)
    Metadata:
      creation_time:2017-02-1209:33:36
      handler_name —Apple Alias Data Handler
      encoder:Apple ProRes422 Proxy
    Stream# 0-1(eng): Audio: pcm_s24le(lpcm/0x6D63706C), 48000 Hz, 16 channels, s32(24bit), 18432 kb/s(default)
    Metadata:
      creation_time:2017-02-1209:33:36
      handler_name —Apple Alias Data Handler
No pixel format specified, yuv422p for H.264 encoding chosen.
Use-pix_fmtyuv420p 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:28-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 screen_crack=40 record=0 record=40 record
[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-1209:33:36
      handler_name —Apple Alias Data Handler
      encoder —Lavc 57.48.101 libx264
    Side data:
      cpb:bitrate max/min/avg:0/0 buffer size:0 vbv_delay:-1
    Stream#0:1(eng): Unknown: none(default)
    Metadata:
      creation_time:2017-02-1209:33:36
      handler_name —Apple Alias Data Handler
      encoder —Lavc 57.48.101 aac
Stream mapping:
  Stream #0:0->#0:0 (preres(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

The result was not successful.

#ffmpeg-itest.mov-ac2test.mp4

You can now use the .

ffmpeg mov

2022-09-30 21:26

1 Answers

ffmpeg-itest.mov-vcodec copy-acodec copy out.mp4

The above command specifies "simple copy of the video codec" and "simple copy of the audio codec" extracted from the input file (MOV format) and multiplexed into the output file (MP4 format).

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:pores(apco/0x6F637061), yuv422p10le(bt709), 1920x1080,45269 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30ktbn, 30ktbc(default)
    Stream# 0-1(eng): Audio: pcm_s24le(lpcm/0x6D63706C), 48000 Hz, 16 channels, s32(24bit), 18432 kb/s(default)
[mp4@0x902a40] Could not find tag for codec processes in stream #0, codec not currently supported in container

As the above message indicates, the MP4 media container format specified in the output does not support the video codec prores (Apple ProRes422 Proxy).

If you simply want to convert to MP4 format, I think the following command is sufficient.In this case, the preres video codec is decoded once and automatically encoded by the H.264 video codec.

ffmpeg-itest.mov out.mp4


2022-09-30 21:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.