Opened 11 years ago

Closed 10 years ago

#2506 closed enhancement (fixed)

Guess output frame rate if input timebase denominator is huge

Reported by: Carl Eugen Hoyos Owned by:
Priority: wish Component: ffmpeg
Version: git-master Keywords: ogg asp videolan
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

(Sample from videolan ticket 8486)
I will upload a sample from a vlc ticket that can be transcoded fine with ffmpeg if a framerate is specified, fails with default framerate:

$ ffmpeg -i File\ 50MB\ DG\ Split\ 206\ Video\ Issue.ogm -qscale 2 out.avi
ffmpeg version N-52542-g5149407 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 28 2013 14:19:06 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 27.101 / 52. 27.101
  libavcodec     55.  6.100 / 55.  6.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 61.101 /  3. 61.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, ogg, from 'File 50MB DG Split 206 Video Issue.ogm':
  Duration: 00:04:41.11, start: 0.000000, bitrate: 1492 kb/s
    Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 576x432, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1(English): Audio: vorbis, 48000 Hz, stereo, fltp, 89 kb/s
    Stream #0:2(Japanese): Audio: vorbis, 48000 Hz, stereo, fltp, 89 kb/s
    Stream #0:3(English): Subtitle: text
Please use -q:a or -q:v, -qscale is ambiguous
[mpeg4 @ 0x3226520] timebase 417083/10000000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535
Output #0, avi, to 'out.avi':
    Stream #0:0: Video: mpeg4, yuv420p, 576x432, q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
    Stream #0:1(English): Audio: ac3, 48000 Hz, stereo, fltp
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
  Stream #0:1 -> #0:1 (vorbis -> ac3)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
$ ffmpeg -i File\ 50MB\ DG\ Split\ 206\ Video\ Issue.ogm -qscale 2 -r 24000/1001 out.avi
ffmpeg version N-52542-g5149407 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 28 2013 14:19:06 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 27.101 / 52. 27.101
  libavcodec     55.  6.100 / 55.  6.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 61.101 /  3. 61.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, ogg, from 'File 50MB DG Split 206 Video Issue.ogm':
  Duration: 00:04:41.11, start: 0.000000, bitrate: 1492 kb/s
    Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 576x432, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1(English): Audio: vorbis, 48000 Hz, stereo, fltp, 89 kb/s
    Stream #0:2(Japanese): Audio: vorbis, 48000 Hz, stereo, fltp, 89 kb/s
    Stream #0:3(English): Subtitle: text
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.3.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 576x432, q=2-31, 200 kb/s, 23.98 tbn, 23.98 tbc
    Stream #0:1(English): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
  Stream #0:1 -> #0:1 (vorbis -> ac3)
Press [q] to stop, [?] for help
frame= 6739 fps=1165 q=2.0 Lsize=   96184kB time=00:04:41.19 bitrate=2802.1kbits/s
video:89217kB audio:6590kB subtitle:0 global headers:0kB muxing overhead 0.393439%

Change History (4)

comment:1 by Carl Eugen Hoyos, 11 years ago

Description: modified (diff)

comment:3 by Carl Eugen Hoyos, 11 years ago

Keywords: asp added; mpeg4 removed

comment:4 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedffmpeg
Resolution: fixed
Status: newclosed

Fixed by Michael in 3734c3ea

Note: See TracTickets for help on using tickets.