Opened 11 years ago

Closed 11 years ago

#2018 closed defect (fixed)

Wrong duration of mpeg-ps file

Reported by: zoominla Owned by:
Priority: minor Component: undetermined
Version: git-master Keywords: mpegps mpeg2video
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Reproduce command: ffmpeg.exe -i test.mpg
FFmpeg version: current
Output of ffmpeg:
[mpeg @ 01BF9760] max_analyze_duration 5000000 reached at 5016000
Input #0, mpeg, from 'F:\video\mtv\F0155301553685.mpg':

Duration: 22:19:26.97, start: 0.213000, bitrate: 14 kb/s

Stream #0:0[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
Stream #0:1[0x1c1]: Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
Stream #0:2[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR

4:3], 4000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
At least one output file must be specified

Problem: ffmpeg detected duration is 22:19:26.97, in fact it's 4min 17s. Mediainfo and players(VLC) detect it correctly.

Change History (5)

comment:1 by Carl Eugen Hoyos, 11 years ago

Keywords: mpeg added

Please add the complete, uncut console output and please provide a sample.

comment:2 by Carl Eugen Hoyos, 11 years ago

Keywords: mpegps added; mpeg removed

comment:3 by Carl Eugen Hoyos, 11 years ago

Keywords: mpeg2video added

comment:4 by Carl Eugen Hoyos, 11 years ago

Priority: normalminor
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Sample uploaded to http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2018/
Duration is detected correctly if the last 4k are cut from the sample, this does not change the output of -f framecrc.

$ ffmpeg -i DreamComeTrue.mpg -f null -
ffmpeg version N-47767-g0f23634 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 12 2012 15:10:59 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 79.102 / 54. 79.102
  libavformat    54. 49.101 / 54. 49.101
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 26.102 /  3. 26.102
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg @ 0x1623280] max_analyze_duration 5000000 reached at 5016000
Input #0, mpeg, from 'DreamComeTrue.mpg':
  Duration: 22:19:26.98, start: 0.213000, bitrate: 14 kb/s
    Stream #0:0[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:1[0x1c1]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:2[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf54.49.101
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:2 -> #0:0 (mpeg2video -> rawvideo)
  Stream #0:0 -> #0:1 (mp2 -> pcm_s16le)
Press [q] to stop, [?] for help
[null @ 0x162ad80] Encoder did not produce proper pts, making some up.
00 motion_type at 40 200.0 size=       0kB time=00:03:38.06 bitrate=   0.0kbits/s
[mpeg2video @ 0x1654c40] Warning MVs not available
[mpeg2video @ 0x1654c40] concealing 450 DC, 450 AC, 450 MV errors in P frame
frame= 7712 fps=2586 q=0.0 Lsize=       0kB time=00:04:17.32 bitrate=   0.0kbits/s dup=2 drop=0
video:723kB audio:48218kB subtitle:0 global headers:0kB muxing overhead -100.000000%

comment:5 by Michael Niedermayer, 11 years ago

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