Use subs2srs to Create Anki Decks Based on Your Favorite Movie or Show

Index » Learning resources

Reply #701 - 2011 March 04, 11:37 pm
Oniichan Member
From: 名古屋 Registered: 2009-02-02 Posts: 269

@cb4960  How come you rarely, if ever update your software?  j/k I saw the "v22" and thought I had misread the link. 22 updates... my hat is off to you good sir!

Reply #702 - 2011 March 05, 12:38 am
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

cb4960 wrote:

Hello,

I have just released version 22.0 of subs2srs.

Download subs2srs v22.0 via SourceForge

What Changed?

+ Added Transcriber (.trs) support. (Thanks nest0r - better late than never, right smile).

+ Added support for non-MP3 formats (.ogg, .aac, etc.) in the Audio... field of the main
   interface.

+ Added option to choose which encoding to use for Subs1 and Subs2. See the Encoding tab
   of the Advanced Subtitle Options dialog. You can also set the encoding in the Extract Audio
   from Media tool and the Dueling Subtitles tool. Also added a default encoding setting in
   settings.txt.

cb4960

Very cool! At last! Success! I made my first .trs-based Anki deck! The first of many, I hope.

Thanks!

Last edited by nest0r (2011 March 05, 12:38 am)

Reply #703 - 2011 March 05, 2:13 am
Cranks Member
Registered: 2010-10-21 Posts: 477

Interesting! Is there any way to encode to iphone friendly video format? I would love to see that in a future release!

Advertising (register and sign in to hide this)
JapanesePod101 Sponsor
 
Reply #704 - 2011 March 05, 2:42 am
Cranks Member
Registered: 2010-10-21 Posts: 477

Nestor could you paste a screenshot of what the cards look like using Transcriber files, please. I'm just trying to visualize the difference.

Reply #705 - 2011 March 05, 2:49 am
rigol Member
From: Germany Registered: 2010-01-11 Posts: 26

cb4960 wrote:

Wow! It might be time to retire that Apple II smile. I hope it at least worked OK when it eventually finished.

Even at 1080 resolution, it shouldn't take more than 30 minutes on a somewhat modern computer.

Is the video file on a DVD or external hard drive or a network? If so, move the video file to your internal hard drive first.

If that's not the case, what codec does the video file use? What are your system specs?

The computer might be an older one (Athlon 64 X2 3800+ 2 GHz, 2 GB RAM), but with other files it was working fine, so...^^ When it finished, it was alright smile

The file is on my internal hard drive. Like I said, with Clannad it did run okay.

The thing is, I really don't understand anything about codecs and such, so I'll just go ahead and post the information MediaInfo shows me:
Video
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L5.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 3 frames
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 24mn 9s
Nominal bit rate                 : 193 Kbps
Width                            : 640 pixels
Height                           : 352 pixels
Display aspect ratio             : 16:9
Frame rate                       : 23.976 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.036
Writing library                  : x264 core 60 r900 a9af942
Encoding settings                : cabac=1 / ref=3 / deblock=1:1:1 / analyse=0x3:0x133 / me=esa / subme=7 / brdo=1 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=0 / mbaff=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=193 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=0

Hope that helps?

Reply #706 - 2011 March 05, 4:53 am
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

Cranks wrote:

Nestor could you paste a screenshot of what the cards look like using Transcriber files, please. I'm just trying to visualize the difference.

They look like any other card generated in subs2srs with Japanese text + audio. ^_^ They just happened to be timed using Transcriber. Transcriber w/ its .trs files is sort of like MiniLyrics Editor w/ its .lrc files, but I find that I considerably prefer the former, as it's designed purely for transcription and annotation. So when you have audio and text you can listen and add timestamps and then use it with balloonguy's tool Kage Shibari for interactive audiobooks (if your audio and text was an audiobook + text) or, now, turn it into an Anki deck. (Or both.)

I hope eventually we'll have a whole corpus of interactive audiotexts.

Last edited by nest0r (2011 March 05, 4:54 am)

Reply #707 - 2011 March 05, 9:36 am
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

@Oniichan,
If you include .1 releases, it's more like 43 updates (but who's counting? tongue).


Cranks wrote:

Interesting! Is there any way to encode to iphone friendly video format? I would love to see that in a future release!

What are considered iPhone friendly video/audio/image formats? Thanks.



@rigol,
Thanks for the info. Probably nothing that I can do, but I'll look into it.



nest0r wrote:

Just noticed the speaker name doesn't matter, at least for Kage Shibari. Although perhaps in the future I can imagine using the filters to select lines by particular speakers. I like the idea of having ‘turns’, as well, for conversations. Seems like there are production/discursive possibilities I hadn't thought of...

Currently, subs2srs ignores the speaker. Shouldn't be hard to add it to the actors list though. I'll put it on the TODO list.

Last edited by cb4960 (2011 March 05, 9:37 am)

Reply #708 - 2011 March 05, 2:47 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

Take your time. smile It's going to take me a little while to cultivate .trs materials, methinks. I think I might also play around with ways of combining JNovelF with KageS.

Thanks again.

Last edited by nest0r (2011 March 05, 2:47 pm)

Reply #709 - 2011 March 06, 6:41 am
Cranks Member
Registered: 2010-10-21 Posts: 477

Probably Mpeg4\MP4. I tried .avi and had no luck. I'm not sure if you can play videos on the iphone anyway (in Anki, I mean).

Reply #710 - 2011 March 06, 1:11 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

I should know this since most of my media decks are video clips and I've had AnkiMobile for a little while now, but I haven't really used it yet (nothing to do with the program). I see on the page: http://ankisrs.net/docs/AnkiMobile.html#_media that it supports ‘embedding mp4 videos’, not sure what that means and we better not talk about it till we have more certain information to use assertively for a specific purpose, to avoid the red text in our comments that reminds us this isn't an Anki support forum. ;p

Of course I've never used Anki's ‘forum’, I hate those Google Groups/Yahoo Groups type sites. ^_^

Last edited by nest0r (2011 March 06, 1:13 pm)

Reply #711 - 2011 March 06, 9:45 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

I made a test build that (hopefully) outputs iPod/AnkiMobile compatible .mp4 video files.

Download subs2srs iPod Test 1 via MediaFire

Since I don't have an iPod myself, I'm asking for a volunteer to help test with AnkiMobile.

Thanks.

Last edited by cb4960 (2011 March 06, 9:46 pm)

Reply #712 - 2011 March 07, 2:59 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

I hope this is low priority so I can take my sweet time volunteering, as I'm too lazy at the moment to create a deck and add it to AnkiMobile. Can you write a program that makes walking several feet and clicking stuff easier?

I volunteer Cranks since they raised the issue.

Last edited by nest0r (2011 March 07, 2:59 pm)

Reply #713 - 2011 March 07, 8:29 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

nest0r wrote:

Can you write a program that makes walking several feet and clicking stuff easier?

No, but I can do the next best thing. Here is a 3 card sample iPod video test deck:

Download the iPod Video Test Deck 1 via MediaFire

Reply #714 - 2011 March 07, 9:09 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

cb4960 wrote:

nest0r wrote:

Can you write a program that makes walking several feet and clicking stuff easier?

No, but I can do the next best thing. Here is a 3 card sample iPod video test deck:

Download the iPod Video Test Deck 1 via MediaFire

Nice. ;p

The video plays but not the audio.

I guess it requires a different encoding? Perhaps AAC?

http://www.apple.com/ipodtouch/specs.html

“MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.”

Last edited by nest0r (2011 March 07, 9:18 pm)

Reply #715 - 2011 March 07, 9:29 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

Alright, 0.5 way there! (iPods sure seem picky though).

Reply #716 - 2011 March 07, 9:49 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

Hopefully it's just an iPod limitation and not an AnkiMobile one.

Reply #717 - 2011 March 07, 10:46 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

OK, let's try that again, this time with AAC:

Download the iPod Video Test Deck 2 via MediaFire

For my reference:

About AAC:
I couldn't find any pre-compiled Windows versions of ffmpeg that included libfaac. Some kind of legal issues. I used ffmpeg's internal AAC encoder. It's supposed to be in it's "experimental" stage, but it sounds fine to me (though I'm not one of those sick audiophiles).

This is what I'm passing to ffmpeg:
-y -i "INPUT_VIDEO.mkv" -ac 2 -map 0:0 -map 0:1 -vcodec libx264 -fpre "/path/to/ffmpeg/presets/libx264-superfast.ffpreset" -fpre "/path/to/ffmpeg/presets/libx264-ipod640.ffpreset" -s 368x240 -b 600k -strict experimental -acodec aac -ab 128k -ss 00:01:52.270 -t 00:24:15.920 -vf crop=368:240:0:0 -threads 0 "OUTPUT_VIDEO.mp4"

Last edited by cb4960 (2011 March 07, 10:48 pm)

Reply #718 - 2011 March 07, 11:00 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

It works perfect! Bravo. Nice to know I can be confident in my video clip decks from now on, on AnkiMobile. Thanks as always.

Last edited by nest0r (2011 March 07, 11:00 pm)

Reply #719 - 2011 March 07, 11:04 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

Hooray! I'll try to finalize the new iPod-friendly version of subs2srs this weekend.

Reply #720 - 2011 March 07, 11:23 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

Awesome. And I just found this exchange: http://forum.koohii.com/viewtopic.php?p … 48#p116448 - Now that I got my memory back of pining for video support in AnkiMobile, I'm even more grateful to you and resolve. Guess I've got no excuses now. I can't think of a single tool or resource I lack. Damn it.

Oh and the videos looked nice in both portrait and landscape mode, so that's cool.

Last edited by nest0r (2011 March 07, 11:23 pm)

Reply #721 - 2011 March 07, 11:59 pm
Cranks Member
Registered: 2010-10-21 Posts: 477

Lol, I started it, but I totally missed all this. Thanks Cb4960. +dude, you gotta get a iPod. It's seriously worth it!

Reply #722 - 2011 March 09, 2:50 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

By the way, have you thought any more about integrating OCR with the vobsubs here? It could be a kind of secondary area (since there'd be occasional errors, users could have the usual vobsub expression field + the OCR'd one to compare). Seems like the possibility is there since there's a high level of consistency in terms of size and whatnot.

Anyway, just something to keep in mind. ;p

Last edited by nest0r (2011 March 09, 2:51 pm)

Reply #723 - 2011 March 09, 7:35 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

nest0r wrote:

By the way, have you thought any more about integrating OCR with the vobsubs here? It could be a kind of secondary area (since there'd be occasional errors, users could have the usual vobsub expression field + the OCR'd one to compare). Seems like the possibility is there since there's a high level of consistency in terms of size and whatnot.

Anyway, just something to keep in mind. ;p

I was going to perform some more testing with Tesseract but never got around to it. I'll play with it a little more one of these days.

Edit: For now you can always use Capture2Text to help look up the occasional word that you don't know. I've been using it mostly for manga and visual novels. It's not perfect, but after a while you get a feel for what it will OCR correctly and what it won't. For example, for vertical text, it hates 言.

Last edited by cb4960 (2011 March 09, 7:44 pm)

Reply #724 - 2011 March 09, 8:18 pm
nest0r Member
Registered: 2007-10-19 Posts: 5236 Website

http://forum.koohii.com/viewtopic.php?p … 15#p124615

I don't know how you managed to go back in time and have me write that comment and download the program without realizing it, but well played.

I could see editing the resulting .srt and merging it as a secondary expression field in the .tsv file subs2srs produces.

Edit: By the way, I'm assuming that the colour picker in vobsub2text is actually asking the user to open the .sub in SubResync with ‘render’ checked, and use that preview to tell v2txt the colours used in a given .sub file before OCRing it? Or is it actually changing the vobsub images to reflect what the user tells it?

Edit 2: n/m I just checked a .png and I see it actually changes it (which I guess makes more sense ;p). So do you feel there's a superior optimization? Do the colours of the original impact the new colours?

I mean, black text on white background, is, I think, a given. What I'm curious about is the outlines and anti-alias, as well as whether the image manipulation works better/worse with changing certain original colours/transparency to certain new ones.

Also, how does the Scale option function? Is it resizing the images and the option lets you keep it within limits to prevent distortion?

Edit 3: Oh right, seeing Nukemarine's post in the above link, I see you can just use the Subs 2 slot for the secondary Japanese .srt. Although then if we have English subtitles they're still left out. But with text glossing that shouldn't be a huge deal. Or perhaps one can merge the secondary Japanese .srt and the English .srt as dueling subtitles, then use that as Subs 2.

Last edited by nest0r (2011 March 09, 9:37 pm)

Reply #725 - 2011 March 09, 10:35 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

As you've guessed, vobsub2text was the program I wrote to experiment with OCR'ing vobsubs.

nest0r wrote:

So do you feel there's a superior optimization? Do the colours of the original impact the new colours?

Right, the color selected by the user substitutes for the original vobsub color. That's one of the things I was experimenting with. I got sidetracked though and never established anything conclusive.

Another thing I could experiment with is thickness/boldness of the text (without doing a little research, I'm not exactly sure how I would do this easily - maybe ImageMagick has some filter I could use). The OCR tools seem to prefer thinner text over thicker text/more bold text.

nest0r wrote:

Also, how does the Scale option function? Is it resizing the images and the option lets you keep it within limits to prevent distortion?

The Scale option resizes the vobsub image before sending it to the OCR tool. A scale of 1.0 means use the original size. A scale of 2.0 means double the vobsub image size. For Capture2Text, I found that a scale of 4.0 worked best for normal-sized text. Vobsubs are usually fairly large, so a smaller scale might work better.

nest0r wrote:

Edit 3: Oh right, seeing Nukemarine's post in the above link, I see you can just use the Subs 2 slot for the secondary Japanese .srt. Although then if we have English subtitles they're still left out. But with text glossing that shouldn't be a huge deal. Or perhaps one can merge the secondary Japanese .srt and the English .srt as dueling subtitles, then use that as Subs 2.

If/when I ever integrate this into subs2srs, I would output both the images and the OCR'd text allowing the user to fallback to the image on occasions when the OCR messed up.

Currently, vobsub2text uses nhOCR as the OCR tool. As mentioned in my above post, I wanted to experiment with the Tesseract OCR tool. Both have their advantages as disadvantages. When using Capture2Text, I almost always use nhOCR because Tesseract won't even attempt to OCR unless the capture contain enough characters. Most lines from vobsubs are probably long enough though. If I find Tesseract to be generally superior, I can always fallback to nhOCR if the line is too short.

Also, I wonder how well Tesseract would work for English subtitles. If it can't even handle those with a great amount of accuracy, Japanese might be out of the question (though, for non-vobsub usage, I've found Tesseract's English OCR to be quite good - nhOCR is quite the opposite). OK enough rambling...

Last edited by cb4960 (2011 March 09, 10:35 pm)