UnlinkMKV
UnlinkMKV copied to clipboard
Paths/filenames containing spaces fail with windows distribution
This is the output I receive when trying to batch process a directory of files:
N:\Video\UMKV Test>unlinkmkv "Testing Folder"
UnlinkMKV
Options
chapters: 1
cleanup: 1
edition: 1
ffmpeg: C:\Users\Luke\Programs\UnlinkMKV\ffmpeg\bin\ffmpeg.EXE
fixaudio: 0
fixaudiotemplate: -map 0 -acodec ac3 -ab 320k
fixsubtitles: 1
fixvideo: 0
fixvideotemplate: -c:v libx264 -b:v {var_minrate}k -minrate {var_minrat
e}k -maxrate {var_maxrate}k -bufsize 1835k -max_muxing_queue_size 4000
ignoredefaultflag: 0
locale: en
mkvext: C:\Users\Luke\Programs\UnlinkMKV\mkvtoolnix\mkvextract.EXE
mkvinfo: C:\Users\Luke\Programs\UnlinkMKV\mkvtoolnix\mkvinfo.EXE
mkvmerge: C:\Users\Luke\Programs\UnlinkMKV\mkvtoolnix\mkvmerge.EXE
mkvpropedit: C:\Users\Luke\Programs\UnlinkMKV/mkvtoolnix/mkvpropedit
outdir: N:\Video\UMKV Test\UMKV
tmpdir: N:\Video\UMKV Test\UMKV.tmp
var_maxrate: var_minrate * 2
var_minrate: (var_size * 1.1) / var_duration
The output also silently fails if I attempt to process a single file with a space anywhere in its filename/path. If I cd
to the directory, and rename the file to contain no spaces, it works correctly.
Using windows 8.1, have tried with both cmd and powershell.
That's odd.
Can you try it with "-ll trace" to get full output? Also, what happens if you cd to the directory first and run it without specifying a path?
I tried it with a different video, and didn't get much else:
C:\Users\Luke\Programs\UnlinkMKV>unlinkmkv -ll TRACE "Test Video"
UnlinkMKV
[ini] [ffmpeg] = [C:\Users\Luke\Programs\UnlinkMKV/ffmpeg/bin/ffmpeg]
[ini] [mkvext] = [C:\Users\Luke\Programs\UnlinkMKV/mkvtoolnix/mkvextract]
[ini] [mkvinfo] = [C:\Users\Luke\Programs\UnlinkMKV/mkvtoolnix/mkvinfo]
[ini] [mkvmerge] = [C:\Users\Luke\Programs\UnlinkMKV/mkvtoolnix/mkvmerge]
[ini] [mkvpropedit] = [C:\Users\Luke\Programs\UnlinkMKV/mkvtoolnix/mkvpropedi
t]
[ini] [fixaudio] = [0]
[ini] [fixvideo] = [0]
[ini] [fixsubtitles] = [1]
[ini] [ignoredefaultflag] = [0]
[ini] [chapters] = [1]
[ini] [fixvideotemplate] = [-c:v libx264 -b:v {var_minrate}k -minrate {var_mi
nrate}k -maxrate {var_maxrate}k -bufsize 1835k -max_muxing_queue_size 4000]
[ini] [fixaudiotemplate] = [-map 0 -acodec ac3 -ab 320k]
[ini] [var_minrate] = [(var_size * 1.1) / var_duration]
[ini] [var_maxrate] = [var_minrate * 2]
[ini] [locale] = [en]
Options
chapters: 1
cleanup: 1
edition: 1
ffmpeg: C:\Users\Luke\Programs\UnlinkMKV\ffmpeg\bin\ffmpeg.EXE
fixaudio: 0
fixaudiotemplate: -map 0 -acodec ac3 -ab 320k
fixsubtitles: 1
fixvideo: 0
fixvideotemplate: -c:v libx264 -b:v {var_minrate}k -minrate {var_minrat
e}k -maxrate {var_maxrate}k -bufsize 1835k -max_muxing_queue_size 4000
ignoredefaultflag: 0
locale: en
mkvext: C:\Users\Luke\Programs\UnlinkMKV\mkvtoolnix\mkvextract.EXE
mkvinfo: C:\Users\Luke\Programs\UnlinkMKV\mkvtoolnix\mkvinfo.EXE
mkvmerge: C:\Users\Luke\Programs\UnlinkMKV\mkvtoolnix\mkvmerge.EXE
mkvpropedit: C:\Users\Luke\Programs\UnlinkMKV/mkvtoolnix/mkvpropedit
outdir: C:\Users\Luke\Programs\UnlinkMKV\UMKV
tmpdir: C:\Users\Luke\Programs\UnlinkMKV\UMKV.tmp
var_maxrate: var_minrate * 2
var_minrate: (var_size * 1.1) / var_duration
created tmp C:\Users\Luke\Programs\UnlinkMKV\UMKV.tmp\11292
removed tmp C:\Users\Luke\Programs\UnlinkMKV\UMKV.tmp\11292
removed tmp C:\Users\Luke\Programs\UnlinkMKV\UMKV.tmp
exiting
C:\Users\Luke\Programs\UnlinkMKV>
I'm not familiar with perl but I can't see much there that helps. I found that cding to the directory and calling unlinkmkv .
does what I expect and seems to process all the files in that directory fine.
I should note, that's a directory and not a file, inside said directory are multiple linked mkv files. I also tried by referencing the file directly "Test Video\blahblahblah.mkv" and got the same output other than the numbers for the tmp files.
It actually seems like it's not parsing the command line arguments at all. That's still normal output. By default it'll check your cwd for files (the . for cwd is actually unnecessary). As far as files/directories on the command line it doesn't matter which type it is.
Unfortunately I don't have Windows 8 to test this against that OS, but when I get some time later I'll try and reproduce the problem. For reference, what region is your windows install/terminal set to?
Yeah I've worked around it for now with the whole directory method. I have my install set to English/Australia for the region.