On Sat, 2 May 2020, Tao Zhang wrote:

Marton Balint <c...@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.

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.

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.

Thanks,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to