#11268(undetermined:new): -use_wallclock_as_timestamps 1 not working with piped input
#11268: -use_wallclock_as_timestamps 1 not working with piped input -------------------------------------+------------------------------------- Reporter: Wes Castro | Type: defect Status: new | Priority: normal Component: | Version: undetermined | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- 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 -- Ticket URL: <https://trac.ffmpeg.org/ticket/11268> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11268: [Regression] "-use_wallclock_as_timestamps" ineffective -------------------------------------+---------------------------------- Reporter: Wes Castro | Owner: (none) Type: defect | Status: new Priority: normal | Component: ffmpeg Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+---------------------------------- Changes (by MasterQuestionable): * cc: MasterQuestionable (added) * component: undetermined => ffmpeg * summary: -use_wallclock_as_timestamps 1 not working with piped input => [Regression] "-use_wallclock_as_timestamps" ineffective Comment: ͏ See also: ͏ https://ffmpeg.org/ffmpeg-formats.html#Format-Options ͏ https://www.google.com/search?hl=en&gl=ca&num=10&q=wallclock+time&nfpr=1 ͏ "-use_wallclock_as_timestamps" mostly undocumented... ͏ And search for "wallclock" may give funny results. \\ \\ ͏ I guess it may apply to random formats. ͏ And probably without Pipe. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11268#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11268: [Regression] "-use_wallclock_as_timestamps" ineffective ------------------------------------+---------------------------------- Reporter: Wes Castro | Owner: (none) Type: defect | Status: closed Priority: important | Component: ffmpeg Version: git-master | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 1 | ------------------------------------+---------------------------------- Changes (by James): * analyzed: 0 => 1 * priority: normal => important * reproduced: 0 => 1 * resolution: => fixed * status: new => closed * version: unspecified => git-master Comment: Should be fixed in 1787fade209b1ecbd4b911c9d77a52bcdec13fa6 for master, and backported to release/7.1, release/7.0 and release/6.1 branches. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11268#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11268: [Regression] "-use_wallclock_as_timestamps" ineffective ------------------------------------+---------------------------------- Reporter: Wes Castro | Owner: (none) Type: defect | Status: closed Priority: important | Component: ffmpeg Version: git-master | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 1 | ------------------------------------+---------------------------------- Comment (by MasterQuestionable): ͏ The peculiar writing for boolean interpretation coercion: ͏ `!!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS)` ͏ etc. ͏ . ͏ Probably would be better rewritten as: ͏ [ ↓ Needs "`#include <stdbool.h>`". ] ͏ `(bool) ( d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS )` ͏ Also "`!!`" on already boolean ("is_unreliable") would be meaningless. ͏ (even somewhat code obfuscation) \\ ͏ Code style recommendation: ͏ `!!is_unreliable` ͏ `!!( ist->fix_sub_duration )` ͏ `(bool) is_unreliable` ͏ `(bool) ( ... )` -- Ticket URL: <https://trac.ffmpeg.org/ticket/11268#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg