Post subject: Input display as subtitles in MKV?
Joined: 12/3/2005
Posts: 20
One of the reasons I like to watch speed runs on the original emulator rather than as a video file is so I can look at the input to see how some glitches work or whatever. But since MKV can support subtitles, is there any interest in storing the input as a subtitle track for movies published as MKV? I've been playing around with FCM analyzing lately, so it wasn't much work to try this out with a few NES games. I wrote a program that takes an FCM file and outputs subtitles in the SRT format. I've been watching the result in mplayer (specifying the subtitle on the command line) and it looks pretty good. The only video I've tested with is Excite Bike, and during its six minutes, the subtitles appear to stay in sync with the video quite well. File sizes for the subtitles range from about 2.2k (Monopoly, Donkey Kong) to 89k (Zelda), so it would be a pretty negligible increase in file size. I have not actually tried to create an MKV file with embedded subtitles. If anyone is interested testing more and wants the code to generate subtitles, let me know and I'll email it or put in online somewhere.
Spacecow
He/Him
Joined: 6/21/2004
Posts: 247
Location: New Hampshire
That is very neat! Although I don't see why it would need to be MKV, it could be OGM or even just the AVI with a separate download for the SRT file.
Skilled player (1886)
Joined: 4/20/2005
Posts: 2160
Location: Norrköping, Sweden
This sounds interesting. If the filesize is that low, at least I find it pretty interesting. I agree that it sometimes is nice to see what buttons are being pressed. Speaking of which, doesn't BSPlayer support SRT-subtitles for all videoformats including .avi:s? In that case all current avi:s could be given such a subtitles-file. I think there are some other subtitleformats such as .sub that BSPlayer support, though I have no idea which format is the best. But in whole, this seems like a pretty good idea.
Joined: 5/27/2005
Posts: 465
Location: Turku, Finland
Yes, this sounds a very interesting idea. I also would like to see the input sometimes and if it's really possible to make a subtitle of the inputs, why shouldn't we try this. Since you can include the subtitle(s) to the .mkv, there wouldn't be any extra files for the watchers. And few extra kb's in the moviefile wouldn't hurt anyone. But I don't think it would be a good idea to create individual inputsubtitles for every published movie. Unless we made them an own page / site or something. The published movies list looks already a bit messy/complex. So I say, go for it! We definitely should try this (with .mkv). About the BSPlayer's subtitle capabilities. You can use .sub .srt .txt and .ssa type subtitles with it.
Which run should I encode next? :)
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
The subtitles change a lot. That subtitle file is going to inflate pretty quick. That said, I could make such a patch for a few emulators. snes9x would be my first candidate. What about turning on keypress display during encoding?
Joined: 12/3/2005
Posts: 20
I think there are some other subtitleformats such as .sub that BSPlayer support, though I have no idea which format is the best.
I don't know much about subtitle formats, but SRT looked like the easiest to work with. Take a look at an SRT (I link to some below). They're really simple.
That subtitle file is going to inflate pretty quick.
Yeah, Legend of Zelda turned out to be below average at 89k. Here are a bunch of NES subtitles I made for size comparison:
 SRT   AVI
704K  (71M) faxanadu.srt
349K  (61M) clash_at_demonhead.srt
319K (123M) startropics.srt
313K  (84M) blastermaster.srt
279K  (70M) legacy_of_the_wizard.srt
263K  (69M) megaman3.srt
147K  (43M) super_mario_brothers-long.srt
132K  (58M) bionic_commando.srt
116K  (32M) megaman.srt
 97K  (30M) metroid-short.srt
 89K  (72M) zelda.srt
 88K  (21M) snake_rattle_roll.srt
 85K  (21M) gauntlet.srt
 70K  (18M) zelda2.srt
 60K  (22M) excite_bike.srt
 58K  (63M) metal_gear.srt
 53K   (8M) super_mario_brothers.srt
 27K  (10M) jaws.srt
2.2K   (3M) Monopoly.srt
2.2K   (4M) donkey_kong.srt
Faxanadu has a rather enormous size (over 17000 subtitles!), but is still less than a single megabyte. Added to a 71Mb file, it doesn't seem like much. Most of the subtitles sizes are even less significant (see Star Tropics, Metal Gear). I went ahead and put up the code I'm using to make these, in case anyone wants to mess with it. It only handles FCM files. I put all these SRT files online too. Please feel free to try them out and let me know if they sync up right. Like people have said already, if your video player supports subtitles like this, you should be able to see them with the regular AVIs just by telling the player what subtitle file to use.
What about turning on keypress display during encoding?
Doing it that way would mean that you couldn't turn input display off. I expect it would be an annoyance for those who don't care about seeing the input. Including the input display as subtitles would allow people to turn it on if they want to see it, and not bother everyone who doesn't.
Former player
Joined: 7/29/2005
Posts: 459
Location: Brazil
but, isnt video files 30fps, and replays 60fps (50fps if pal)?
<small>My big signature was cleared by admin; i should read <a href="http://tasvideos.org/ForumRules.html">forum rules</a>. But... who does?</small>
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
daniayaw wrote:
but, isnt video files 30fps, and replays 60fps
Video files are 60 fps too. None of our emulators emulate interlacing. They display all frames.
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
I never liked the way your frame display works. I prefer mine. I think I'd need a monospace font though. What kind of font does MKV render with?
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
DeHackEd wrote:
What kind of font does MKV render with?
I suppose it's $system_specific.
Joined: 12/3/2005
Posts: 20
Here's an example movie: A Boy and His Blob. The timing isn't quite precise enough (with mplayer-pre7, I don't know about other players) for some reason. Some subs don't go away fast enough, or don't appear at all. Interestingly, these problems don't occur when playing the subtitles from a separate file, but only when playing the subtitles directly out of the MKV. To specify the subtitle track (and adjust a-v correction to improve subtitle sync) in mplayer:
mplayer -sid 0 -mc 0 video.mkv
If you want to compare it to the separate SRT:
mplayer -sub subtitles.srt video.mkv
I never liked the way your frame display works.
I would guess that you're talking about using "sS^v<>" for start select and directions, and I have to agree with you. The subs in the movie above use actual words, but since the font is set by the video player, I don't think there is an easy way to do it monospaced.
Joined: 12/3/2005
Posts: 20
I've continued working on this for my own interest, and made a more useful program for making subtitles. subtas should be able to handle FCM,FMV,SMV,GMV, and VBM formats, making SRT subs out of them. Single and multi-player movies are both supported. It compiles under netbsd, and presumeably linux, but please let me know if you try it and it won't compile for you.