[FFmpeg-devel] [PATCH] libavformat/rtpdec_opus: Set duration field on Opus AVPacket

Tristan Matthews tmatth at videolan.org
Tue May 20 21:04:35 EEST 2025


Hi,

On Mon, May 19, 2025 at 8:17 PM Jonathan Baudanza <jon at jonb.org> wrote:
>
> Does anyone have feedback on this?
>
> Here are some steps to reproduce the current issue:
>
> # Start broadcasting
> ffmpeg -re -i input.opus -c:a copy -f rtp -sdp_file stream.sdp  rtp://127.0.0.1:9000
>
> # Start recording (in another terminal)
> ffmpeg -protocol_whitelist file,udp,rtp -i stream.sdp -y -c:a copy output.opus
>
> # Observe that output.opus pts starts at -960
> ffprobe -show_entries packet=pts,duration output.opus | head

This LGTM, I can confirm that the pts now starts from 0 as opposed to
-960 for ogg/opus files (and no change for e.g., mkv files).

Best,
Tristan


More information about the ffmpeg-devel mailing list