Closed natoriousbigg closed 7 years ago
I think I found the problem. This mkv file contains sub/idx subtitle, which does not have an two letter coding for language at the end: The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.sub. Thus ffmpeg is detecting "X264-AMIABLE" as the language, causing it to fail during transcoding.
Can we add a feature to default to a specified language if the language for the audio/subtitle is specified?
Hopefully this is resolved in currently nightly. please check and confirm.
Let me check and get back to you on this.
This works correctly now. Here's an example from the other subtitle bug fix. I tried to trip up nzbtomedia by adding trying to embed this subtitle: Return to Never Land (2002) 1080p.x264.aaaaaaa.srt. The "aaaaaaa" was ignore (no language metadata added) and subtitle embedded correctly.
nice -n6 ionice -c0 -n0 /usr/bin/ffmpeg -loglevel warning -fflags +genpts -i /mnt/downloads/movies/Return to Never Land (2002) 1080p.x264.mkv.cp(tt0280030)/Return to Never Land (2002) 1080p.x264.mkv -i /mnt/downloads/movies/Return to Never Land (2002) 1080p.x264.mkv.cp(tt0280030)/Return to Never Land (2002) 1080p.x264.aaaaaaa.srt -i /mnt/downloads/movies/Return to Never Land (2002) 1080p.x264.mkv.cp(tt0280030)/Return to Never Land (2002) 1080p.x264.en.srt -map 0:2 -map 0:3 -map 0:3 -map 1:0 -map 2:0 -c:v copy -c:a:0 aac -strict -2 -ac:a:0 2 -b:a:0 160000 -c:a:1 copy -c:s mov_text -metadata:s:s:1 language=eng -movflags +faststart /mnt/downloads/movies/Return to Never Land (2002) 1080p.x264.mkv.cp(tt0280030)/Return to Never Land (2002) 1080p.x264.mp4
Thanks!
glad it works. I'm ging to try and merge this all up to master soon.
My setup: UnRAID 6.1 with SABnzbd and CouchPotato running in dockers.
I'm trying to use the transcoding feature to transcoding MKV -> MP4, converting DTS to AC3 and AAC using the "Roku-1080p" profile. I notice that transcoding fail when embedding subtitle feature is turned on (embedSubs = 1). When I turn off that feature, it seems to work it works.
And as a separate issue, subtitle/audio language is being incorrectly detected and the release group name is being used instead (language=X264-AMIABLE). Please see attached log and config file below.
Error log:
<[15:01:10] [INFO]::MAIN: Loading config from [/scripts/autoProcessMedia.cfg] [15:01:10] [INFO]::ENVIRONMENT: LANG: en_US.UTF-8 [15:01:10] [INFO]::ENVIRONMENT: TERM: xterm [15:01:10] [INFO]::ENVIRONMENT: PGID: 100 [15:01:10] [INFO]::ENVIRONMENT: LANGUAGE: en_US:en [15:01:10] [INFO]::ENVIRONMENT: DEBIAN_FRONTEND: noninteractive [15:01:10] [INFO]::ENVIRONMENT: OLDPWD: / [15:01:10] [INFO]::ENVIRONMENT: HOSTNAME: Tower [15:01:10] [INFO]::ENVIRONMENT: PUID: 99 [15:01:10] [INFO]::ENVIRONMENT: PWD: /scripts [15:01:10] [INFO]::ENVIRONMENT: APTLIST: sabnzbdplus unrar wget [15:01:10] [INFO]::ENVIRONMENT: PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin [15:01:10] [INFO]::ENVIRONMENT: HOME: /root [15:01:10] [INFO]::ENVIRONMENT: TZ: America/Guatemala [15:01:10] [INFO]::ENVIRONMENT: LC_ALL: en_US.UTF-8 [15:01:10] [INFO]::MAIN: Checking database structure... [15:01:10] [DEBUG]::MAIN: Checking Initial Schema database upgrade [15:01:10] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',) [15:01:10] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version [15:01:10] [DEBUG]::MAIN: InitialSchema upgrade not required [15:01:10] [INFO]::MAIN: Version checking is disabled, not checking for the newest version [15:01:10] [INFO]::MAIN: nzbToMedia Version:10.15 Branch:master (Linux 4.1.18-unRAID) [15:01:10] [INFO]::MAIN: ######################################################### [15:01:10] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## [15:01:10] [INFO]::MAIN: ######################################################### [15:01:10] [DEBUG]::MAIN: Options passed into nzbToMedia: ['./nzbToMedia.py', '/downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)', 'The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.nzb', 'movies', '', 'generic'] [15:01:10] [INFO]::MAIN: Script triggered from generic program [15:01:10] [INFO]::MAIN: Auto-detected SECTION:CouchPotato [15:01:10] [DEBUG]::MAIN: Checking for archives to extract in directory: /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852) [15:01:10] [INFO]::MAIN: Calling CouchPotato:movies to post-process:The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.nzb [15:01:10] [INFO]::MAIN: Attemping imdbID lookup for The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.nzb [15:01:10] [INFO]::MAIN: Searching folder and file names for imdbID ... [15:01:10] [INFO]::MAIN: Found imdbID [tt0061852] [15:01:10] [DEBUG]::MAIN: Opening URL: http://localhost:5050/api/1e219945fd35486aad77ea6b09e63608/media.get with PARAMS: {'id': 'tt0061852'} [15:01:10] [DEBUG]::MAIN: calling command: /scripts/ffmpeg/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /scripts/tests/test.mp4 [15:01:10] [INFO]::TRANSCODER: Checking [The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mkv] for corruption, please stand by ... [15:01:10] [DEBUG]::MAIN: calling command: /scripts/ffmpeg/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mkv [15:01:10] [INFO]::TRANSCODER: SUCCESS: [The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mkv] has no corruption. [15:01:10] [INFO]::MAIN: Checking for files to be transcoded [15:01:10] [DEBUG]::MAIN: calling command: /scripts/ffmpeg/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mkv [15:01:10] [DEBUG]::MAIN: calling command: /scripts/ffmpeg/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.idx [15:01:10] [DEBUG]::MAIN: calling command: /scripts/ffmpeg/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.sub [15:01:10] [INFO]::MAIN: Transcoding video: /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mp4 [15:01:10] [DEBUG]::MAIN: calling command: nice -n0 ionice -c0 -n0 /scripts/ffmpeg/ffmpeg -loglevel warning -fflags +genpts -i /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mkv -i /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.idx -i /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.sub -map 0:0 -map 0:1 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -map 1:0 -map 2:0 -c:v copy -c:a:0 aac -strict -2 -ac:a:0 2 -b:a:0 160000 -c:a:1 ac3 -c:s mov_text -metadata:s:s:4 language=X264-AMIABLE -metadata:s:s:5 language=X264-AMIABLE /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mp4 [15:01:10] [ERROR]::MAIN: Transcoding of video to /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852)/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.mp4 failed with result 1 [15:01:10] [ERROR]::COUCHPOTATO: Transcoding failed for files in /downloads/movies/The.Jungle.Book.1967.720p.BluRay.X264-AMIABLE.cp(tt0061852) [15:01:10] [ERROR]::MAIN: A problem was reported in the ./nzbToMedia.py script. CouchPotato: Failed to post-process - Transcoding failed!
Configuration:
` [General]
Enable/Disable update notifications
[Posix]
Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.
[CouchPotato]
autoProcessing for Movies
[SickBeard]
autoProcessing for TV Series
[NzbDrone]
autoProcessing for TV Series
[HeadPhones]
autoProcessing for Music
[Mylar]
autoProcessing for Comics
[Gamez]
autoProcessing for Games
[Network]
Enter Mount points as LocalPath,RemotePath and separate each pair with '|'
[Nzb]
clientAgent - Supported clients: sabnzbd, nzbget
[Torrent]
clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, other
[Extensions] compressedExtensions = .zip, .rar, .7z, .gz, .bz, .tar, .arj, .1, .01, .001 mediaExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg, .vob, .iso, .m4v, .ts audioExtensions = .mp3, .aac, .ogg, .ape, .m4a, .asf, .wma, .flac metaExtensions = .nfo, .sub, .srt, .jpg, .gif
[Plex]
Only enter these details if you want to update plex library after processing.
[Transcoder]
getsubs. enable to download subtitles.
[WakeOnLan]
set wake = 1 to send WOL broadcast to the mac and test the server (e.g. xbmc) the host and port specified.
[UserScript]
Use user_script for uncategorized downloads
[ASCII]
Set convert =1 if you want to convert any "foreign" characters to ASCII (UTF8) before passing to SB/CP etc. Default is disabled (0).
[passwords]
enter the full path to a text file containing passwords to be used for extraction attempts.
[Custom]
enter a list (comma separated) of Group Tags you want removed from filenames to help with subtitle matching.