mdhiggins / sickbeard_mp4_automator

Automatically convert video files to a standardized format with metadata tagging to create a beautiful and uniform media library
MIT License
1.52k stars 201 forks source link

Duplicate audio tracks #333

Closed hazcod closed 8 years ago

hazcod commented 9 years ago

When processing certain media files, I get the same audio tracks twice. (twice AAC stereo, twice AC 5.1)

Media info:

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="3" librarySectionTitle="Films" librarySectionUUID="b3176d59-a4c7-46f9-9303-b7aca041ac1f" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1440324229">
<Video ratingKey="18" key="/library/metadata/18" guid="com.plexapp.agents.imdb://tt2820852?lang=nl" studio="Universal Pictures" type="movie" title="Furious 7" contentRating="PG-13" summary="Nu Owen Shaw is uitgeschakeld door Dominic Toretto en zijn crew, is Shaw's broer Deckard Shaw uit op wraak. Na de dood van Han, is ook Dominic uit op wraak. Samen met zijn crew en "Mr. Nobody" gaan ze op zoek naar een hackprogramma genaamd 'God's Eye', om zo achter Deckard's locatie te kunnen komen en hem uit te schakelen." rating="7.6" viewOffset="7258413" viewCount="1" lastViewedAt="1443796005" year="2015" thumb="/library/metadata/18/thumb/1443795976" art="/library/metadata/18/art/1443795976" duration="8394869" originallyAvailableAt="2015-04-03" addedAt="1443795933" updatedAt="1443795976" chapterSource="media">
<Media videoResolution="1080" id="16" duration="8394869" bitrate="9455" width="1920" height="800" aspectRatio="2.35" audioChannels="6" audioCodec="ac3" videoCodec="h264" container="mp4" videoFrameRate="24p" optimizedForStreaming="0" has64bitOffsets="1">
<Part accessible="1" exists="1" id="16" key="/library/parts/16/file.mp4" duration="8394869" file="/tmp/media/movies/Furious 7 (2015)/Furious 7.mp4" size="9921219156" container="mp4" has64bitOffsets="1" optimizedForStreaming="0">
<Stream id="67" streamType="1" codec="h264" index="0" bitrate="8554" language="English" languageCode="eng" bitDepth="8" cabac="1" chromaSubsampling="4:2:0" codecID="avc1" colorSpace="yuv" duration="8394857" frameRate="23.976" frameRateMode="vfr" hasScalingMatrix="0" height="800" level="41" profile="high" refFrames="5" scanType="progressive" streamIdentifier="1" width="1920"/>
<Stream id="70" streamType="1" codec="h264" index="0" bitrate="8554" language="English" languageCode="eng" bitDepth="8" cabac="1" chromaSubsampling="4:2:0" codecID="avc1" colorSpace="yuv" duration="8394857" frameRate="23.976" frameRateMode="vfr" hasScalingMatrix="0" height="800" level="41" profile="high" refFrames="5" scanType="progressive" streamIdentifier="1" width="1920"/>
<Stream id="68" streamType="2" selected="1" codec="aac" index="1" channels="2" bitrate="256" language="English" languageCode="eng" audioChannelLayout="stereo" bitrateMode="cbr" codecID="40" duration="8394869" profile="lc" samplingRate="48000" streamIdentifier="2"/>
<Stream id="71" streamType="2" codec="aac" index="1" channels="2" bitrate="256" language="English" languageCode="eng" audioChannelLayout="stereo" bitrateMode="cbr" codecID="40" duration="8394869" profile="lc" samplingRate="48000" streamIdentifier="2"/>
<Stream id="69" streamType="2" codec="ac3" index="2" channels="6" bitrate="640" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="16" bitrateMode="cbr" codecID="ac-3" dialogNorm="-31" duration="8394847" samplingRate="48000" streamIdentifier="3"/>
<Stream id="72" streamType="2" codec="ac3" index="2" channels="6" bitrate="640" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="16" bitrateMode="cbr" codecID="ac-3" dialogNorm="-31" duration="8394847" samplingRate="48000" streamIdentifier="3"/>
<Stream id="66" key="/library/streams/66" streamType="3" codec="srt" format="srt"/>
</Part>
</Media>
<Genre id="41" tag="Actie" count="3"/>
<Genre id="80" tag="Avontuur"/>
<Genre id="138" tag="Misdaad"/>
<Genre id="43" tag="Romantiek" count="2"/>
<Genre id="40" tag="Thriller" count="2"/>
<Writer id="266" tag="Chris Morgan"/>
<Director id="265" tag="James Wan"/>
<Producer id="290" tag="Vin Diesel"/>
<Producer id="291" tag="Neal H. Moritz"/>
<Producer id="292" tag="Michael Fottrell"/>
<Producer id="293" tag="Brandon Birtell"/>
<Country id="294" tag="Japan"/>
<Country id="47" tag="USA" count="3"/>
<Role id="267" tag="Vin Diesel" role="Dominic Toretto" thumb="http://image.tmdb.org/t/p/original/qwyfzMKIhxJ7ols66FgEf7eGdcI.jpg"/>
<Role id="268" tag="Paul Walker" role="Brian O'Conner" thumb="http://image.tmdb.org/t/p/original/iqvYezRoEY5k8wnlfHriHQfl5dX.jpg"/>
<Role id="269" tag="Jason Statham" role="Deckard Shaw" thumb="http://image.tmdb.org/t/p/original/PhWiWgasncGWD9LdbsGcmxkV4r.jpg"/>
<Role id="270" tag="Michelle Rodriguez" role="Letty Ortiz" thumb="http://image.tmdb.org/t/p/original/v37VK0MNuRuJOCKPKJcZAJXRA5r.jpg"/>
<Role id="271" tag="Dwayne Johnson" role="Luke Hobbs" thumb="http://image.tmdb.org/t/p/original/51mFgfOelhiAdNmFKL0dHOJizyb.jpg"/>
<Role id="272" tag="Jordana Brewster" role="Mia Toretto" thumb="http://image.tmdb.org/t/p/original/dORwXZWWmDgG66I5i2Fnr27g3fO.jpg"/>
<Role id="273" tag="Tyrese Gibson" role="Roman Pearce" thumb="http://image.tmdb.org/t/p/original/8AaJIsIb7yJcfwcgbD7qsT6ameq.jpg"/>
<Role id="274" tag="Chris "Ludacris" Bridges" role="Tej Parker" thumb="http://image.tmdb.org/t/p/original/xLfq9wFO6dtYuUK96hbJ8I8EKFw.jpg"/>
<Role id="275" tag="Kurt Russell" role="Mr. Nobody" thumb="http://image.tmdb.org/t/p/original/r3oJkdyBOs3ZWmamgNQzcvDGaxc.jpg"/>
<Role id="276" tag="Nathalie Emmanuel" role="Ramsey" thumb="http://image.tmdb.org/t/p/original/h8IpkPu419RtRGYCDrMOesRuxIB.jpg"/>
<Role id="277" tag="Djimon Hounsou" role="Slim" thumb="http://image.tmdb.org/t/p/original/y22Pb0XAVqC0l7ukzKKtXzPEuHk.jpg"/>
<Role id="278" tag="Lucas Black" role="Sean Boswell" thumb="http://image.tmdb.org/t/p/original/41qZZc6vRVm5ZOoXWfEf5NGoIZR.jpg"/>
<Role id="279" tag="Elsa Pataky" role="Elena" thumb="http://image.tmdb.org/t/p/original/c1km2kqasJT9GTISMbBZpp3jbuR.jpg"/>
<Role id="158" tag="Ronda Rousey" role="Kara" thumb="http://image.tmdb.org/t/p/original/rspN0StWezXvYevDlN6AOJeg9rA.jpg"/>
<Role id="280" tag="Iggy Azalea" role="Female Racer" thumb="http://image.tmdb.org/t/p/original/9exqnQwXU3kHeJ6AYgWZmHjNBn5.jpg"/>
<Role id="281" tag="Tony Jaa" role="Louie Tran" thumb="http://image.tmdb.org/t/p/original/qq0uXKe3aKaAE04QQ0BvbbFFufF.jpg"/>
<Role id="282" tag="Shad Moss" role="Twinkie" thumb="http://image.tmdb.org/t/p/original/A1rHY9B5R9cIQshClcJxBYINg1m.jpg"/>
<Role id="283" tag="Noel Gugliemi" role="Hector" thumb="http://image.tmdb.org/t/p/original/mI5urNyZJAzIGxelTjBkm624DkB.jpg"/>
<Role id="284" tag="Ali Fazal" role="Zafar" thumb="http://image.tmdb.org/t/p/original/AmT132VCz3InJBAQQPJnqqgsQsB.jpg"/>
<Role id="285" tag="John Brotherton" role="Sheppard" thumb="http://image.tmdb.org/t/p/original/cxCXFaFpgPRTxuXydI53hGvUMgk.jpg"/>
<Role id="286" tag="Sung Kang" role="Han" thumb="http://image.tmdb.org/t/p/original/fqt53KEfHWsRDcbV2YAY2lKlKrM.jpg"/>
<Role id="287" tag="Luke Evans" role="Owen Shaw" thumb="http://image.tmdb.org/t/p/original/1d31uDYub8TaLOPWfgX78OotduD.jpg"/>
<Role id="288" tag="Gal Gadot" role="Gisele" thumb="http://image.tmdb.org/t/p/original/2cg8JtFg7WhUkYTNKXqlL9F1M3v.jpg"/>
<Role id="289" tag="Cody Walker" role="Brian O'Connor" thumb="http://image.tmdb.org/t/p/original/zqXhPtAXCoXbLlf9y9TWf2Y8Wij.jpg"/>
<Extras size="0"></Extras>
</Video>
</MediaContainer>

Config:

[SickBeard]
host = localhost
port = 8081
username =
password =
web_root =
ssl = 0
api_key =

[Sonarr]
host = localhost
port = 8989
web_root =
ssl = 0
apikey =

[MP4]
ffmpeg = ffmpeg
ffprobe = ffprobe
output_directory =
copy_to =
move_to =
output_extension = mp4
output_format = mp4
delete_original = True
relocate_moov = True
video-codec = h264,x264
video-bitrate =
video-max-width = 
h264-max-level = 5.1
ios-audio = True
ios-first-track-only = False
max-audio-channels =
audio-codec = ac3
audio-language = eng,nld
audio-default-language = eng
audio-channel-bitrate = 256
subtitle-codec = srt
subtitle-language = eng,nld
subtitle-default-language = nld
fullpathguess = True
convert-mp4 = True
tagfile = True
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 =

[CouchPotato]
host = localhost
port = 5050
username = xxxxxxxx
password = xxxxxxxx
web_root = couchpotato
ssl = 0
apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
delay = 65
method = renamer
delete_failed = 1

[uTorrent]
convert =
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sonarr-label = sonarr
bypass-label = bypass
sickrage-label = sickrage
webui = False
action_before = stop
action_after = removedata
host = http://localhost:8080/
username =
password =

[Deluge]
host = localhost
username =
convert = True
password =
sonarr-label = sonarr
bypass-label = bypass
sickbeard-label = sickbeard
port = 58846
sickrage-label = sickrage
couchpotato-label = couchpotato

[SABNZBD]
convert = True
sickrage-category = series
sonarr-category = sseries
bypass-category = bypass
couchpotato-category = movies
sickbeard-category = sbmovies

[Sickrage]
host = localhost
port = 8081
username =
password =
web_root =
ssl = 0
api_key =

[Plex]
host = localhost
port = 32400
refresh = True
token =
mdhiggins commented 9 years ago

Try turning off the convert-mp4 option, I think you may be double processing and see if that helps.

hazcod commented 9 years ago

Hmm, will really test later, I want to convert mp4s too in case they have DTS audio.

mdhiggins commented 9 years ago

The problem here I think is that you're converting twice, once when the download finishes, and again when the media manager (SB/CP) finishes its process. If you want to be able to convert mp4 files, then you'll probably need to turn off the convert option under whatever downloaders you use.

hazcod commented 9 years ago

what makes you think I do it twice? I only set it as a script on Sabnzbd.

mdhiggins commented 9 years ago

You're not using the script with any of the download managers? (Sickbeard, Sickrage, or Couch Potato)

hazcod commented 9 years ago

I am using it in SabNZBd, who then notifies CouchPotato it is finished

mdhiggins commented 9 years ago

And do you have the couch potato post processing script installed as well?

On Mon, Oct 5, 2015 at 2:41 AM, HazCod notifications@github.com wrote:

I am using it in SabNZBd, who then notifies CouchPotato it is finished

Reply to this email directly or view it on GitHub: https://github.com/mdhiggins/sickbeard_mp4_automator/issues/333#issuecomment-145443700

hazcod commented 9 years ago

Nope, removed it when switching the script to Sabnzbd

ls .couchpotato/custom_plugins
__init__.py
mdhiggins commented 9 years ago

Can you post the source file that's giving you problems? or email me a link

mdhiggins commented 8 years ago

Any updates?

hazcod commented 8 years ago

Ahh, sorry man, I am quite busy. I will upload the file for you today.

hazcod commented 8 years ago

I'ts not occuring anymore and I can't seem to find the source file again.. so let's just hope I don't download any mp4s :)