[FFmpeg-devel] [PATCH 0/3] Patch set to delay output live stream

Tao Zhang nowerzt at gmail.com
Tue May 5 05:16:48 EEST 2020


Marton Balint <cus at passwd.hu> 于2020年5月5日周二 上午3:48写道:
>
>
>
> On Sat, 2 May 2020, Tao Zhang wrote:
>
> > Marton Balint <cus at passwd.hu> 于2020年5月2日周六 下午7:05写道:
>
> [...]
>
> >> I see. But you could add an option to the fifo muxer to only write header
> >> when the first packet arrives. This way you will be able to use a
> >> bitstream filter to buffer packets and the fifo muxer will only write
> >> header when the first packet passes through the bitstream filter. Does
> >> this seem OK?
> > It seems OK. If nobody object it, I'm glad to add
> > write_header_on_first_packet option on fifo muxer and create a new
> > bitstream filter which buffers fixed duration packets.
>
> Great. I suggest a shorter name for the option of the fifo muxer,
> delay_write_header I think is enough, you can explain the details in the
> docs.
Great suggestion. I'll follow it.
>
> Also it should be pretty straightforward to add this feature to fifo.c,
> from a quick look at the code one approach is to add a NOOP message type,
> and if the option is set, then use that message type for the first
> message, if it is not set, use the WRITE_HEADER message type, as it is
> used now.
>
> Also we should find a good name for the bitstream filter, maybe "buffer",
> or "fifo", or if you want to better refer to the use case, then
> "timeshift" can also work.
Maybe "caching" or "cache"?
>
> Another thing you should think about is what should happen at the end of
> the stream, when flushing the bitstream filter:
> - drop pending packets
> - flush pending packets as fast as possible
> - flush pendning packets realtime
> Maybe it should be selectable between the 3 options? I can imagine use
> cases for all three possibilities.
Although I have not imagined the first and second use cases, I'm glad
to implement all three.
>
> Thanks,
> Marton
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list