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.51k stars 201 forks source link

Using external subtitles + unconverted files not removed #526

Closed kocane closed 4 years ago

kocane commented 8 years ago

Is there any setting that should make it possible to use subtitles that are accompanied in a download? For instance, I got a season from a show which is downloaded and the mkv files are processed correctly but despite there seeming to be correct file permissions, the .srt accomplanied are not used. Is there a way to make it so? They're usually good.

Another thing, when downloading into sickrage (which I use over Sonarr for other reasons), the old unconverted files are not removed? In sickrage, do I need to enable post processing or merely point to the 'extra script'? What should I set the "download folder" to, and how often to scan?

mdhiggins commented 8 years ago

Assuming subtitles are appropriately named they will be included if they accompany the download

Problem is different release groups use different naming conventions so this isn't easy to reliably automate.

And you need to set delete-original to True to clean out the original mkv file. Additional download garbage that gets included with the download is cleaned up by the various programs (Sickbeard, Sickrage, etc). And yes you need to set your extra_script. You don't need to set a download folder or a scanning frequency if you've set up all the scripts appropriately - the downloader scripts will notify Sickrage when they are finished downloading.

kocane commented 8 years ago

@mdhiggins this is the download in question:

rw-rw-rw- 1 root        root  834834452 Aug  7 19:46 Game.Of.Thrones.S01E01.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      39582 Aug  7 19:30 Game.Of.Thrones.S01E01.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rwxrwxr-- 1 couchpotato users       192 Aug  8 00:29 Game.Of.Thrones.S01E01.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.unknown.ignore
-rw-rw-rw- 1 root        root  748959276 Aug  7 19:45 Game.Of.Thrones.S01E02.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      41699 Aug  7 19:30 Game.Of.Thrones.S01E02.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  775247183 Aug  7 19:46 Game.Of.Thrones.S01E03.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      56057 Aug  7 19:30 Game.Of.Thrones.S01E03.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  753657547 Aug  7 19:41 Game.Of.Thrones.S01E04.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      58497 Aug  7 19:30 Game.Of.Thrones.S01E04.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  735129403 Aug  7 19:42 Game.Of.Thrones.S01E05.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      57553 Aug  7 19:30 Game.Of.Thrones.S01E05.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  712735010 Aug  7 19:40 Game.Of.Thrones.S01E06.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      42245 Aug  7 19:30 Game.Of.Thrones.S01E06.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  782817964 Aug  7 19:43 Game.Of.Thrones.S01E07.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      56844 Aug  7 19:30 Game.Of.Thrones.S01E07.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  787471209 Aug  7 19:41 Game.Of.Thrones.S01E08.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      50431 Aug  7 19:30 Game.Of.Thrones.S01E08.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  762228129 Aug  7 19:40 Game.Of.Thrones.S01E09.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      50624 Aug  7 19:30 Game.Of.Thrones.S01E09.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt
-rw-rw-rw- 1 root        root  712912848 Aug  7 19:42 Game.Of.Thrones.S01E10.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.mkv
-rw-rw-rw- 1 root        root      43693 Aug  7 19:30 Game.Of.Thrones.S01E10.1080p.5.1Ch.BluRay.ReEnc-DeeJayAhmed.srt

after conversion and insertion to sickrage:

-rwxrwxrwx 1 root root 1131912727 Aug  7 19:52 Game of Thrones - S01E01 - Winter Is Coming - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root 1015531345 Aug  7 20:28 Game of Thrones - S01E02 - The Kingsroad - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root 1051273806 Aug  7 20:10 Game of Thrones - S01E03 - Lord Snow - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root 1021872975 Aug  7 20:22 Game of Thrones - S01E04 - Cripples, Bastards, and Broken Things - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root  996971261 Aug  7 20:33 Game of Thrones - S01E05 - The Wolf and the Lion - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root  966410372 Aug  7 20:45 Game of Thrones - S01E06 - A Golden Crown - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root 1061430723 Aug  7 20:04 Game of Thrones - S01E07 - You Win or You Die - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root 1067868750 Aug  7 19:58 Game of Thrones - S01E08 - The Pointy End - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root 1033634946 Aug  7 20:16 Game of Thrones - S01E09 - Baelor - Unknown-DeeJayAhmed.mp4
-rwxrwxrwx 1 root root  966619671 Aug  7 20:39 Game of Thrones - S01E10 - Fire and Blood - Unknown-DeeJayAhmed.mp4

The subtitles missing... and those MKVs are still there despite "delete-original" is set to true.

This is my autoprocess.ini:

[MP4]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = 4
output_directory =
copy_to =
move_to =
output_extension = mp4
output_format = mp4
delete_original = True
relocate_moov = True
video-codec = h264,x264,hevc,h265,x265,HEVC,mpeg4,MPEG-4,MPEG-H,h.265,h.264
video-bitrate =
video-max-width =
h264-max-level =
use-qsv-decoder-with-encoder = True
ios-audio = libfdk_aac, aac
ios-first-track-only = False
max-audio-channels =
audio-codec = ac3
audio-language = eng,dan
audio-default-language = eng
audio-channel-bitrate = 256
subtitle-codec = srt
subtitle-language = eng
subtitle-default-language = eng
subtitle-encoding = utf-8
fullpathguess = True
convert-mp4 = True
tagfile = True
tag-language = en
download-artwork = False
download-subs = False
embed-subs = True
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt =

What am I missing? Permissions seem to be OK?

Also, when you say that I shouldn't set download folder nor scanning frequency in sickrage, does this mean that the "post processing" feature should not be "enabled"? http://i.imgur.com/SpRATEa.png

mdhiggins commented 8 years ago

This must be a permissions issue. You can check info.log and see if there are any errors indicating deleting the original failed

And you do not need to use the "Post Processing" feature

kocane commented 8 years ago

@mdhiggins Permisions are RW for anyone. I just cannot make it remove those old files and copy the subtitles. If subtitles are located inside a folder called subs or subtitles; do they still get moved? I wouldn't expect them to but even when they are placed right next to the MP4, they do not get moved. However, it does seem that if it is an MKV it extract the subtitles and it does move them.

kocane commented 8 years ago

This is my current config:

[MP4]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = auto
output_directory = 
copy_to = 
move_to = 
output_extension = mp4
output_format = mp4
delete_original = True
relocate_moov = True
video-codec = h264,x264,hevc,h265,x265,HEVC,mpeg4,MPEG-4,MPEG-H,h.265,h.264
video-bitrate = 
video-max-width = 
h264-max-level = 
use-qsv-decoder-with-encoder = False
ios-audio = libfdk_aac,aac,a_aac,libfaac
ios-first-track-only = True
max-audio-channels = 
audio-codec = ac3,libfdk_aac,a_ac3,ac-3,a_aac,aac,libfaac
audio-language = eng,dan
audio-default-language = eng
audio-channel-bitrate = 96
subtitle-codec = mov_text
subtitle-language = eng
subtitle-default-language = eng
subtitle-encoding = utf-8
fullpathguess = True
convert-mp4 = False
tagfile = True
tag-language = en
download-artwork = False
download-subs = False
embed-subs = False
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt = 

[CouchPotato]
host = localhost
port = 5050
username = ******
password = *****
web_root = 
ssl = 0
apikey = 85bf637f5b824dce83c77d79bfd7473a
delay = 35
method = renamer
delete_failed = 0

[Deluge]
host = localhost
username = deluge
convert = True
password = *******
sonarr-label = sonarr
bypass-label = bypass
sickbeard-label = sickbeard
port = 58846
sickrage-label = tv
couchpotato-label = movie
kocane commented 8 years ago

@mdhiggins SABNZBD downloads does seem to get the original file deleted. Although not the folder.