Opened 9 years ago

Closed 7 years ago

#4870 closed defect (fixed)

framerate filter duplicates last frame when converting 25 to 24 fps

Reported by: rmk Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: framerate
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Execute the command line below and look at the last two frames of the output and its duration (is one frame too many, because it should be 1s as the input (24 frames width duration 1/24)).

Command line (adjust the font file path for your os) and output:

ffmpeg -f lavfi -i testsrc=640x480:d=1:r=25 -vcodec mpeg4 -vf drawtext="fontfile=/System/Library/Fonts/Courier.dfont:text='Frame %{n}':x=85:y=H/2+lh/2+descent-ascent:fontsize=48:fontcolor=black",framerate=fps=24 -q:v 1 -y 25_to_24_1s.mov
ffmpeg version git-2015-09-15-f6ef8f2 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
  configuration: --enable-shared --disable-static --disable-doc --disable-devices --enable-indev=lavfi --prefix=/Users/teamcity/buildAgent/work/3b1b1b1b725f407e/build/ffmpeg --extra-cflags=-I/Users/teamcity/buildAgent/work/3b1b1b1b725f407e/build/libmp3lame/include/ --extra-ldflags=-L/Users/teamcity/buildAgent/work/3b1b1b1b725f407e/build/libmp3lame/lib/ --extra-ldflags='-Wl,-rpath,@loader_path/../lib' --enable-libmp3lame --enable-libopenh264 --enable-libfreetype
  libavutil      55.  2.100 / 55.  2.100
  libavcodec     57.  1.100 / 57.  1.100
  libavformat    57.  0.100 / 57.  0.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6.  3.100 /  6.  3.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
Input #0, lavfi, from 'testsrc=640x480:d=1:r=25':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[Parsed_framerate_1 @ 0x101f03640] time base:1/25 -> 1/600 exact:1
[Parsed_framerate_1 @ 0x101f03640] fps -> fps:24/1 scene score:7.000000 interpolate start:15 end:240
Output #0, mov, to '25_to_24_1s.mov':
  Metadata:
    encoder         : Lavf57.0.100
    Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 24 fps, 12288 tbn, 24 tbc
    Metadata:
      encoder         : Lavc57.1.100 mpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=   25 fps=0.0 q=1.0 Lsize=     100kB time=00:00:01.04 bitrate= 787.9kbits/s    
video:99kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.922774%

Change History (4)

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavfilter
Keywords: fps added
Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 9 years ago

Keywords: framerate added; fps removed

comment:4 by Marton Balint, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.