parsing a text file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
acun
Posts: 3
Joined: 02 Nov 2010 02:46

parsing a text file

#1 Post by acun » 29 Nov 2010 13:05

Hi there,


This is the story...
I have a batch file for converting video files to appletv format.
I use mediainfo, mkvextract and other tools cli version.
I managed to extract information's about fps, size and width and put them in variables.
But i have problems with the subtitles in mkv files. If there is just one subtitle i can export it but if there's more than one i don't know how to extract just the language i want to pass the variable(ID) to mkvextract. I think is just a matter of parsing a .txt file

Text #1
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English

Text #2
ID : 4
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : Bulgarian
Language : Bulgarian

Text #3
ID : 5
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : Romanian
Language : Romanian

Text #4
ID : 6
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : Dutch


Thnx

Post Reply