Opened 7 years ago

Closed 4 years ago

#1715 closed defect (fixed)

Wrong timestamps for h264 in mpegts

Reported by: cehoyos Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: mpegts h264
Cc: buhman Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

(Originally reported in ticket #403, maybe related to ticket #424).
I will provide a link to a very long transport stream containing h264 video and aac audio.
ffplay, ffmpeg and mplayer -demuxer lavf play / transcode the sample with wrong video speed (video is too slow), works fine with mplayer -demuxer mpegts.

$ ffplay -analyzeduration 2G CAPTURE-HD-RM164_2012-08-20_13_21_28.ts
ffplay version N-44127-gb0dc428 Copyright (c) 2003-2012 the FFmpeg developers
  built on Sep  3 2012 18:04:33 with gcc 4.5.3 (GCC)
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32'
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 55.100 / 54. 55.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 15.102 /  3. 15.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
[mpegts @ 0x8edfd80] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8edfd80] Could not find codec parameters for stream 2 (Unknown: none ([6][0][0][0] / 0x0006)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0x8ee5060] start time is not set in estimate_timings_from_pts
Input #0, mpegts, from 'CAPTURE-HD-RM164_2012-08-20_13_21_28.ts':
  Duration: 01:29:14.08, start: 599.983333, bitrate: 2281 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1012]: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, s16, 119 kb/s
    Stream #0:2[0x1013]: Unknown: none ([6][0][0][0] / 0x0006)
Frame changed from size:0x0 to size:1280x720KB vq=   20KB sq=    0B f=0/0
 601.07 A-V:-599.928 fd=   0 aq=    1KB vq=  183KB sq=    0B f=0/0   =0/0
$ ffmpeg -analyzeduration 2G -i CAPTURE-HD-RM164_2012-08-20_13_21_28.ts -qscale 2 -t 30 out.avi
ffmpeg version N-44127-gb0dc428 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep  3 2012 18:04:33 with gcc 4.5.3 (GCC)
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32'
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 55.100 / 54. 55.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 15.102 /  3. 15.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
[mpegts @ 0x8e765c0] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8e765c0] Could not find codec parameters for stream 2 (Unknown: none ([6][0][0][0] / 0x0006)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0x8e7b320] start time is not set in estimate_timings_from_pts
Input #0, mpegts, from 'CAPTURE-HD-RM164_2012-08-20_13_21_28.ts':
  Duration: 01:29:27.29, start: 599.983333, bitrate: 2281 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1012]: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, s16, 119 kb/s
    Stream #0:2[0x1013]: Unknown: none ([6][0][0][0] / 0x0006)
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf54.25.104
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, flt, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (aac -> ac3)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 Lsize=     735kB time=00:00:30.01 bitrate= 200.7kbits/s
video:0kB audio:704kB subtitle:0 global headers:0kB muxing overhead 4.510928%

Change History (3)

comment:1 Changed 7 years ago by cehoyos

  • Cc buhman added
  • Reproduced by developer set
  • Status changed from new to open

comment:2 in reply to: ↑ description Changed 7 years ago by cehoyos

Replying to cehoyos:

I will provide a link to a very long transport stream

The sample was cut to 10MB.

comment:3 Changed 4 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Fixed by Michael in 1e5271a9fd6ddcceb083f2185a4bbd8d44c9a813 (FFmpeg 2.1), duplicate of ticket #424.

Note: See TracTickets for help on using tickets.