redlib-org / redlib

Private front-end for Reddit
GNU Affero General Public License v3.0
1.18k stars 87 forks source link

💡 Feature request: Ability to download HLS videos with sound #105

Open ChromanicAI opened 4 months ago

ChromanicAI commented 4 months ago

Is your feature request related to a problem? Please describe.

When browsing subs related to comedy/jokes on reddit I often used the service rapidsave which allowed me to download videos by giving the link to a post. It's was kinda tedious to go on a different site but whatever.

Describe the feature you would like to be implemented

The ability to download a video of a post

Describe alternatives you've considered

I was not able to just download the video by using browser's native context menu(it was grayed out). Checked the incoming media from Web console and saw that video loads separately from the audio (prob because that's how HLS works, i am not knowledgeable on how it works). So maybe a button could be implemented which will be merging the two streams ( .ts for video and .aac for audio) into a single mp4 file?

EmberHeartshine commented 3 months ago

I've seen this implemented in other frontends via ffmpeg, though that necessarily pushes the work of encoding the streams together onto the server.

binamov commented 3 months ago

would love this!

r1klz commented 2 months ago

I've seen this implemented in other frontends via ffmpeg, though that necessarily pushes the work of encoding the streams together onto the server.

Yes... About this, another user setting in the code can handle the problem if the instance host doesn't want to run this encode process.

Currently, we have/can do it manually by running ffmpeg -i input.mp4 -i HLS_AUDIO_128.aac -c:v copy -c:a aac -b:a 128k output.mp4. Of course, as long as you have FFmpeg installed in your system.

It would really be much better to the final user if this was a built-in process.

EmberHeartshine commented 2 months ago

Yes... About this, another user setting in the code can handle the problem if the instance host doesn't want to run this encode process.

I literally reference having ffmpeg installed on the server in my reply.