1

I have a video in a Quicktime container. This is reported in Ubuntu file properties and in the info from ffprobe:

>ffprobe -show_format test.mov 
...
[FORMAT]
filename=test.mov
nb_streams=1
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=300.066667
size=24226600
bit_rate=645899
probe_score=100
TAG:major_brand=mp42
TAG:minor_version=0
TAG:compatible_brands=mp42mp41isomiso2
TAG:creation_time=2020-09-17T10:31:26.000000Z
TAG:encoder=x264
[/FORMAT]

Converting the container to mp4 gives no error.

>ffmpeg -i test.mov -c copy test.mp4

ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomiso2
    creation_time   : 2020-09-17T10:31:26.000000Z
    encoder         : x264
  Duration: 00:05:00.07, start: 0.000000, bitrate: 645 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p(tv, bt709), 1442x906 [SAR 1:1 DAR 721:453], 645 kb/s, 15 fps, 15 tbr, 1500 tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2020-09-17T10:31:26.000000Z
      handler_name    : VideoHandler
File 'test.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'test.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomiso2
    encoder         : Lavf57.83.100
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p(tv, bt709), 1442x906 [SAR 1:1 DAR 721:453], q=2-31, 645 kb/s, 15 fps, 15 tbr, 12k tbn, 1500 tbc (default)
    Metadata:
      creation_time   : 2020-09-17T10:31:26.000000Z
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 4501 fps=0.0 q=-1.0 Lsize=   23659kB time=00:05:00.00 bitrate= 646.1kbits/s speed=6.04e+03x    
video:23640kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.079859%

But the format does not change. At least Quicktime container is displayed both in Ubuntu file properties and ffprobe:

ffprobe -show_format test.mp4

[FORMAT]
filename=test.mp4
nb_streams=1
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=300.067000
size=24226885
bit_rate=645906
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2avc1mp41
TAG:encoder=Lavf57.83.100
[/FORMAT]

But as you can see listed in the output above of the ffmpeg command the encoder used is changed from mp4 to Lavf57.83.100.

This is my version of ffmpeg

ffmpeg -version
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libavresample   3.  7.  0 /  3.  7.  0
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100
libpostproc    54.  7.100 / 54.  7.100

2 Answers 2

3

MP4 and its family of formats (ISO Base Media) is derived from Apple Quicktime. Since their structure is basically the same, FFmpeg has only one demuxer and muxer for Quicktime and ISO Base Media family of formats. Its full name is QuickTime / MOV as you've noticed.

The way to identify a MOV or MP4 is to look at the major brand.

For your source, it's TAG:major_brand=mp42 which indicates ISO 14496 Part 14 (MP4 v2), not Quicktime, regardless of the extension.

For the generated file, it's TAG:major_brand=isom, which indicates ISO 14496 Part 12 which is ISO Base Media File Format, which is what a regular MP4 should be.

2
  • All always video for casual users is a nightmare. So the original .mov I'm using is in fact an .mp4. To be a Quicktime container it shout have major_brand:qt, is this right? What about the second part of the question about the change in the encoder? I think no re-encoding has been made so I expected no change here. Sep 18, 2020 at 10:10
  • 1
    The encoder tag is a placeholder to identify the creator of the file - doesn't refer to stream compressors. Lavf is libavformat, the part of ffmpeg responsible for containers.
    – Gyan
    Sep 18, 2020 at 10:31
0

Try run

ffmpeg -i test.mov -vcodec copy -acodec copy test.mp4

or alternatively, you can re-encode with best quality

ffmpeg -i test.mov -q:v 0 test.mp4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .