Opened 9 months ago

#9668 new defect

genpts is not working with multiple RTSP inputs

Reported by: Daniele Orlandi Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Daniele Orlandi Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

How to reproduce:

% ffmpeg -hide_banner -loglevel warning -nostats -nostdin -progress pipe:4 -thread_queue_size 12
 -rtsp_transport tcp
 -fflags +genpts -i rtsp://videosrc
 -fflags +genpts -i rtsp://audiosrc
 -vcodec copy
 -acodec copy
 -f hls -hls_time 10 -hls_list_size 200
 -hls_segment_filename /var/www/hls/cam_ptz/1080/\%06d.ts
 -hls_flags omit_endlist+temp_file
 -hls_start_number_source epoch
 /var/www/hls/cam_ptz/1080/index.m3u8

Output:

[hls @ 0x561c2ed5a3c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[rtsp @ 0x561c2ebdd100] Thread message queue blocking; consider raising the thread_queue_size option (current value: 12)
[mpegts @ 0x561c2ee68100] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0x561c2ee68100] first pts and dts value must be set
av_interleaved_write_frame(): Invalid data found when processing input

If I understand correctly the issue comes from the RTSP sources not sending RTCP frames thus absolute timestamps cannot be generated. Would ffmpeg be able to generate PTS if the source had sent RTCP frames?

Anyway, I understand that video and audio will not be synced, however it would be nice if ffmpeg could generate PTS anyway for the transport stream.

It used to be somewhat working with ffmpeg 4.4.1 but now it does not work anymore with ffmpeg 5.0 and git master .

Change History (0)

Note: See TracTickets for help on using tickets.