clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
674 stars 176 forks source link

New Setup #851

Closed elit3ge closed 7 months ago

elit3ge commented 9 years ago

Hi, I am currently in the process of moving from Sickrage autoprocess folder to your nzbtomedia. At the moment I have a script that runs to convert all media files upon download to .mp4 h264 and aac.

That is basing it on current downloads that come down in .mkv

I have fiddled around with the settings but it seems to want to just convert the whole file again.

So what would I change?

[Transcoder]

getsubs. enable to download subtitles.

getSubs = 0
# subLanguages. create a list of languages in the order you want them in your subtitles. 
subLanguages = eng
# transcode. enable to use transcoder
transcode = 1
###### duplicate =1 will cretae a new file. =0 will replace the original
duplicate = 1
# concat. joins cd1 cd2 etc into a single video.
concat = 1
ignoreExtensions = ""
# outputFastStart. 1 will use -movflags + faststart. 0 will disable this from being used.
outputFastStart = 0
# outputQualityPercent. used as -q:a value. 0 will disable this from being used.
outputQualityPercent = ""
# outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable.
outputVideoPath = ""
# processOutput. 1 will send the outputVideoPath to SickBeard/CouchPotato. 0 will send original files.
processOutput = 0
# audioLanguage. set the 3 letter language code you want as your primary audio track.
audioLanguage = eng
# allAudioLanguages. 1 will keep all audio tracks (uses AudioCodec3) where available.
allAudioLanguages = 0
# allSubLanguages. 1 will keep all exisiting sub languages. 0 will discare those not in your list above.
allSubLanguages = 0
# embedSubs. 1 will embded external sub/srt subs into your video if this is supported.
embedSubs = 1
# burnInSubtitle. burns the default sub language into your video (needed for players that don't support subs)
burnInSubtitle = 0
# extractSubs. 1 will extract subs from the video file and save these as external srt files.
extractSubs = 0
# externalSubDir. set the directory where subs should be saved (if not the same directory as the video)
externalSubDir = ""
# hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg)
hwAccel = 0
# generalOptions. Enter your additional ffmpeg options here with commas to separate each option/value (i.e replace spaces with commas).
generalOptions = ""
# outputDefault. Loads default configs for the selected device. The remaining options below are ignored.
# If you want to use your own profile, leave this blank and set the remaining options below.
# outputDefault profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, xbox, Roku-1080p, Roku-720p, Roku-480p, mkv, mp4-scene-release
outputDefault = None
#### Define custom settings below.
outputVideoExtension = .mp4
outputVideoCodec = libx264
VideoCodecAllow = ""
outputVideoPreset = ""
outputVideoResolution = 1920:1080
outputVideoFramerate = ""
outputVideoBitrate = ""
outputVideoCRF = 19
outputVideoLevel = 3.1
outputAudioCodec = aac
AudioCodecAllow = ""
outputAudioChannels = ""
outputAudioBitrate = ""
outputAudioTrack2Codec = libfaac
AudioCodec2Allow = ""
outputAudioTrack2Channels = 2
outputAudioTrack2Bitrate = ""
outputAudioOtherCodec = libmp3lame
AudioOtherCodecAllow = ""
outputAudioOtherChannels = 2
outputAudioOtherBitrate = 128k
outputSubtitleCodec = ""
elit3ge commented 9 years ago

Here is the project I was using.

https://github.com/mdhiggins/sickbeard_mp4_automator

clinton-hall commented 9 years ago

If you are just looking to convert the .mkv to .mp4, try outputDefault = iPad-1080p or outputDefault = mp4-scene-release

Otherwise, when using custom settings you need to define the allowed video and audio codecs

VideoCodecAllow = ""
AudioCodecAllow = ""
AudioCodec2Allow = ""
AudioOtherCodecAllow = ""

as it will transcode any codecs not in these lists.

elit3ge commented 9 years ago

Ok, So I tried running it with mp4-scene-release and had no luck so I change it to none and change the settings to the included picture.

Idealy what I am after is to copy video track if its the same and the sound, but if its more than 2 channels convert it or if its another extension convert it.

Any changes I make and start to PP I just get an error and it fails.

Attached log; https://gist.github.com/elit3ge/55e2f90b08b95735f8f9

settings

clinton-hall commented 9 years ago

Please edit autoProcessMedia.cfg and set [General] log_debug = 1

Then try processing again and check the logs to see what ffmpeg command is called.

elit3ge commented 9 years ago

https://gist.github.com/elit3ge/578d1d3b0db9cbf66500

clinton-hall commented 9 years ago

Looks familiar, I think something is going funny with the subtitle metadata. Can you try again with the option "embed subs" disabled?

elit3ge commented 9 years ago

That seemed to be the issue, but now I seem to be getting 2 audio streams in my videos and the 720p videos are displaying an error about global headers.

clinton-hall commented 9 years ago

Where are these global error headers displayed?

clinton-hall commented 9 years ago

If you only want 1 audio track, keep the outputaudio2 codec and outputaudiother codec as blank fields.

elit3ge commented 9 years ago

Here I am running the command in cmd after it fails in nzbget to see what the error was. headers

Ok cool, that fixed the sound issues but on that note it doesn't seem to be setting the eng to the audio track.

elit3ge commented 9 years ago

This is the probe of the file.

https://gist.github.com/elit3ge/26bae575726abebab426

clinton-hall commented 9 years ago

ok.. set outputSubtitleCodec = mov_text that should be the last piece of the puzzle.

elit3ge commented 9 years ago

Beautiful! but I am still having issues with the SD eng audio track.

After this is done, is there a way I could "buy" you a drink?

clinton-hall commented 9 years ago

SD eng audio issues? please elaborate.

If you really want, click on the website linked in my profile here...

elit3ge commented 9 years ago

It doesn't make the channel "English" leaves it as unknown.

clinton-hall commented 9 years ago

Ah... I may have to look into this one...