Opened 2 hours ago
#11268 new defect
-use_wallclock_as_timestamps 1 not working with piped input
Reported by: | Wes Castro | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Wes Castro | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When piping a raw H264 stream to FFmpeg with -use_wallclock_as_timestamps 1
, wallclock times are not used. If the pipe is opened for say 10 seconds, it's expected that the output's duration will be ~10 seconds. Instead it seems to use timing info from the input stream. I didn't test with other types of piped inputs
The issue was introduced in FFmpeg 6.1 and repros on the master branch.
How to reproduce:
ffmpeg -y -f lavfi -i testsrc=duration=1:size=1280x720:rate=30 -f h264 ~/1second.h264 (cat ~/1second.h264; sleep 10; cat ~/1second.h264) | ffmpeg -use_wallclock_as_timestamps 1 -i pipe: -f mp4 ~/test.mp4 -y
Here are the durations reported by FFprobe when using various FFmpeg versions for the second line:
- FFmpeg 6.0: 11.5s
- FFmpeg 6.1: 2.0s
- FFmpeg 7.1: 2.0s
- master branch (08b1bffa49715a9615acc025dfbea252d8409e1f): 2.0s
Note:
See TracTickets
for help on using tickets.