r/ffmpeg • • 2d ago

I created a application to help with new files and re-encodes of libraries to h.265 to save space on storage.

I not sure if this is OK to post, but I think this program I have been working on, mostly for myself that was really vibe coded with AI, so took many hours to fixing bugs and adding changes to things to follow the way the work flow was being done files I had on my server and also any new video files.

It uses handbrakecli and ffprobe to process a queue of files. You give it a default directory, drag files, or browse to any directory local or on a NAS and it will scan it and let you sort them all by size, it fills in media info per each file and flags files it thinks looks like they could save space by being re-encoded. it then goes through each file and samples them 3 time at different locations in that file and if it determines it wont gain more than a 10% (you can change that in settings) of saving from the re-encode it skips it. You can tell it to force files to be encoded, or have them reanalyzed more times. After each file is encoded, it created a backup, you can restore if needed, it can also auto clean the files (You have to have MKVToolNix installed on system) or you can pick what files to be cleaned, this just removes all tags that are not needed from the files, gets rid of ugly tags. There is a also a rename tab you can send the files to and it will help you rename selected files or all files in a same directory using quick ways that are helpful to common video files.

The program basically streamlines the process I usually did manually. I find that I have really used it a lot. I made it because I had a need. Not sure if something like existed already, but I needed this and worked to make it do what I needed.

Feel free to check it out if you think it would help, I would love to hear if anyone else used it or found it helpful.

https://github.com/jsdeprey/MKVEncoderQ

0 Upvotes

11 comments sorted by

1

u/_Gyan 1d ago

You can post this in the stickied post My FFmpeg app or Service. Follow the formatting guidelines.

2

u/NotTobyFromHR 1d ago

Isn't going from x264 or some other encoding to x265 just going to be much crappier quality. Best scenario is to re rip from source

1

u/jsdeprey 1d ago

It may lose a little bit everytime you re-encode, but the quality lose is very small. I watch them and cant tell a difference and they are 50% or more smaller, which helps me a lot.

2

u/MFKDGAF 1d ago

Why h.256 and not AV1?

Why create this and not use tdarr? Does tdarr not have something that you had to create in this?

1

u/jsdeprey 1d ago edited 1d ago

I tend to stream to devices that would need a transcode ifnin av1. I never seen that so... but this app really just streamlines what I was doing in handbrake then in MVKtookNix then renaming in another app.

1

u/Empyrealist 2d ago

How does this compare to FastFlix?

1

u/jsdeprey 1d ago

This does not currently have many option for encoding, I have it set for a pretty basic handbrake encode that looks good and saves me a good bit of space by default

You can set the quality for each resolution it see's going thru a big queue of video files and audio is set to passthrough (aac, ac3, eac3, truehd, dts, dtshd), audio all streams, or defaults to first English stream. The main thing the program does is not really encode, it is just doing what handbrake can do, it just lets you point to a large folder of files and it marks them by type and if it thinks they would benefit from a re-encode to save space or not. or have it auto encode files in a directory it is watching and it will encode them and keep a backup, let you check them before deletion and you can just let it run and save drive space. I needed it because I was looking at a large amount of files and it automates the process very well for me.

2

u/pigers1986 2d ago

sounds like tdarr ?

1

u/pittrich67 2d ago

I'm basically done switching to x265 in my library, but new files are also being added. However, my videos are not only coded x265 but also in aac. Is your tool also possible? At the moment I'm using a batch file to code German to AAC at the same time using x265 including the first soundtrack.

1

u/vegansgetsick 1d ago edited 1d ago

It's ok if the content is like 10Mbps and you recompress at 2Mbps and don't care about quality. Because HEVC is nowhere near a miracle, the gain from H264 is just 20-30%

Otherwise you're just destroying the content even more. Don't recompress anything which is already below 5Mbps. In fact, you should recompress from the high bitrate source, not from a low bitrate encode you already have.

With that in mind your tool should filter what can be recompressed, based on the bitrate (ie below 5Mbps don't touch it). Ideally it's not the bitrate but the bit per pixel.

1

u/centuryx476 1d ago

Vibe coded..

No thanks