-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add --from/--to video clipping flags #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6eab3d9
chore: ignore .worktrees directory
334664b
feat: add --from/--to CLI flags with HH:MM:SS validation
a1f4a93
feat: pass clip args to ffmpeg for HLS downloads
ee0a447
feat: wire --from/--to clip flags into download flow
d0bce51
0.4.4
99aaaba
feat: add --from/--to clip flags (MM:SS format, HLS slow-seek for com…
5168633
docs: add --from/--to clip options to README
4572f00
fix: increase no-progress timeout to 60s to avoid false stuck errors …
8381376
feat: validate --to is after --from
c477100
fix: use -t duration instead of -to in downloadMp4WithFfmpeg for corr…
0cb9543
docs: expand README with clipping feature details and examples
183cac6
Apply suggestion from @devin-ai-integration[bot]
RichardBray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,3 +26,4 @@ test-results/ | |
|
|
||
| # Docs | ||
| docs/ | ||
| .worktrees/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 No-progress timeout kills ffmpeg during slow HLS seek before encoding can start
When clipping an HLS stream with
--from, the code uses slow/accurate seek (-ssafter-i), which requires ffmpeg to download and decode the entire HLS stream up to the seek point before writing any output. During this seek phase, the output file either doesn't exist or contains only a tiny header and does not grow. The 60-secondnoProgressTimeoutMspoll atsrc/ffmpeg.ts:75-107monitors output file size growth and will kill ffmpeg after 60 seconds of no growth, even though ffmpeg is actively downloading and decoding HLS segments.Root Cause and Impact
The timeline for
--from 05:00on an HLS stream is:lastProgressTimeinitialized toDate.now()at line 38now - lastProgressTime > noProgressTimeoutMs→ ffmpeg killed with error "FFMPEG stuck: no progress for 60 seconds"The previous 30-second timeout was fine because non-clipping HLS downloads use
-c copy(stream copy), which writes output immediately. The PR increased it to 60s, but slow seek on HLS requires downloading the full input up to the seek point, which can take minutes for non-trivial--fromvalues.Impact: The HLS clipping feature is broken for any
--fromvalue where the HLS content before the seek point takes more than ~60 seconds to download and decode. For example,--from 05:00would require downloading ~5 minutes of HLS segments before producing output, but ffmpeg is killed after 60 seconds.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.