[FFmpeg-user] Conform framerate with ffmpeg

Carles Vila cvilad at gmail.com
Tue May 19 19:06:25 CEST 2015


On 16 May 2015 at 10:24, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Reuben Martin <reuben.m <at> gmail.com> writes:
>
> > On Friday, May 15, 2015 02:42:06 PM Carl Eugen Hoyos wrote:
> > > Carles Vila <cvilad <at> gmail.com> writes:
> > > > 2. Is there a way to conform a ProRes file
> > > > directly with ffmpeg? All audio channels playback
> > > > sample rate should also be modified accordingly.
> > >
> > > How is that possible without transcoding?
> > >
> > Just a guess, it might have a flag set somewhere to
> > indicate pull up or pull down for the audio sampling rate.
>
> Allow me to rephrase:
> You cannot change the audio playback sample rate without
> reencoding.
>
> There is an input option -r that should allow changing
> the video speed, it does not always work though.
> Please test and report back.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


Hi, here are some of my findings regarding frame rate conforming.
Please find below 2 links with video samples. I created the original at 24
fps from scratch and then I used Apple Cinema tools to create the conformed
25 fps version.
As you can see, the 25 fps version has the same exact frames but shorter
duration. That's what I would like to achieve with ffmpeg. Additionally the
sample rate of the conformed version has been pulled up to 50.000 kHz
(=48.000x(25/24)) to keep audio in sync, but I can assure no transcoding is
made in this operation, it takes fractions of a second to modify the header
of the file.
I believe this is a feature of the Quicktime structure to be able to modify
these values in the header, btw. the operation of conforming in Cinema
Tools is only possible with intra-frame codecs like Prores.
Thanks for your insight wether this could be possible to do with ffmpeg. If
audio is a problem, I could afford to skip it completely and keep only the
video stream (-an)


Here is the information ffmpeg gives about both files

++++++++++++++++++++++++++

$ ffmpeg -i* original+24fps.mov*
ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 28 2014 17:39:46 with Apple LLVM version 5.1
(clang-503.0.40) (based on LLVM 3.4svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.4.2 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang
--host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac
--enable-libmp3lame --enable-libxvid --enable-libfreetype
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc
--enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger
--enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg
--extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'original+24fps.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2015-05-16 22:46:55
  *Duration: 00:00:04.17,* start: 0.000000, bitrate: 23585 kb/s
    Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le,
1920x1080, 20475 kb/s, SAR 1:1 DAR 16:9, *24 fps, 24 tbr, 24 tbn, 24 tbc
(default)*
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
      encoder         : Apple ProRes 422 HQ
      timecode        : 01:00:00:00
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), *48000 Hz,* 1
channels, s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1
channels, s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1
channels, s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1
channels, s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:5(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:47:59
      handler_name    : Apple Alias Data Handler
      timecode        : 01:00:00:00

+++++++++++++++++++++++++++++++++++++

$ ffmpeg -i *Conformed_24_to_25.mov *
ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 28 2014 17:39:46 with Apple LLVM version 5.1
(clang-503.0.40) (based on LLVM 3.4svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.4.2 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang
--host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac
--enable-libmp3lame --enable-libxvid --enable-libfreetype
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc
--enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger
--enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg
--extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Guessed Channel Layout for  Input Stream #0.0 : mono
Guessed Channel Layout for  Input Stream #0.1 : mono
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 'Conformed_24_to_25.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2015-05-16 22:46:55
    timecode        : 01:00:00:00
  *Duration: 00:00:04.00*, start: 0.000000, bitrate: 24567 kb/s
    Stream #0:0(eng): Audio: pcm_s16le (sowt / 0x74776F73), *50000 Hz*, 1
channels, s16, 800 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 50000 Hz, 1
channels, s16, 800 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 50000 Hz, 1
channels, s16, 800 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 50000 Hz, 1
channels, s16, 800 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:46:55
      handler_name    : Apple Alias Data Handler
    Stream #0:4(eng): Video: prores (apch / 0x68637061), yuv422p10le,
1920x1080, 21328 kb/s, SAR 1:1 DAR 16:9, *25 fps, 25 tbr, 2500 tbn, 2500
tbc *(default)
    Metadata:
      creation_time   : 2015-05-16 22:51:23
      handler_name    : Apple Alias Data Handler
      encoder         : Apple ProRes 422 HQ
      timecode        : 01:00:00:00
    Stream #0:5(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2015-05-16 22:51:23
      handler_name    : Apple Alias Data Handler
      timecode        : 01:00:00:00

++++++++++++++++++++++++++++++++

link to the samples:
https://www.dropbox.com/sh/cavkkgbvjkoh7fy/AABSTFcPJ4rdh8LZUZTG0BM1a?dl=0


More information about the ffmpeg-user mailing list