Option to cut end of a video #13588

Closed
opened 2026-02-21 07:20:50 -05:00 by deekerman · 1 comment
Owner

Originally created by @jkufner on GitHub (May 13, 2018).

What is the purpose of your issue?

  • Feature request (request for a new functionality)

Description

Since many videos have stupid annoying garbage on the end, it would be useful to have an option to cut away the garbage.

For example, if I wish to download https://www.youtube.com/watch?v=YKSU82afy1w, then I get some garbage starting at 0:57. So I can then run this command to remove the garbage:

youtube-dl 'https://www.youtube.com/watch?v=YKSU82afy1w' -o song.mkv
ffmpeg -i song.mkv -t 0:57 -c copy song.cut.mkv

It would be much better if I cud do simply this:

youtube-dl --end-at 0:57 https://www.youtube.com/watch?v=YKSU82afy1w

Basically the desired --end-at $T option equals -t $T -c copy of ffmpeg. Note the ffmpeg with -t but without -c copy will reencode the video. It's fine to be inaccurate and cut on the nearest key-frame since the garbage is usually a large change in the video anyway.

Originally created by @jkufner on GitHub (May 13, 2018). ### What is the purpose of your *issue*? - Feature request (request for a new functionality) ### Description Since many videos have stupid annoying garbage on the end, it would be useful to have an option to cut away the garbage. For example, if I wish to download https://www.youtube.com/watch?v=YKSU82afy1w, then I get some garbage starting at 0:57. So I can then run this command to remove the garbage: youtube-dl 'https://www.youtube.com/watch?v=YKSU82afy1w' -o song.mkv ffmpeg -i song.mkv -t 0:57 -c copy song.cut.mkv It would be much better if I cud do simply this: youtube-dl --end-at 0:57 https://www.youtube.com/watch?v=YKSU82afy1w Basically the desired `--end-at $T` option equals `-t $T -c copy` of ffmpeg. Note the ffmpeg with `-t` but without `-c copy` will reencode the video. It's fine to be inaccurate and cut on the nearest key-frame since the garbage is usually a large change in the video anyway.
Author
Owner

@remitamine commented on GitHub (May 13, 2018):

Duplicate of #622.

@remitamine commented on GitHub (May 13, 2018): Duplicate of #622.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#13588
No description provided.