Discussion Best setup to convert movies

  • Guest - 7.5 will focus on bug fixing for all the containers including wiki writeup. Thanks to those who tested 7.4 (which will continue to receive minor updates). 7.5 should not be anything radical or drastic (unlike PGBox and PGClone).

denzel

PG Overlord
PG Donor
Nov 5, 2018
33
4
Reactions
4 0 0
#1
Hello,

my movies, series, etc. and they are in different formats, that are not ideal for plex. I was wondering what would be the best setup to convert the movies?
I tried to use the conversion within Plex, but for nearly 30% of the files there is an error that the "conversion is not possible" without further details.

In the forum and wiki I found some information about MP4 Automator (that I didn't find in Plexguide), about mp4 docker scripts for sonarr/radarr, ffmpeg, the sickbeard converter and Plex Optimize. I have no idea what to try or where to start.

So I have 2 questions:
1. How are you guys doing it?
2. Once in a while I download a movie and want to see immediately. A conversion after downloading would delay the time until I can see it. Is there a setup that the existing movies are converted (if necessary) in the background or when the system doesn't use much capacity and replaces the downloaded movie when it is not in use?

Thank you and best regards
 

timetrex

PG Ambassador
Tech Support
Oct 22, 2018
50
10
Reactions
10 0 0
#2
My Movie collection is only for me, so I dont worry about conversion. I just ensure that I have a device that is capable of playing all formats with no issues like the Nivida Shield My house is a transcode free zone..
 

dinklegeta

PG Veteran
Member
Aug 9, 2018
22
7
Reactions
7 0 0
#3
Honestly the best thing is to just get a device and setup that always direct plays the media. Converting my 55+TB library would be a pain in the rear and the quality loss would make me think why I did not just download a version that is more compatible in the first place.

The Shield TV is the best, the new firestick 4K is great cheaper option. Other devices like the Apple TV will probably need third party apps like Infuse or MrMC for newer higher quality media.
 
Assists Greatly with Development Costs

clinch123

The Newb
Member
Apr 7, 2018
62
40
Reactions
40 0 0
#4
1. There are two ways that you can do this. I utilize both depending on the circumstances. First is too use the MP4 Converter that comes with Sonarr and Radarr setups. Believe it's option 2 not one. There's a wiki page on it. I also use Don Melton's Transcoding script for files you already downloaded. (Link Below) this will require some scripting on your end if you want any sort of automation. A third option would be to use Handbrake Handbrake-CLI directly.

https://github.com/donmelton/video_transcoding

2. If you are transcoding or converting you will need to wait a little. Shouldn't take too long though. Mine ar e usually down in 10-15 minutes for longer movies.
 

denzel

PG Overlord
PG Donor
Nov 5, 2018
33
4
Reactions
4 0 0
#5
1. There are two ways that you can do this. I utilize both depending on the circumstances. First is too use the MP4 Converter that comes with Sonarr and Radarr setups. Believe it's option 2 not one. There's a wiki page on it. I also use Don Melton's Transcoding script for files you already downloaded. (Link Below) this will require some scripting on your end if you want any sort of automation. A third option would be to use Handbrake Handbrake-CLI directly.

https://github.com/donmelton/video_transcoding

2. If you are transcoding or converting you will need to wait a little. Shouldn't take too long though. Mine ar e usually down in 10-15 minutes for longer movies.
This option I like a lot, thank you for sharing!

What command with what parameter did you have good results with Don Melton's Transcoding script?
Is transcode-video --mp4 "/path/to/Movie.mkv" already enought?

Did you try the --quick parameter?
Do I have to add --add-audio all to have the movie in different languages?
 

clinch123

The Newb
Member
Apr 7, 2018
62
40
Reactions
40 0 0
#6
I did use the --quick tag. I didn't see a perceptible loss in quality and it transcoded about 10-15% quick. Since I was transcoding my whole library of 70tb that was a lot of time saved. As far as the audio. I did not use the tag. I haven't come across any issues (there may be but I haven't found them)

The rest of your command is what I used. I'll post my full script when I get home. Not much but just to give an idea
 
Assists Greatly with Development Costs

clinch123

The Newb
Member
Apr 7, 2018
62
40
Reactions
40 0 0
#7
I attached it. Basically I did a "find" command for all the extensions that I wanted to convert and then ran the script.
 

Attachments

SirTranceALoT

PG Ambassador
Tech Support
Jun 14, 2018
50
36
Reactions
36 0 0
#8
I actually encode all my movies for plex myself. Make em stream ready. For the container I use mp4. Video is H.264 encoded with x264 tmod. I spent about 5 years perfecting the settings for that. Audio is AAC since it can handle 7.1 audio and encoded with LC profile and coreaudio with QAAC, it comes close to DTS qualitywise (audiofanatics actually mesured this). Now immediate conversion as you would want it, isn't possible, unles you don't care about quality. Then again, you can just let plex transcode them. As for TV shows, I usually take the AMZN web-dl's. They're perfectly streamable. In short, it depends on what you're looking for. If you want to watch something quick, try and find a web-dl of the movie you want to watch and then replace it afterwords with a good copy if you wish to archive it. That is going to work a whole lot faster then transcoding. Also, as mentioned, make sure you have a device that is at least direct stream ready. I don't use direct play since my video and audiostreams are compliant with almost every device. Xbox one for example struggles with the containers so I have direct play disabled to fix buffer issues. And a container remux is less demanding then a complete transcode.
 

denzel

PG Overlord
PG Donor
Nov 5, 2018
33
4
Reactions
4 0 0
#9
Sounds like you tried a lot with the settings until you got a good result, my full respect!

immediate conversion as you would want it, isn't possible
You got me wrong, I don't want immediate conversion. I would also like to convert it myself.

I spent about 5 years perfecting the settings for that
Would you like to share what program you use for the encoding? And as a newbie on that field maybe you could tell a little more about the perfect settings to make them stream ready?

One more question, as it needs a lot of capacity, did you rent some kind of server for the encoding?
 
Assists Greatly with Development Costs

SirTranceALoT

PG Ambassador
Tech Support
Jun 14, 2018
50
36
Reactions
36 0 0
#10
Sounds like you tried a lot with the settings until you got a good result, my full respect!
Encoding and video processing has always been a passion How could I get the best possible result and quality at the lowest filesize. That was the main intention that drove it. I actually started with this during the DivX and XViD DVD rips. Man that seems like ages ago now. Why I also got into this is to start an encoding company but never gotten around to that.


You got me wrong, I don't want immediate conversion. I would also like to convert it myself.
OH ok sorry bout that. I must've misread it.


Would you like to share what program you use for the encoding? And as a newbie on that field maybe you could tell a little more about the perfect settings to make them stream ready?
As a gui to encode it all, I'm using megui but the process is done trough various different tools. There's eac3to to extract the streams, x264 tmod for encoding, QAAC for audio encoding and mp4box to mux it into mp4. Megui just combines them. You also need avisynth and ffdshow to render the video. AVIsynth is used as frameserver to pipe it trough x264, do the cropping of the video and such. What settings to use is not easilly explained. A few core ones:
Keep the maxbitrate as low as possible to prevent huge peaks in bitrate. 25000 is what I have set it to.
What defines the quality of a videoframe in x264 is the quantizer. I know a lot of those elite groups know only one route and that is bitrate. Don't fall for that. It's their way of not having to admit that they've been encoding the same way for 15 years and still have not clue of what they're doing. I encoding my streams with CQ mode, not a given bitrate. What it does is it encodes every frame towards a given quality factor. What happens with a given bitrate is that certain frames might need more then that bitrate and others way less so that there's some sort of overkill. Encoding using a quality factor gives every frame the bitrate it needs to guarentee a certain quality.
There are 3 types of frames. I P and B. I frames are uncompressed frames and are used as ref frames. P frames are more compressed frames and use another P or I frame as reference. They store the differense between 2 key frames. B frames are the most compressed and shitty looking ones. What most elite encoders do is pump their encode full of B-frames because it would be more compressed. This is very illogic since they have to toss in a lot of bitrate to compensate for the loss of qualiy. I only use 3 B-frames. You see, th ebitrate an I and P frame needs to look good is way less that the one a B-frame needs. Another bad setting those elite encoders use is IP-ratio and PB-ratio. I mentioned the quality factor right? Well these settings determine how much the quality can fluctuate between thos I P and B frames. Those elite encoders use settings that let the quantizer fluctuate a lot. So compared to the I and P frames, those B-frames look horrible, combining the fact that they use a lot of them,.... well you get my drift. So they compensate trough bitrate wich spikes in those I and P frames. I keep my IP and PB ratio settins tight and low. As a result I have equal quantizer or almos equal over all my frames so all of them have nearly the same quality.

There's a lot more to it but then I'd have to write a book. At the end of it, I get away with 1/4 of the original bluray bitrate. Sometimes less so most of those encodes are between 5.5-8 mbps


One more question, as it needs a lot of capacity, did you rent some kind of server for the encoding?
Yes. I do this on a dedicated server. I use an i7 4770 or i7 3770 for encoding. With my current settings, I encode at roughly 6-8 fps. It depends on the complexit yof the source video. An avarage encode takes about 6 hours to finish. I run these encoding machines virtually with QEMU+KVM. I have two servers: one as a seedbox where I run my encoding machine on and the other one is a plexguide dump that also runs an encoding machine. if I really put my mind to it, I spit out 4 encodes a day or 1 season in 3 days.
 
Last edited:

PG Developer Donations

 

Forum statistics

Threads
2,365
Messages
14,361
Members
4,826
Latest member
LightOfBuddha