@cayars said:
@don.alcombright said:
@cayars , what is your best recommendation for generating a list of file locations (for files needed to be be converted)?
My original thought was the get the list of file paths of these files and then run it via a batch command 1 at a time so I could do lets say 50 a day or so and actually monitor the outcome easily, aka if audio messes up or i lose something i didnât mean too etc etc. But I canât seem to find a way to get the full list of files exported to a list, or better yet a full list of files that should be converted to a list.
something like this so I can monitor it in the bat file (and comment out the ones I want to do that day:
c:\python27\python manual.py -a -i â\hades\movies\3 Days to Kill (2014)â >> D:\Convert\log.txt
c:\python27\python manual.py -a -i â\hades\movies\8 Mile (2002)â > D:\Convert\log.txt
c:\python27\python manual.py -a -i â\hades\movies\8MM (1999)â > D:\Convert\log.txt
OK. first and for most I want you to shut down Plex and copy the plex database out to a new location to play with as a test. Re-Start plex again. This is just for safety and always a good idea to do when testing anything new.
Download and install SQLite3 binaries onto your plex server from here: SQLite Download Page
You will want SQLite3 and all the files below in the same directory.
Whatâs sharing from here on out is for Windows since it uses batch files but would be super easy to change for Linux. The important part is to get the idea how to do it.
create a new text file called transcode.txt and put the following in it:
.open âC:\PlexData\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.dbâ
.output Transcode.bat
SELECT âc:\python27\Python C:\convert\manual.py -a -i "â || file || â"â FROM media_parts join media_items
on media_parts.media_item_id=media_items.id
where container=âmp4â and optimized_for_streaming <> 1
order by file;
In the above file change the first line to point to your copy of the database. After you are sure all is working correctly you can change this to point back to your real version.
Now all you have to do is run:
sqlite3 < transcode.txt
You can put that in a batch file if you want.
When you run that it fires up SQLite and uses the contents of the text file to tell it what database to use. It tells it to pipe the output out to transcode.bat (so you can run it when done). It also contains the SQL code used to run against the database.
You can adjust as needed (or Iâll help) to match your system and needs. The output as it stands will generate something like the following in the batch file:
c:\python27\Python C:\convert\manual.py -a -i âF:\TV Shows\Ongoing\Top Shot (2010)\Season 0\Top Shot - S00E01 - Additional Footage.MP4â
c:\python27\Python C:\convert\manual.py -a -i âF:\TV Shows\Ongoing\Top Shot (2010)\Season 0\Top Shot - S00E02 - Contestant Bios.MP4â
c:\python27\Python C:\convert\manual.py -a -i âF:\TV Shows\Ongoing\Top Shot (2010)\Season 0\Top Shot - S00E03 - Elimination Interviews.MP4â
Hope this helps!
Carlo
PS this one particular one above looks ONLY for MP4 files that arenât âweb optimizedâ (proper moov atom at start of file).
This would be the first iteration you would want to run. After this you can adjust it to look at things like ref frames, 10 bit color, no AAC as first track, or other types other than MP4.
Of course once you take care or your existing MP4s you can just run the normal conversion scripts against your library to take care of AVIs, MPG, MKV, etc.
Iâll help with the different iterations you will need but want to start you off with an EASY SQL to get your âfeet wetâ.
Is there a way to Have this script search for anything that is not MP4 and than convert accordingly? The issues i have is that sometimes i have to restart the server or have to close the conversion script and when i restart it it want to convert everything all over again.
My File structure:
Move and TV show Directory that contains all Plex content with a mix of file extensions⊠ie⊠mp4, avi, mkv.
X:/TV Shows
X:/Movies
I run the manual.py on the need directory. Lets say x: v shows and it starts from the first file and works it way down, but if it stops for any reason when i restart it will start all over even if the file is mp4.
FFMPEG settings with in autoprocess.ini
[MP4]
ffmpeg = ffmpeg.exe
ffprobe = ffprobe.exe
threads = auto
output_directory = E:\Newsgroups\Completed\DONE
copy_to =
move_to =
output_extension = mp4
output_format = mp4
delete_original = True
relocate_moov = True
video-codec = h265,x265
video-bitrate = 8
video-max-width =
h265-max-level = 4.1
use-qsv-decoder-with-encoder = True
ios-audio = True
ios-first-track-only = False
ios-audio-filter = dynaudnorm
max-audio-channels =
audio-codec = ac3,mp3,dts,dca,aac
audio-language = eng
audio-default-language = eng
audio-channel-bitrate = 256
audio-filter =
subtitle-codec = srt
subtitle-language = eng
subtitle-default-language =
subtitle-encoding =
fullpathguess = True
convert-mp4 = False
tagfile = False
tag-language = en
download-artwork = Poster
download-subs = True
embed-subs = False
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt =
aac_adtstoasc = True
postopts =-preset,veryfast
preopts =
video-crf = 23