[FFmpeg-devel] [PATCH] fftools/ffmpeg_opt: Add -toeof option to stop writing relative to EOF
morten.with at gmail.com
Mon Jun 11 22:18:19 EEST 2018
2018-06-10 22:07 GMT+02:00 Jan Ekström <jeebjp at gmail.com>:
> Yes, programmatic things for things like these are often better. That
> said, the question regarding sseof can be answered by "the person who
> merged this stuff was OK with all the asterisks/caveats around it".
> Think of MPEG-TS, for example. I think - quite a bit simplified - it
> basically parses the timestamps until it finishes probing, and then
> extrapolates according to the size/bit rate of the file. That might be
> close, or that might be not close at all. At the end of the day, the
> libraries in FFmpeg are very much based on A->B access, not
> frame-exactness in access or figuring out the full length of a media
> file with any sort of precision. Of course, this doesn't mean that
> this base feature set cannot be utilized to gain such features - ffms2
> (https://github.com/FFMS/ffms2/) is one example of this, which is a
> wrapper around FFmpeg's libraries that indexes the file, and then
> provides you (unless you hit a bug or special case) frame-exact access
> to the contents.
> Many people have their own use cases for various things and have
> enough leverage to get things that specifically work for their use
> case into the code base, which is why in the end we have three
> different ways of doing concatenation in the libraries (instead of
> implementing it in the API client), each with their own caveats
> (protocol, demuxer, filter). And the users will trust these features,
> and attempt to utilize them for their own use cases. That, in various
> cases, can lead to things just not working, as often the caveats are
> not mentioned and the attempted use cases are different from what
> those features were originally designed for.
> Best regards,
I can see what you mean, but this is such a trivial little addition, I
really fail to see how any big problems would arise from this. Perhaps a
disclaimer that file duration can be inaccurate and should not be relied
upon should be added to sseof and also toeof then? The options already fail
if duration is completely unknown.
Anyway, since I'm not really sure how to update the patch with git
send-email without creating another patch on the tracker (I changed the
commit message to "stop reading"), here is the revised patch attached.
If I should add it as a new patch, please let me know and I will do so.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4244 bytes
Desc: not available
More information about the ffmpeg-devel