[FFmpeg-devel] Incorrect PTS/DTS timestamp?

Dethof, Alexander Martin alexander.m.dethof at campus.tu-berlin.de
Fri Oct 23 16:20:34 CEST 2015


Dear ffmpeg developers,


I reference to the question I previously posted in the user mailing list (q.v. http://ffmpeg.org/pipermail/ffmpeg-user/2015-October/028879.html). The main problem is that when I try to stream a HEVC video bitstream with FFMPEG in the rtp_mpegts format it is always encapsuled in a MP4 container. Further more on capturing the network traffic I can regenerate a TS file which consists of the same DTS and PTS timestamps for each frame, although they should be different for P- and B-frames. Using the bitstream filter "-bsf:v hev_mp4toannexb" did not change any of these problems. Also remuxing to MOV could not solve the issue (http://ffmpeg.org/pipermail/ffmpeg-user/2015-October/028903.html). It seems like ffmpeg has timestamp problems also in HEVC (see console output beneath).


Thus I started to investigate the code and wanted to ask if anybody of you works on a similar problem or is experienced with this issue? I could find the method "guess_correct_pts" in the "libavcodec/utils.c" and analyze a bit its influence. Is there a documentation or something similar provided to get better into the code? It would help me a lot to get a bit through all these different data structures and their dependencies.


Thanks in advance!


Best regards,

Alex

$> ffmpeg -i sintel.hevc -c:v copy -f rtp_mpegts rtp://127.0.0.1:1234
ffmpeg version N-76159-gda43e9e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --prefix=/home/alexanderdethof/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags=-I/home/alexanderdethof/ffmpeg_build/include
--extra-ldflags=-L/home/alexanderdethof/ffmpeg_build/lib
--bindir=/home/alexanderdethof/bin --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libx265 --enable-nonfree
  libavutil      55.  4.100 / 55.  4.100
  libavcodec     57.  8.100 / 57.  8.100
  libavformat    57. 10.101 / 57. 10.101
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 12.100 /  6. 12.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, hevc, from 'sintel.hevc':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 24 fps, 24 tbr,
1200k tbn, 24 tbc
Output #0, rtp_mpegts, to 'rtp://127.0.0.1:1234':
  Metadata:
    encoder         : Lavf57.10.101
    Stream #0:0: Video: hevc, yuv420p, 1920x1080, q=2-31, 24 fps, 24 tbr,
90k tbn, 24 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x35cc680] first pts value must be set
av_interleaved_write_frame(): Invalid data found when processing input
frame=    1 fps=0.0 q=-1.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A
video:55kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Conversion failed!


More information about the ffmpeg-devel mailing list