Opened 8 years ago

Closed 8 years ago

#5414 closed defect (fixed)

Frame rate reduction using framestep filter fails

Reported by: stefan.moro Owned by:
Priority: important Component: avformat
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,

This seems to be a regression issue since it works perfectly fine in 3.0.1. In ffmpeg 3.0.1 a version with half the frame rate is created and it plays well in ffplay.

With the latest nightly build of ffmpeg I get teh following error(s):

root@53c91a82c168:# ffmpeg -v debug -y -i file.mov -map 0:v:0 -filter:v "framestep=step=2" -codec:v libx264 -f mp4 -movflags +faststart /tmp/ncdsncj
ffmpeg version N-79258-g3a9611d Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
  configuration: --prefix=/tmp/tmp_build_dir --pkg-config-flags=--static --extra-cflags=-I/tmp/tmp_build_dir/include --extra-ldflags=-L/tmp/tmp_build_dir/lib --bindir=/root/bin --enable-gpl --enable-nonfree --enable-libx264 --enable-libsoxr --enable-libfdk-aac
  libavutil      55. 20.100 / 55. 20.100
  libavcodec     57. 34.100 / 57. 34.100
  libavformat    57. 31.100 / 57. 31.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 41.100 /  6. 41.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-i' ... matched as input file with argument 'file.mov'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v:0'.
Reading option '-filter:v' ... matched as option 'filter' (set stream filtergraph) with argument 'framestep=step=2'.
Reading option '-codec:v' ... matched as option 'codec' (codec name) with argument 'libx264'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument '+faststart'.
Reading option '/tmp/ncdsncj' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file file.mov.
Successfully parsed a group of options.
Opening an input file: file.mov.
[file @ 0x2310c00] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2310500] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2310500] ISO: File Type Major Brand: qt  
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2310500] Unknown dref type 0x08206c7275 size 12
    Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2310500] Before avformat_find_stream_info() pos: 9108458 bytes read:74370 seeks:3
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2310500] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2310500] After avformat_find_stream_info() pos: 6401 bytes read:107138 seeks:4 frames:3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf56.36.100
  Duration: 00:00:08.01, start: 0.000000, bitrate: 9099 kb/s
    Stream #0:0(eng), 1, 1/30000: Video: h264 (Main), 2 reference frames (avc1 / 0x31637661), yuv420p(tv, bt709, left), 1920x1080 (1920x1088), 1/60000, 8966 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : H.264
      timecode        : 00:21:42;27
    Stream #0:1(eng), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 123 kb/s (default)
    Metadata:
      handler_name    : DataHandler
    Stream #0:2(eng), 1, 1/30000: Data: none (tmcd / 0x64636D74), 1/30, 0 kb/s
    Metadata:
      handler_name    : DataHandler
      timecode        : 00:21:42;27
Successfully opened the file.
Parsing a group of options: output file /tmp/ncdsncj.
Applying option map (set input stream mapping) with argument 0:v:0.
Applying option filter:v (set stream filtergraph) with argument framestep=step=2.
Applying option codec:v (codec name) with argument libx264.
Applying option f (force format) with argument mp4.
Successfully parsed a group of options.
Opening an output file: /tmp/ncdsncj.
[file @ 0x2340780] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[Parsed_framestep_0 @ 0x2340140] Setting 'step' to value '2'
[graph 0 input from stream 0:0 @ 0x233fa40] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0x233fa40] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x233fa40] Setting 'time_base' to value '1/30000'
[graph 0 input from stream 0:0 @ 0x233fa40] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x233fa40] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x233fa40] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0x233fa40] w:1920 h:1080 pixfmt:yuv420p tb:1/30000 fr:30000/1001 sar:0/1 sws_param:flags=2
[format @ 0x234fea0] compat: called with args=[yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21]
[format @ 0x234fea0] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21'
[AVFilterGraph @ 0x2340400] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[Parsed_framestep_0 @ 0x2340140] step:2 frame_rate:30000/1001(29.970030) -> frame_rate:15000/1001(14.985015)
[libx264 @ 0x234f380] using mv_range_thread = 88
[libx264 @ 0x234f380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x234f380] profile High, level 4.0
[libx264 @ 0x234f380] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=6 lookahead_threads=1 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=14 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x233e200] timecode: tbc=15000/1001 invalid, fallback on 15000/1001
[mp4 @ 0x233e200] Drop frame is only allowed with 30000/1001 or 60000/1001 FPS
Output #0, mp4, to '/tmp/ncdsncj':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf57.31.100
    Stream #0:0(eng), 0, 1/15000: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p(left), 1920x1080, 1001/15000, q=-1--1, 14.99 fps, 15k tbn, 14.99 tbc (default)
    Metadata:
      handler_name    : DataHandler
      timecode        : 00:21:42;27
      encoder         : Lavc57.34.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[AVIOContext @ 0x2340820] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2318f60] Statistics: 107138 bytes read, 4 seeks

Sample uploaded to ftp named framestep_fails.mov

Change History (2)

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: undeterminedavformat
Keywords: mov added
Priority: normalimportant
Reproduced by developer: set
Status: newopen

From a user's perspective, this is a regression since b4dcd351

comment:2 by Michael Niedermayer, 8 years ago

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