I’m looking for a script that will convert my avi,mkv etc into plex direct play mp4 format ( remox or re-encode ) via ffmpeg and handbrake on linux I’ve tried a bunch of the scripts on here and for one reason or another none fit my needs I want to keep the quality level the exact same and just change the container. As I said I got up $50usd for a working script.
Download this script https://github.com/mdhiggins/sickbeard_mp4_automator.
Prerequisites:
- Python (install with package manager)
- FFmpeg (install with package manager)
- Python setup-tools (install with package manager)
pip install requestspip install requests[security]pip install requests-cachepip install babelfishpip install "guessit<2"pip install stevedore==1.19.1pip install python-dateutil
Then in the sickbeard_mp4_automator folder, create autoProcess.ini and copy/paste the following:
[MP4]
ffmpeg = /usr/bin/ffmpeg
ffprobe = /usr/bin/ffprobe
threads = auto
output_directory =
copy_to =
move_to =
output_extension = mp4
output_format = mp4
delete_original = True
relocate_moov = False
video-codec = h264,x264
video-bitrate =
video-crf =
video-max-width =
h264-max-level =
use-qsv-decoder-with-encoder = false
use-hevc-qsv-decoder = False
enable_dxva2_gpu_decode = False
ios-audio = False
ios-first-track-only = False
ios-audio-filter =
ios-move-last = False
max-audio-channels =
audio-codec = ac3,aac
audio-language =
audio-default-language =
audio-channel-bitrate =
audio-filter =
audio-copy-original = False
subtitle-codec = mov_text
subtitle-language =
subtitle-default-language =
subtitle-encoding =
fullpathguess = True
convert-mp4 = False
tagfile = True
tag-language = en
download-artwork = False
download-subs = False
embed-subs = False
embed-only-internal-subs = False
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
post-process = False
pix-fmt =
aac_adtstoasc = False
permissions = 777
These settings should do what you want to accomplish, but you can change them if you want of course.
Now in the command line you can cd to the sickbeard_mp4_automator folder and run ./manual.py -i [VIDEOPATH] -a
Or if you want a bash script, create something like postprocess.sh with the following contents:
#!/bin/bash
inputfile=$1
/path/to/sickbeard_mp4_automator/manual.py -i $inputfile -a
So you could just run ./postprocess.sh [VIDEOPATH]
Although not using handbrake, I guess this comes close to your wishes.
Good luck
THANK YOU!!!