dcthomson / mkvdts2ac3.py

python script for linux, windows or os x which can be used to convert the DTS in Matroska (MKV) files to AC3
29 stars 9 forks source link

No DTS tracks found #12

Open exxogene opened 10 years ago

exxogene commented 10 years ago

Dear dcthomson,

i like your great script and it works for me for some time.

But now it do not find any DTS inside the mkv files anymore. When i use the -vvv switch it says "No DTS tracks found". This happens regardless of the mkv files i try to convert, even with the test files provided by you.

I run the script on Win7 x64 with Python 2.7.8 and ffmpeg-20140711-git-0089fb7-win32 and mkvtoolnix-amd64-7.0.0.

Here are the options i use in the mkvdts2ac3.cfg:

aac = True

aacstereo = True

default = True

external = True

force = True initial = True

keepdts = True

mp4 = True

new = False nodts = True

no_subtitles = True

overwrite = True recursive = True

test = True

debug = True

I haven't edited the mkvdts2ac3.py. I've put python, mkvtoolnix and ffmpeg in the windows path variable.

Maybe i have messed something. Do you have any idea what is broken in my setup?

Thank you. /exxo

Blaapje commented 10 years ago

I ran into the same problem yesterday, trying to convert the test files.

After some investigation, i found that mkvtoolnix 7.x versions report the dts track as: TRACK ID 1: audio (DTS)

mkvdts2ac3.py is searching for a track as following: TRACK ID 1: audio (A_DTS)

I have tried fixing it by adjusting the code, but no luck. I'm not familiar with the code and don't have time to get familiarized with it, so maybe the author can figure this out.

The solution to the above is all quite simple though! Just downgrade your mkvtoolnix. I randomly grabbed version 6.1.0 and it's working as it should. Might be worth noting that I'm running all 32-bit versions (python, mkvtoolnix, ffmpeg-static).

dcthomson commented 10 years ago

Not best practices, but don't have time atm to look into this so I took your word for it and changed the conditional statements to look for DTS or A_DTS. Going to close this bug, but if there are still problems just reopen it, and I'll take a look sometime in the next week or two.

Blaapje commented 10 years ago

I tried that, works so-so.

It did remux the dts track to ac3, but failed on joining them again if I remember correctly. Now that I think of it, perhaps it is trying to join it as a A_DTS whereas it should be DTS with mkvtoolnix 7.0.

exxogene commented 10 years ago

Before your new commit i changed (like Blaapje) A_DTS to DTS in your script.

In Step 2 mkvextract references to A_DTS:


Extracting DTS track [2/4]... Running command: mkvextract tracks D:\Movies\Incoming\xxxxxxxxxxxxxxxxxxxx.mkv 1:d:\temp\tmpzpqq4q\mkvdts2ac3\xxxxxxxxxxxxxxxxxxxxxxxxxxx.dts Extracting track 1 with the CodecID 'A_DTS' to the file 'd:\temp\tmpzpqq4q\mkvdt s2ac3\xxxxxxxxxxxxxxxxxxxxx.dts'. Container format: Digital Theater System (DTS ) Progress: 100%

Step 3 is broken:

Converting DTS to AC3 [3/4]... Running command: ffmpeg -y -i d:\temp\tmpbbrvhr\mkvdts2ac3\exq-closedcircuit- 720p.dts -acodec ac3 -ac 6 -ab 448k d:\temp\tmpbbrvhr\mkvdts2ac3 \xxxxxxxxxxxxxxxxxxxxx.ac3 ffmpeg version N-64420-g939d22a Copyright (c) 2000-2014 the FFmpeg developers built on Jul 4 2014 22:09:53 with gcc 4.8.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab - -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 90.101 / 52. 90.101 libavcodec 55. 68.100 / 55. 68.100 libavformat 55. 45.100 / 55. 45.100 libavdevice 55. 13.101 / 55. 13.101 libavfilter 4. 10.100 / 4. 10.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 [dts @ 0000000002ae8860] Estimating duration from bitrate, this may be inaccurat e Input #0, dts, from 'd:\temp\tmpbbrvhr\mkvdts2ac3\xxxxxxxxxxxxxxxxxxx.dts': Duration: 01:36:01.56, start: 0.000000, bitrate: 768 kb/s Stream #0:0: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 768 kb/s [ac3 @ 0000000002b424c0] Using AVStream.codec.time_base as a timebase hint to th e muxer is deprecated. Set AVStream.time_base instead. Output #0, ac3, to 'd:\temp\tmpbbrvhr\mkvdts2ac3\exq-closedcircuit-720p.ac3': Metadata: encoder : Lavf55.45.100 Stream #0:0: Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s Metadata: encoder : Lavc55.68.100 ac3 Stream mapping: Stream #0:0 -> #0:0 (dts (dca) -> ac3 (native)) Press [q] to stop, [?] for help size= 315086kB time=01:36:01.56 bitrate= 448.0kbits/s video:0kB audio:315086kB subtitle:0kB other streams:0kB global headers:0kB muxin g overhead: 0.000000% Traceback (most recent call last): File "E:\SABNZB\mkvdts2ac3.py", line 875, in process(os.path.join(ford, f)) File "E:\SABNZB\mkvdts2ac3.py", line 564, in process process(os.path.join(ford, f)) File "E:\SABNZB\mkvdts2ac3.py", line 786, in process remux.append(videotrackid + ":" + comp)

TypeError: unsupported operand type(s) for +: 'bool' and 'str'

Downgrade to a older version of mkvtoolnix wasn't succesfull, outcome is same error message "No DTS tracks found".

Then i tried your new commit but it havn't fixed the inital issue, same error messsage like before. I'm happy to test it if you have time investigate this again.

Thanks for your efforts anyway.

dcthomson commented 10 years ago

So I installed the new mkvtoolnix, and fixed the strings it is looking for. Everything seems to be working for me now. Can you guys confirm that? Else I'll just close the issue in a couple days if I don't hear anything.

Blaapje commented 10 years ago

Small parameter error on issue #11 en_US is not supported as a parameter, in stead use "en". Using "list" will return all available languages. You didn't get this exception?

Traceback (most recent call last):
  File "mkvdts2ac3.py", line 650, in process
    output = subprocess.check_output([mkvinfo, "--ui-language", "en_US", ford])

After adjusting this it works like a charm with mkvtoolnix 7.0

matthewchubb commented 4 years ago

Small parameter error on issue #11 en_US is not supported as a parameter, in stead use "en". Using "list" will return all available languages. You didn't get this exception?

Traceback (most recent call last):
  File "mkvdts2ac3.py", line 650, in process
    output = subprocess.check_output([mkvinfo, "--ui-language", "en_US", ford])

After adjusting this it works like a charm with mkvtoolnix 7.0

Works for me now, thank you everybody!

Any idea how I would get this working on a synology (currently got it working in windows test env). On my synology I run all of my automation including radarr and nzbget both in docker containers although i could install NZBget nativly if required, I couldn't find a way to install mkvtoolbox other than in a docker container also and as such I don't know how to find its path to enter in to the script variables..

Currently i get the following error;

When I try to do this I get the following error in my nzbget log which seem to suggest its the paths i need to work on?

Fri Oct 16 00:00:12 2020 INFO Executing post-process-script mkvdts2ac3.py for [MOVIE_TILE]

Fri Oct 16 00:00:12 2020 INFO mkvdts2ac3: File "/downloads/scripts/mkvdts2ac3.py", line 418

Fri Oct 16 00:00:12 2020 INFO mkvdts2ac3: print "\nYou can use --mkvtoolnixpath and --ffmpegpath to specify the path"

Fri Oct 16 00:00:12 2020 INFO mkvdts2ac3: ^

Fri Oct 16 00:00:12 2020 INFO mkvdts2ac3: SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\nYou can use --mkvtoolnixpath and --ffmpegpath to specify the path")?

Fri Oct 16 00:00:12 2020 ERROR Post-process-script mkvdts2ac3.py for [MOVIE_TILE] failed (terminated with unknown status)

Fri Oct 16 00:00:12 2020 INFO Collection [MOVIE_TILE] added to history

Fri Oct 16 00:00:33 2020 INFO Deleting [MOVIE_TILE] from history

Fri Oct 16 00:00:33 2020 INFO Deleting file /downloads/nzb/[MOVIE_TILE].nzb.queued

Fri Oct 16 00:00:33 2020 INFO Collection [MOVIE_TILE] removed from history

Please help!

Thanks.