#7155(ffmpeg:new): Add option to stop writing at position relative to EOF
#7155: Add option to stop writing at position relative to EOF ----------------------------------+--------------------------------------- Reporter: clone206 | Type: enhancement Status: new | Priority: wish Component: ffmpeg | Version: 3.4 Keywords: seek | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+--------------------------------------- Summary of the bug: Feature request How to reproduce: N/A Add main option to allow stopping of writing to output at position relative to "end of file", where 0 is eof, and negative values are earlier in the file. Proposed switch: "-toeof", like "-sseof" but for stopping point instead of beginning point. Background: I have ripped SACD audio tracks with extraneous loud noises at the last few hundred milliseconds of each track, and want to chop off that duration from the end of each file as part of a batch process. I would like to do something like the following on each file: ffmpeg -i input.flac -toeof -00:00:00.9 output.flac -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
Background: I have ripped SACD audio tracks with extraneous loud noises at the last few hundred milliseconds of each track, and want to chop off
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: defect | Status: closed Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: invalid Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by cehoyos): * status: new => closed * type: enhancement => defect * component: ffmpeg => undetermined * priority: wish => normal * version: 3.4 => unspecified * keywords: seek => * resolution: => invalid Comment: Replying to [ticket:7155 clone206]: No new options can be requested for releases and I don't think this can be implemented. that duration from the end of each file as part of a batch process. I would like to do something like the following on each file: Instead, please explain how we can reproduce (and fix) this bug. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: defect | Status: closed Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: invalid Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by clone206): This is not a bug that needs fixing. It's a feature request. Are you saying you don't accept feature requests, or rather that because I chose a release number the feature request is invalid? I'm quite certain it could be implemented, since you already basically did the same thing with the -sseof option. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: defect | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by clone206): * status: closed => reopened * resolution: invalid => -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by clone206): * type: defect => enhancement -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by Gyan): * cc: ffmpeg@… (added) -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by withmorten): Hi clone206, I ran into a similar problem this week when I wanted to cut off one second of silence at the end of some files which I had added earlier (with ffmpeg). It wasn't too hard to implement and can probably be improved on sanity check-wise, but it works for my purposes and can probably be used as a good starting point for properly implementing this by somebody who knows how ffmpeg is supposed to work: https://gist.github.com/withmorten/ea585798076fa020b757437f23aca768 Diffed against ffmpeg 3.4.2. It only works as input option (duration seemed to be unknown in open_output_file), so you'll have to use it like: ffmpeg -toeof -00:00:00.9 -i input.flac output.flac It basically makes the input file shorter by whatever amount you tell it. Not entirely sure why this would be impossible to implement ...? -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by clone206): Thanks, withmorten! That's basically exactly the way I would've done it. Might be worth forking the current github and making a pull request, though I don't know if Gyan is already working on it. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by Gyan): Generate a patch against git master and send it to the mailing list. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by withmorten): Should I modify the ffmpeg.texi file as well to include the new commandline switch? -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by Gyan): Please do. Thanks. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------ Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: wish | Component: ffmpeg Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------ Changes (by cehoyos): * priority: normal => wish * component: undetermined => ffmpeg Comment: I didn't consider `-sseof` ''working'' for any interpretation but if that is what you need, it may be possible. Please do not forget to report the original bug, it would be nice to fix it. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------ Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: wish | Component: ffmpeg Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------ Comment (by clone206): cehoyos, In what way is -sseof not working? For those of us interested in possibly contributing, it would be good to know, as I haven't had any issues with that option, which has been available for some time now. Also, sorry if it wasn't clear, but I never reported a bug that needs fixing, but rather a feature request. If there is any documentation on how to properly make a feature request I would gladly familiarize myself with it. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------ Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: wish | Component: ffmpeg Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------ Comment (by cehoyos): Replying to [comment:12 clone206]:
Also, sorry if it wasn't clear, but I never reported a bug
This is not true, you just didn't explain how we can reproduce. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:13> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------ Reporter: clone206 | Owner: Type: enhancement | Status: reopened Priority: wish | Component: ffmpeg Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------ Comment (by clone206): Reproduce what? -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:14> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: (none) Type: enhancement | Status: reopened Priority: wish | Component: ffmpeg Version: git-master | Resolution: Keywords: ease_of_use | Blocked By: EOF | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by GfE): * keywords: => ease_of_use EOF * version: unspecified => git-master Comment: I was about to file the same feature request. (Almost gave up, after losing over an hour on failing to understand where exactly ffmpeg wants FRs to go. Finally found this one, disguised as a /bug/.) Alas, 7 years in, -sseof is still missing its -toeof counterpart. Given ffmpeg's oftentimes steep learning curve, -ss, -to, and -sseof are amazingly simple and useful options. If exact frame accuracy doesn't matter and you e. g. quickly want to remove a fixed-length intro from a series of videos, `ffmpeg -y -ss -01:23.456 -i "${indir}"/*.mkv -c:copy "${outdir}"/*.mkv` is as efficient as can be. Doing the same with outros needlessly requires /much/ more studying and dedication to ffmpeg concepts and features - if you succeed within your time constraints, at all. Granted, solutions to complex problems tend to be complex. Also, complex solutions for simple but niche problems might not be worth the simplification effort. However, the task of stopping to read input N seconds before its EOF isn't any more niche or complex than -sseof. What happened to https://gist.github.com/withmorten/ea585798076fa020b757437f23aca768 why has it been ignored/stalled/dropped? It's hard to imagine for a dozen lines' patch to provide more usability improvement to the less-advanced. People like me would greatly appreciate if the patch was * updated as necessary to match the current codebase * then applied/merged -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:15> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7155: Add option to stop writing at position relative to EOF -------------------------------------+------------------------------------- Reporter: clone206 | Owner: (none) Type: enhancement | Status: reopened Priority: wish | Component: ffmpeg Version: git-master | Resolution: Keywords: ease_of_use | Blocked By: EOF | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by clone206): Replying to [comment:15 GfE]:
I was about to file the same feature request. (Almost gave up, after losing over an hour on failing to understand where exactly ffmpeg wants FRs to go. Finally found this one, disguised as a /bug/.)
Alas, 7 years in, -sseof is still missing its -toeof counterpart.
Given ffmpeg's oftentimes steep learning curve, -ss, -to, and -sseof are amazingly simple and useful options. If exact frame accuracy doesn't matter and you e. g. quickly want to remove a fixed-length intro from a series of videos, `ffmpeg -y -ss -01:23.456 -i "${indir}"/*.mkv -c:copy "${outdir}"/*.mkv` is as efficient as can be.
Doing the same with outros needlessly requires /much/ more studying and dedication to ffmpeg concepts and features - if you succeed within your time constraints, at all.
Granted, solutions to complex problems tend to be complex. Also, complex solutions for simple but niche problems might not be worth the simplification effort.
However, the task of stopping to read input N seconds before its EOF isn't any more niche or complex than -sseof.
What happened to https://gist.github.com/withmorten/ea585798076fa020b757437f23aca768 why has it been ignored/stalled/dropped?
It's hard to imagine for a dozen lines' patch to provide more usability improvement to the less-advanced. People like me would greatly appreciate if the patch was * updated as necessary to match the current codebase * then applied/merged
Yeah tbh I had forgotten about this. What an odd exchange. Don't know if I've ever felt so gaslit. I'm actually working on my own audio format conversion software, which is on github under the same username, so that I can work with more modern c++ and rust code and hopefully avoid such bafflement going forward. -- Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:16> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg