[FFmpeg-user] Change frame rate without dropping/adding frames

Elliott Balsley elliottbalsley at gmail.com
Mon Sep 8 17:36:01 CEST 2014


Works fine with vanilla WMP. 
(And I wonder which other application should be 
relevant for avi.) 
H.264 AVI does not work in Quicktime, Resolve, Premiere, etc.  I would like to use MOV.  Strange that this conversion works going to AVI, but not going to MP4 or MOV.

So if he is happy with the 2 stage process (or piping avi format out into a second ffmpeg instance stream copying back to mov) then it looks like he has a workflow. 
This piping would accomplish what I need, but I imagine it would be faster if ffmpeg could do it directly.

I also noticed that while this conversion works to decrease the frame rate, it doesn’t work to increase it.  For example, with a source video at 29.97, the following command produces a file at 29.97.

$ ffmpeg -r 60 -i jason.mov -an -vcodec copy -f avi pipe: | ffmpeg -i pipe: -vcodec copy jason60.mov
ffmpeg version 2.3.git-90b2f31ffmpeg version 2.3.git-90b2f31 Copyright (c) 2000-2014 the FFmpeg developers Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 24 2014 23:37:03 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)

  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac
  built on Aug 24 2014 23:37:03 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac
  libavutil      54.  4.100 / 54.  4.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.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
  libavutil      54.  4.100 / 54.  4.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jason.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2013-01-25 00:00:46
    make            : Apple
    make-eng        : Apple
    encoder         : 6.0.1
    encoder-eng     : 6.0.1
    date            : 2013-01-24T18:00:46-0600
    date-eng        : 2013-01-24T18:00:46-0600
    location        : +32.4836-095.5763+156.082/
    location-eng    : +32.4836-095.5763+156.082/
    model           : iPhone 4
    model-eng       : iPhone 4
  Duration: 00:03:48.93, start: 0.000000, bitrate: 10654 kb/s
    Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 10582 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2013-01-25 00:00:46
      handler_name    : Core Media Data Handler
      encoder         : H.264
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
    Metadata:
      creation_time   : 2013-01-25 00:00:46
      handler_name    : Core Media Data Handler
Output #0, avi, to 'pipe:':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    model-eng       : iPhone 4
    make            : Apple
    make-eng        : Apple
    model           : iPhone 4
    ISFT            : Lavf56.1.100
    ICRD            : 2013-01-24T18:00:46-0600
    date-eng        : 2013-01-24T18:00:46-0600
    location        : +32.4836-095.5763+156.082/
    location-eng    : +32.4836-095.5763+156.082/
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 10582 kb/s, 29.97 fps, 60 tbn, 60 tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2013-01-25 00:00:46
      handler_name    : Core Media Data Handler
      encoder         : H.264
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
Input #0, avi, from 'pipe:':
  Metadata:
    date            : 2013-01-24T18:00:46-0600
    encoder         : Lavf56.1.100
  Duration: 4971:01:37.07, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 60 fps, 30 tbr, 60 tbn, 120 tbc
Output #0, mov, to 'jason60.mov':
  Metadata:
    date            : 2013-01-24T18:00:46-0600
    encoder         : Lavf56.1.100
    Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 60 fps, 15360 tbn, 60 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
frame= 6861 fps=0.0 q=-1.0 Lsize=  295859kB time=00:03:48.91 bitrate=10587.6kbits/s
video:295747kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.037867%
frame= 6861 fps=0.0 q=-1.0 Lsize=  295780kB time=00:03:48.91 bitrate=10584.8kbits/s
video:295747kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.011085%


More information about the ffmpeg-user mailing list