Extract the selected tracks as individual video, audio and/or subtitle files.Create a user-definable test clip to check settings.Control the font, size and positioning of the embeded subtitles.Embed the selected subtitle track (i.e., hard subtitles) into the new file though this requires that the video track must be re-encoded.Can either pass-through the selected audio track or re-encode the track using the mp3 codec.Can either pass-through the selected video track (fast) or re-encode the track using either a 1 or 2 pass XviD codec.Intuitive track selection with the ability to verify the selections using video preview.Even if this is not your goal, you may find MoKgVm2DVD useful in handling these two types of files. mkv files for use in DivX enabled DVD players. As mentioned, you didn't provide any error messages, but when debugging you need to pay attention to and use them.MKVtools (formerly MoKgVm2DVD) is an OS X application that I developed to provide the tools needed to prepare. Your code gives the error that "( was unexpected at this time" which would give you a pretty big clue as to the problem. It should read if gtr (Īs the square brackets aren't necessary here and I'm not sure if they'll cause problems or not. This is incorrect syntax which is not seen as a full if statement, so having a ( to open the "then" part of the statement is seen as wrong. Again, this is only causing it to not work as expected, and has nothing to do with the crashing.) The issue that's actually causing it to crash is the line if gtr ( Still, as mentioned, %clean% will always be false since it's inside a for loop, so it needs to be !clean!. This is why proper indentation is important. So the "extra" ) at the end was NOT unneeded, and removing it only made things worse. (Edit: Just realized after looking at this some more that you did intend for everything to fall under the initial for loop, and the indentation was just off. This just makes it work unexpectedly, though. Since the first for loop isn't being closed, it's resulting in the rest of the script being included in it, which is why %clean% is never true, because it's not expanded and so is always going to be equal to the value it's given before the initial for loop is read, which in this case is false. Which needs to be: for /r %rootfolder% %%a in (*.mkv) do ( You have for( for( if( ) ): for /r %rootfolder% %%a in (*.mkv) do (įor /f %%s in ('mkvmerge -i "%%a" ^| find /c /i "subtitles"') do ( Hence the third form, which is valid for numeric comparisons (but will be interpreted as the string form if either of the operands is non-numeric).Īs you found, one of the issues is with the first for() loop, which is missing a ). if "123" gtr "2" would be evaluated as FALSE because the comparison is performed alphabetically "1" is less than "2" so result is FALSE. It allows strings containing spaces to be compared. MKVToolNix is a set of tools to create, alter and inspect Matroska files under Linux, other Unices and Windows. sequins is obviously neq acceptable, but using the syntax you have used, it would be if sequinsequacceptable ( Should that be interpreted as if s equ insequacceptable ( or if sequins equ acceptable ( ? Consider if sequins equ acceptable ( for instance. The issue here is gtr (or any other member of the alphabetical-comparison-operator family) has no significance over any random alphabetic string. This is of the format if string (, so cmd should object as the operator is invalid ( () Then apply here - where I believe your problem is resident. remember that syntax if string=string if gtr ( %rootfolder% in these two lines would require to be "quoted" if NOT = ( echo Enumerating all MKVs under %rootfolder% The advantage of this usage is that it works in code blocks (parenthesised statements) without the need to invoke delayedexpansion. Personally, I'd suggest you look here for usage of Boolean variables. Once bitten, twice shy.Ĭlean is evidently being used as a Boolean. As you have coded it, any trailing spaces or tabs would be included in the value assigned to rootfolder and can cause chaos - hours of work caused by invisible characters. It also protects against terminal spaces and tabs as you have in your code. This allows the quotes to be easily inserted as and when necessary. The second format is usually preferred on this tag, so set "rootfolder=C:\Users\User\Desktop\mov" set rootfolder="C:\Users\User\Desktop\mov" Unfortunately, you don't mention any error messages, so all I can do is offer a few (I hope, constructive) criticisms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |