Cayars - Setup walk through and some tips and tricks

@Cayars - do you use hardware acceleration to cut down H265 to H264? Both QVC and NVENC both crash when it hits a H265 file. I do not have many 4k video, but I would like to keep them, just make them easier to stream. It works fine software, but it takes forever with my current setups, but the GTX1080’s just tear through the files.
I am also getting:

Unrecognized option ‘look_ahead’.
Error splitting the argument list: Option not found

When it hits some AVI’s

–Izz

I do use HW acceleration on my main Plex system. My system is pure h.264 files that are done via the scripts I supply with the exception of two libraries. I also have a 4K library that is mostly HEVC and a Test Library that is is mixed media from HVEC 8 bit to 10 bit, AVI, WMV, TS, etc I use for testing.

On my system using an older AMD R9 280x Black Edition I can’t touch h.265 with it or it will not transcode. This is a known issue with the current HW builds. A later version will address this and give us more options to handle this. I’m running the same build as everyone else that is posted in the HW thread.

Best thing I can recommend to you is have a normal h.264 movie library and then a h.265/4K library and only share the 4K/h.265 content with people who can direct play it.

Thanks for the feedback, it helps solidify my thoughts on the issue.

Wasnt sure if I was doing something wrong or not.

-izz

Nope you’re not doing anything wrong. Just the way HW transcoding works in the present beta build. Down the road I’m sure will have software fallback for codecs not supported like HEVC on older GPUs which will give us the best of both worlds (HW and SW transcoding).

Right now I believe the idea of the HW build is to strictly test what works and what doesn’t before decision trees are built to handle the fringe stuff.

Carlo

@Izzin said:
Thanks for the feedback, it helps solidify my thoughts on the issue.

Wasnt sure if I was doing something wrong or not.

-izz

My github fork supports using nvenc to convert a h265 file to h264 without any issues. There was a bug with ffmpeg that was fixed relatively recently that was causing the h264 output file to always use 2 megabit bitrate, but now it works fine. Make sure you download an updated version via https://ffmpeg.zeranoe.com/builds/

Tested today using http://jell.yfish.us/ hevc 120 megabit hevc 10-bit 4k file —> 20 megabit 1080p using dxva2 decoder/nvenc_h264 encoder and it worked without a hitch.

Thanks for your answer to my post regarding the optimizing script.

Simple question regarding that:

How can I change the output directory? I’m running SSD for operating system drive, which limits the space I have there.
It would be neat to be able to put a couple of houndred gigabytes in a different drive and leave it running when I’m not by the computer

Check out the ini settings. You’ll see an entry similar to this:
output_directory = C:\Convert\Done

Just change the directory on the right side. It can be any drive you want.

Carlo

Ok, found the correct .ini after a good night sleep.

Many of my files have nordic subtitles muxed. I see your script only extracts english subs.
How can I make it extract all the subs in srt format?

And as to the audio files, I have some files with dual language - kids movies with norwegian and english language. How can I keep both?

audio-language = 3 letter language code for audio streams you wish to copy. Leave blank to copy all. Separate multiple audio streams with commas (ex: eng,spa)

Same with subtitles.

Can i remux the mp4 with subs into a mkv container after the conversion so I am able to use .mkv containers again?

I’ve read through this entire thread and can’t find the answers to a couple of questions:

1: How would I match the settings to like say Handbrake built in setting Fast 1080p 30 (with the exception of adding in Web Op, of course)? I like the result of this conversion. It goes quickly, and the files (while smaller in size) still look decent. In my mind, at least. I ran the script and it does convert them, but the file sizes end up being larger than their original format.

2: is there a log that the MP4 converter can reference so that it doesn’t attempt to convert the same file over and over again?
I understand that I could move the original files, but I have a need to keep them in the folder for a while.

Even if you can’t help, much appreciated for everything you’ve done!

@Collisionc said:

@Izzin said:
Thanks for the feedback, it helps solidify my thoughts on the issue.

Wasnt sure if I was doing something wrong or not.

-izz

My github fork supports using nvenc to convert a h265 file to h264 without any issues. There was a bug with ffmpeg that was fixed relatively recently that was causing the h264 output file to always use 2 megabit bitrate, but now it works fine. Make sure you download an updated version via https://ffmpeg.zeranoe.com/builds/

Tested today using http://jell.yfish.us/ hevc 120 megabit hevc 10-bit 4k file —> 20 megabit 1080p using dxva2 decoder/nvenc_h264 encoder and it worked without a hitch.

How would I replace Plex’s version with this?

@stevencas said:
Can i remux the mp4 with subs into a mkv container after the conversion so I am able to use .mkv containers again?

Don’t do that. Keep them as MP4 as it’s a more supported format and is a streaming format unlike MKV which is a storage format! But if you must, yes you can.(can also go straight to MKV)

Carlo

@jiantjon said:
I’ve read through this entire thread and can’t find the answers to a couple of questions:

1: How would I match the settings to like say Handbrake built in setting Fast 1080p 30 (with the exception of adding in Web Op, of course)? I like the result of this conversion. It goes quickly, and the files (while smaller in size) still look decent. In my mind, at least. I ran the script and it does convert them, but the file sizes end up being larger than their original format.

I haven’t used Handbrake in a long, long time. Before I try and figure this out keep in mind I do somethings different on purpose because I know how we are streaming the files and not just archiving them locally like Handbrake assumes. With that said I’m not sure I followed what you said. Sounded like you said the files produces were smaller in the first part then larger in the second part.

Show me some numbers please (original, converted) so I better understand, thanks.

2: is there a log that the MP4 converter can reference so that it doesn’t attempt to convert the same file over and over again?
I understand that I could move the original files, but I have a need to keep them in the folder for a while.

Even if you can’t help, much appreciated for everything you’ve done!

No there isn’t. While it can do in place conversions I recommend NOT doing this with the exception of maybe a first pass. If you do this I’d suggest doing it in batches so you can manually track what directories you have and haven’t done.

Thanks for the kind words,
Carlo

@KarlDag said:

@Collisionc said:

@Izzin said:
Thanks for the feedback, it helps solidify my thoughts on the issue.

Wasnt sure if I was doing something wrong or not.

-izz

My github fork supports using nvenc to convert a h265 file to h264 without any issues. There was a bug with ffmpeg that was fixed relatively recently that was causing the h264 output file to always use 2 megabit bitrate, but now it works fine. Make sure you download an updated version via https://ffmpeg.zeranoe.com/builds/

Tested today using http://jell.yfish.us/ hevc 120 megabit hevc 10-bit 4k file —> 20 megabit 1080p using dxva2 decoder/nvenc_h264 encoder and it worked without a hitch.

How would I replace Plex’s version with this?

Assuming you are on Windows go to https://ffmpeg.zeranoe.com/builds/win64/static/ and at the bottom of that page is a file called ffmpeg-latest-win64-static.zip. Download that file.
In your convert directory make a backup of ffmpeg.exe and ffprobe.exe
Open the zip and change to the bin directory.
copy the two files mentioned above into your c:\convert directory.
Test
If it hangs replace the backup copy of ffprobe.exe and try again. ffprobe.exe in new zano builds sometimes causes the script to fail. They keep changing it. :frowning:

With that said I have not had a problem with nvenc based files. Also note this ONLY applies if you are using an Nvidia GPU and not CPU, AMD or QuickSync.

Carlo

@KarlDag said:

@Collisionc said:

@Izzin said:
Thanks for the feedback, it helps solidify my thoughts on the issue.

Wasnt sure if I was doing something wrong or not.

-izz

My github fork supports using nvenc to convert a h265 file to h264 without any issues. There was a bug with ffmpeg that was fixed relatively recently that was causing the h264 output file to always use 2 megabit bitrate, but now it works fine. Make sure you download an updated version via https://ffmpeg.zeranoe.com/builds/

Tested today using http://jell.yfish.us/ hevc 120 megabit hevc 10-bit 4k file —> 20 megabit 1080p using dxva2 decoder/nvenc_h264 encoder and it worked without a hitch.

How would I replace Plex’s version with this?

I’m sorry, I misread your original issue, I thought you were just trying to use the script to convert h265 to h264, not that you were trying to get plex to transcode h265 —> h264 with gpu. I don’t know if that will work.

Looks like I’m going to have to change my sig.

Those that follow this thread might remember I’m running Windows Server install on a 1TB Samsung Pro SSD. This formats out to 941GB. I have windows installed and few other programs and of course Plex installed on this SSD. It holds all of the Plex Meta data.

I typically track the size of the meta-data directories and all sub directories to see how much space they are using due my use of index/.bif files. I’ve peeked at about 713GB which had me down to about 35GB left on the drive which is cutting it close when a file needs transcoding since my transcode directory is stored on drive C as well.

I’ve long wished the bif files weren’t stored in the meta directory but stored right next to the media. The bif files aren’t needed until the file is playing so it made perfect sense to me. So last night I wrote scripts to pull the file locations of each index-sd.bif file for all media files. It pulls the info, grabs the name of the movie/show as well and renames the index file to a similar name as the movie/show and stores this in the media folder next to the video. It then creates a symlink back to the meta-data local it came from.

My meta-data was approximately 713GB and is now down to 151GB. Everything is working perfectly and I now have plenty of room to hold a whole lot more meta-data. :slight_smile:

The way I’ve setup the scripts if I were to have to rebuild Plex I could then import the bif/index files back into the libraries and not need to spend 3 months on my system re-indexing them. As a side note I used a slightly goofy naming convention for the bif files.

BONUS points for the first person who can explain why I named them this way. So let’s pick a movie that everyone is family with. Top Gun.

On my system I have
F:\Movies\T\Top Gun (1986)\Top Gun (1986).mp4
F:\Movies\T\Top Gun (1986)\Top Gun (1986)-240.bif

So why did I use “Top Gun (1986)-240.bif” instead of “Top Gun (1986).bif” or similar? Why did I drop the extension?
PS the 240 is just the size of the SD version and if there were HD versions of the bif they would be 320.

But why that naming convention?

I’m trying to convert some files that has language tagged “nor” for Norwegian as audio tracks.
Even though I’ve changed all settings to nor, and “eng” is not present anywhere in the .ini, it still outputs the audio track with tag as english language

How can I change it?

Does the file you are testing with have NOR as the marked language in the file? If not it will take the default track.

Can you grab a copy of mediainfo if you don’t have it and run the file with it? Change it to TEXT mode and just copy/paste the info here.

Nobody figure out the BIF naming convention yet?