Yes the experimental transcoder setting in DVR will convert to h264, but I was occasionally getting errors with that and it does not compress the file much so for now I have it set to REMUX
For ffmpeg, this is the general syntax: ffmpeg -i inputfile.mkv -crf 18 -map 0 -acodec copy -scodec copy -c:v libx264 -threads 0 -preset veryslow outputfile.mkv
Right now I am testing -preset medium and -crf 20
Note, when using constant quality based encoding, -crf determines the quality and -preset the file size. -crf 18 -preset veryslow and -crf 18 -preset medium will give your roughly the same picture quality. The veryslow preset will just give you a file that’s like 10-15% smaller and take hours longer to finish.
Might want to add decomb/deinterlace option, too. I know we have a bunch of channels in my area that use 1080i (e.g. CBS, NBC, CW) and if I don’t decomb when/prior to encoding, it looks awful when watched from the iPad.
Thanks for the info, decomb/deinterlace
I had forgotten about that and I do see that on some channel when viewed through the browser
@leschan said:
Might want to add decomb/deinterlace option, too. I know we have a bunch of channels in my area that use 1080i (e.g. CBS, NBC, CW) and if I don’t decomb when/prior to encoding, it looks awful when watched from the iPad.
Oh, and what does your ffmpeg command for deinterlacing look like, if you don;t mine?
@leschan said:
Might want to add decomb/deinterlace option, too. I know we have a bunch of channels in my area that use 1080i (e.g. CBS, NBC, CW) and if I don’t decomb when/prior to encoding, it looks awful when watched from the iPad.
Oh, and what does your ffmpeg command for deinterlacing look like, if you don;t mine?
You could try adding -vf yadif. I think that’s what the Plex transcoder uses to deinterlace, too.
I don’t actually use ffmpeg for deinterlacing. Either I care a lot about picture quality which means AviSynth script+QTGMC (usually for bad DVD sources e.g. Buffy) or I’m okay with some minor PQ loss so I go for speed via hardware accelerated encoding (typically for HD sources).
I use QSVEncC by rigaya. It’s a command-line encoder that uses Intel QuickSync so super fast even on my dual-core Pentium G3220 3GHz. I’m not sure if it has a Linux port, though.
My CLI looks like this: QSVEncC64.exe --vpp-deinterlace normal --tff --avqsv --fallback-rc --icq 18 --audio-copy -i input.mkv -o output.mkv
@leschan said:
Might want to add decomb/deinterlace option, too. I know we have a bunch of channels in my area that use 1080i (e.g. CBS, NBC, CW) and if I don’t decomb when/prior to encoding, it looks awful when watched from the iPad.
Oh, and what does your ffmpeg command for deinterlacing look like, if you don;t mine?
You could try adding -vf yadif. I think that’s what the Plex transcoder uses to deinterlace, too.
I don’t actually use ffmpeg for deinterlacing. Either I care a lot about picture quality which means AviSynth script+QTGMC (usually for bad DVD sources e.g. Buffy) or I’m okay with some minor PQ loss so I go for speed via hardware accelerated encoding (typically for HD sources).
I use QSVEncC by rigaya. It’s a command-line encoder that uses Intel QuickSync so super fast even on my dual-core Pentium G3220 3GHz. I’m not sure if it has a Linux port, though.
My CLI looks like this: QSVEncC64.exe --vpp-deinterlace normal --tff --avqsv --fallback-rc --icq 18 --audio-copy -i input.mkv -o output.mkv
That’s interesting…
Do you manually process each file or do you have a method to automate the determination of if a file is interlaced or not. It’s my understanding, and I could be wrong, that you don’t want to try and deinterlace a progressive file
@leschan said:
Might want to add decomb/deinterlace option, too. I know we have a bunch of channels in my area that use 1080i (e.g. CBS, NBC, CW) and if I don’t decomb when/prior to encoding, it looks awful when watched from the iPad.
Oh, and what does your ffmpeg command for deinterlacing look like, if you don;t mine?
You could try adding -vf yadif. I think that’s what the Plex transcoder uses to deinterlace, too.
I don’t actually use ffmpeg for deinterlacing. Either I care a lot about picture quality which means AviSynth script+QTGMC (usually for bad DVD sources e.g. Buffy) or I’m okay with some minor PQ loss so I go for speed via hardware accelerated encoding (typically for HD sources).
I use QSVEncC by rigaya. It’s a command-line encoder that uses Intel QuickSync so super fast even on my dual-core Pentium G3220 3GHz. I’m not sure if it has a Linux port, though.
My CLI looks like this: QSVEncC64.exe --vpp-deinterlace normal --tff --avqsv --fallback-rc --icq 18 --audio-copy -i input.mkv -o output.mkv
That’s interesting…
Do you manually process each file or do you have a method to automate the determination of if a file is interlaced or not. It’s my understanding, and I could be wrong, that you don’t want to try and deinterlace a progressive file
Manual preparation of batch scripts. I know which channels/shows are interlaced anyway so for example, CBS, NBC and CW (1080i) get deinterlaced while FOX (720p) does not. In general though, I don’t really convert. I have MCEBuddy create an unprocessed MKV with commercials flagged (as chapters) and then just let Plex’s on-the-fly transcoding deal with conversion if I want to stream to my iPad (Plex automatically deinterlaces). I usually buy the Blu-ray box sets of shows I want to keep and replace recordings with higher quality (and logo-free!) Blu-ray rips anyway.
Also, yadif is a pretty smart deinterlacing filter that deals well with progressive sources. I think if you use -vf yadif=0:-1:1, it might do even less damage to progressive sources. Maybe just test it first then see how the output looks like before adding to your automated script.
I have a suggestion for the post-processor, and it seems to me to be an unobtrusive request.
I would like to see the intended full-path to the folder that PLEX will make (or update) with the DVR result and the intended final name of the file. (Whether the latter is full path, or relative to the aforementioned folder name doesn’t matter to me.)
These could be supplied as a second and third parameter to the post processor script. Or they could be exported as environment variable values prior to calling the post processing script. So maybe:
export PLEX_DVR_INTENDED_FOLDER="/path/to/library/America's Got Talent/Season 11"
export PLEX_DVR_INTENDED_FINAL_NAME="America's Got Talent - s11e25 - Live Finale Results.mkv"
To me, this would round out the post-processor and make it more usable. I’d just kick off a new thread that issues inotify wait for CLOSE_WRITE of “${PLEX_DVR_INTENDED_FOLDER}/${PLEX_DVR_INTENDED_FINAL_NAME}” … and then I could do whatever else needs to be done with the file. So folks who want their post process to be just prior to process completion (as it is now) can have their cake… and those who want to know what was done and where it was placed after it’s all finished, could eat it too.
@delovelady said:
export PLEX_DVR_INTENDED_FOLDER=“/path/to/library/America’s Got Talent/Season 11”
export PLEX_DVR_INTENDED_FINAL_NAME=“America’s Got Talent - s11e25 - Live Finale Results.mkv”
You can get the your INTENDED_FINAL_NAME from the existing variable that’s available now.
The file name stored in it is the named used for the Final Name as well.
I’ve been experimenting with commercial removal and I found these optimized comskip.ini files that work great for me. I’m using the general Verizon FIOS settings and it seems to catch the commercials a little bitter.
@mdpauley said:
I’ve been experimenting with commercial removal and I found these optimized comskip.ini files that work great for me. I’m using the general Verizon FIOS settings and it seems to catch the commercials a little bitter.
Is that who you receive TV service from (Verizon) ?
@delovelady said:
export PLEX_DVR_INTENDED_FOLDER=“/path/to/library/America’s Got Talent/Season 11”
export PLEX_DVR_INTENDED_FINAL_NAME=“America’s Got Talent - s11e25 - Live Finale Results.mkv”
You can get the your INTENDED_FINAL_NAME from the existing variable that’s available now.
The file name stored in it is the named used for the Final Name as well.
OK, I do understand that the passed-in variable contains the filename, a la:
/path/to/library/.grab/a921783099ed37fe97762a4df87f237ff8691537/What's My Line_ (1950) - 2016-09-2100_00_00 - Episode 09-21.ts
In this case, the final file wound up here:
/path/to/library/What's My Line_ (1950)/Season 2016/What's My Line_ (1950) - 2016-09-21 00_00_00 - Episode 09-21.ts
So I agree that the final name is provided (sort of), but what about the folder into which it will be placed? Is there hope of seeing that exported or passed as a parameter? “/path/to/library/What’s My Line_ (1950)/Season 2016” Or must the post-processor go looking for a file of that (basename) and hope there is no clash?
@delovelady: I don’t have any info on what Plex will add further.
But I am curious what you do to the file after it is placed in it’s final destination that you can’t do in the .grab folder before it’s moved. Can you give an example?
But I am curious what you do to the file after it is placed in it’s final destination that you can’t do in the .grab folder before it’s moved. Can you give an example?
The primary thing I want to do, is to zip up that structure:
/path/to/library
/What's My Line_ (1950)
/Season 2016
(final name)
… and send it to another server I have in another site far away from the home server (synchronization is managed by rsync for now). Ideally, the exact structure is replicated on the remote. Now, I do realize rsync can kind-of-sort-of do what I want done to a point, but I really like the idea of handing the complete information to the task. I envision kicking off the synchronization process immediately rather than on a schedule, and so on. And clearly there is a piece missing to make that complete / professional.
In addition, I have an Oracle database of my own, outside of Plex (duh!) that contains basic information about about the files in the library. (Not as robust as the Plex library, but for a completely different purpose.) A process periodically updates that DB, and I like the idea of improving on that, moving from a scheduled scanner approach to a targeted update. Yes, there are other ways. No, nobody will die if that DB doesn’t get updated correctly.
EDIT: I just remembered that I hope also to send an SMS when the file is ready. I’d really like that SMS to contain that sort of information. Or, armed with that information, I could interrogate the PLEX metadata about it, and include other details, like the official show name, et cetera. But that’s a back-burner thing for some day when the alternative is watching paint dry.