Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.94k stars 584 forks source link

Extract specific moment of the video #330

Open rouelibre1 opened 3 years ago

rouelibre1 commented 3 years ago

Enhancement idea :

(I don't know how to tag this issue with enhancement)

Rudloff commented 3 years ago

This can probably be done in stream mode in a similar way to what we do for audio conversion: https://github.com/Rudloff/alltube-library/blob/f0bbd14b06bb4df9e3fbae62a6f09b455fdcc703/classes/Downloader.php#L194

rouelibre1 commented 3 years ago

For reference : https://github.com/ytdl-org/youtube-dl/issues/622#issuecomment-86163574

Mennaruuk commented 3 years ago

Wouldn't this mean alltube downloads the video, trims it, then hosts it on its servers before giving the user a link to the trimmed video, just like how Streamable does it? I think hosting and bandwidth may have to be considered.

Rudloff commented 3 years ago

AllTube never stores video files on the server, it always works with streams. For HTTP streams, ffmpeg is smart enough to skip to the part to trim so it does not download the whole video just to cut some part of it.

Mennaruuk commented 3 years ago

I never thought of that. That's pretty cool! Streams make actions like trimming much easier.