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

Index » Learning resources

Reply #276 - 2009 August 30, 4:25 pm
ruiner Member
Registered: 2009-08-20 Posts: 751

I tested it out, didn't have any problems with it, nothing broke, was able to map the fields and toy around with the Question/Answer sides to create a series of call-and-response cards from a Death Note dialogue. (That's a whole other topic, like how to deal with one actor having multiple lines--maybe just keep the initial line, using their following lines before the other person's response as xTrailingExpression, and delete the other cards they show up on? I'll figure that out later...)

Thanks! rš

Last edited by ruiner (2009 August 30, 4:27 pm)

Reply #277 - 2009 August 30, 11:26 pm
Nukemarine Member
From: 神奈川 Registered: 2007-07-15 Posts: 2347

ruiner wrote:

Nukemarine wrote:

I do have a request:

Can the field that shows the title of the show "movie_yyy" be changed to be "movie_yyy_xxxx". It will be sequential to the cards created in that sub batch.

Reason: If you use Anki's media check, it'll rename the audio and media files. Without those to sort and identify, it's hard to know where in the show or subtitle file

Did Grandpa Nukemarine wander off before finishing this comment?

Connection stopped in the middle of the submission I guess. Wasn't much at the end other than saying how find a line in a sentence or export and sort.

I have a question though. I tried to use it, but I'm not seeing the option to "add context lines"

cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

Hello,

I have just released version 14 of subs2srs.

Download subs2srs v14 via SourceForge

Added sequence marker. As suggested by Nukemarine a few posts back, a sequence marker will now added to the second field of the import file.

It has the format:
[3-digit episode number]_[4-digit line number]_[timing info].

So "001_0280_00.18.22.300" means that the line appeared in episode 1 @ 18 minutes 22.3 seconds and it was the 280th line in the episode.

cb4960

Advertising (register and sign in to hide this)
JapanesePod101 Sponsor
 
ruiner Member
Registered: 2009-08-20 Posts: 751

Ohh, so that's what Nukemarine was on about. Yes, I was wondering how I might more easily mix and match different lines' audio/video fields for call-and-response cards. Not sure how I might use this, but I'm sure I'll figure something out once I get into it. Thanks.

ruiner Member
Registered: 2009-08-20 Posts: 751

Is there a way to exclude lines by time rather than characters?

cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

ruiner wrote:

Is there a way to exclude lines by time rather than characters?

Well, not yet anyway...

ruiner Member
Registered: 2009-08-20 Posts: 751

My brain's not working properly this morning. Is it possible to cut up the audio according to the subtitle timings? Like, if I wanted every 5 lines in a video to be extracted into an audio segment.

Ooh, also, a 'span' selector just like in the subtitle options, but in the 'extract audio from video' section of subs2srs would also be nice, O Programmer-God.

Reasons (as Nukemarine would say): As it is, we can either splice the audio as a whole into segments, which would mean there'd be cut off lines and opening/ending songs, or we can use the deck's audio, which is line by line. With various manual editing in between. So I'm looking for a quick way to select specific spans of time (to either omit those songs, or to select specific conversations) and to make sure lines aren't cut off. And since the splits would be based on the same file (the subtitles), the subs2srs decks and audio files would mesh.

Edit: These ideas are for creating audio splices to listen to on the iPod, BTW.

Last edited by ruiner (2009 September 06, 9:50 am)

ruiner Member
Registered: 2009-08-20 Posts: 751

Here's another roughly thought out feature request (or inquiry as to whether there's already an easy way to do this) - the ability to crop snapshots, so that if you have hardcoded EngSubs, you can remove the bottom of the images en masse. Might be better than making them then batch cropping them? Shrug. Sorry to bug you again. ;p

Notice I didn't say anything about video cropping. I think that might be a more intensive process best left to third-party software? Or not...

Last edited by ruiner (2009 September 06, 10:17 am)

Nii87 Member
From: Australia Registered: 2009-03-27 Posts: 371

Nice idea, ruiner. That would remove the need to redownload .mkvs or crop the video.

NickT Member
From: London Registered: 2006-12-16 Posts: 109

Hi there. First of all, I would just like to say that this is a fantastic program.

Secondly, I would like to make a suggestion (is this the right place to do so?)

The context support is a really great idea, but its implementation is slightly flawed. Can I suggest that, instead of pairing up the lines of the dialogue (E-J) and then working out what the next and last lines of dialogue are, you do it the other way around?

Let me give you an example. I set it to include the last 2 and the next 2 lines of dialogue, and I ran subs2srs on episode 1 of Death Note. The two copies I have (E&J subs) are from different sources, so even though they have been re-timed, the match between the subs isn't always 1-1. Sometimes 1 line of dialogue on the Japanese version is split into 2 in the English, and vica versa. Also, sometimes line breaks in long sentences are in different places.

The line I am reviewing is as follows:

同居している25歳の女性に暴行を加え殺害したとして​
Naoki Kofuji, 35, was arrested in connection with the murder of​

As you can see, the translation doesn't really match the line of text. No problem - This is because it is the middle of a very long sentence, and since word order differs between English and Japanese, the translation is a bit out. The correct translation would be

"in connection with the murder of a 25-year-old female he was living with"

This is exactly the type of issue that I thought the context support function would help solve. However, not so.

The context (+-2 lines) provided for the Japanese is perfect:

次のニュースです​
本日正午過ぎ、東京都渋谷區で​
同居している25歳の女性に暴行を加え殺害したとして​
35歳の男、兔富士直樹容疑者が​
殺人の疑いで逮捕されました​

However the context support for the English is gibberish, as follows:

In other news...​
Today, shortly after noon,​
Naoki Kofuji, 35, was arrested in connection with the murder of​
in the Shibuya district of Tokyo.​
in the Shibuya district of Tokyo.​

Going back to the original subtitle file I found the actual context, which is as follows and makes perfect sense:

In other news...
Today, shortly after noon,
Naoki Kofuji, 35, was arrested in connection with the murder of
a 25-year-old female he was living with
in the Shibuya district of Tokyo.

Now.. it should be fairly obvious what has happened... but basically since the line breaks in the two subtitle files are in slightly different places, it has matched both lines 4 and 5 in the Japanese with line 5 in the English. It has then carried this error across to the context support.

Would it not be better to use the original English subtitle for context support, rather than matching it with the Japanese first and then doing it?

Hope that is clear - Let me know if you need more clarification. I can provide more examples, also, if that is useful :-o

cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

NickT,

To keep better continuity for the English subtitles, try putting the English subtitles into Subs1 and the Japanese subtitles into Subs2.

Taurus Member
From: Kofu, Yamanashi Registered: 2008-06-19 Posts: 100 Website

So the Toki deck is brilliant. But is there any way, in Anki, to add an extra field that converts the kanji to furigana in the answer card? Sorry if this is the wrong place to ask, but I'd appreciate any help...

NickT Member
From: London Registered: 2006-12-16 Posts: 109

cb4960: Thanks for the suggestion. However, surely that would just just reverse the problem, fixing the english subs and breaking the japanese subs?

I'll try it, anyway, and see if it works...

Reply #289 - 2009 October 02, 2:51 pm
pm215 Member
From: UK Registered: 2008-01-26 Posts: 1354

So does anybody know what the current best approach for some subs2srs equivalent that runs on Linux is? I can probably hack something together if I have to, but it doesn't seem very sensible to duplicate work  if somebody's already done it...

Thanks!

Reply #290 - 2009 October 02, 2:53 pm
bombpersons Member
From: UK Registered: 2008-10-08 Posts: 907 Website

pm215 wrote:

So does anybody know what the current best approach for some subs2srs equivalent that runs on Linux is? I can probably hack something together if I have to, but it doesn't seem very sensible to duplicate work  if somebody's already done it...

Thanks!

Use a virtual machine to run windows, and then run subs2srs inside that. It's a bit slow, but it works.

Reply #291 - 2009 October 02, 11:19 pm
distefam Member
From: United States Registered: 2006-06-25 Posts: 80 Website

When I attempt to run subs2srs I get the error: "The application failed to initialize properly". I am running Windows XP with SP3 through Parallels, however it is the TinyXP build, which has left out a lot of components. Could that be the problem? If so, which components should I install? Thanks!

EDIT: I installed the .NET framework and now it works fine.

Last edited by snozle (2009 October 03, 1:18 am)

Reply #292 - 2009 October 02, 11:43 pm
Sebastian Member
Registered: 2008-09-09 Posts: 582

Isn't it possible to use subs2srs through Wine?

Reply #293 - 2009 October 03, 2:46 am
bombpersons Member
From: UK Registered: 2008-10-08 Posts: 907 Website

Sebastian wrote:

Isn't it possible to use subs2srs through Wine?

I couldn't get it too work.. Did you get it working?

Reply #294 - 2009 October 03, 7:26 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

Hello,

I have just released version 15 of subs2srs.

Download subs2srs v15 via SourceForge

Added "Fix mismatched lines" option (as suggested by NickT)
Use this option when the Subs1 and Subs2 timings are not a perfect 1:1 match. With this option enabled, subs2srs will attempt to fix mismatched lines between Subs1 and Subs2 by analyzing skipped lines and repeated lines. This should fix most mismatch errors, but may make a mistake every now and then. Overall, I find that the benefits almost always outweigh the costs. This option works for all subtitle types (including Vobsub (idx/.sub)). Note: You should disable this option if the Subs1 and Subs2 timings are a near perfect 1:1 match in order to avoid the handful of mistakes that might be produced.

Added Option to exclude lines not meeting a minimum number of milliseconds (as suggested by ruiner)
In the "More Options..." dialog you may set a minimum length for a line in milliseconds. Any line whose timing not meeting the minimum number of milliseconds will not be processed.

Added Snapshot Crop and Video Crop options (as suggested by ruiner)
A crop may be applied separately to the top, left, right, or bottom, of the snapshot/video clip. This might to useful for removing hard subbed subtitles. The crop is applied against the original resolution of the video and not the resized resolution. Enter 0 if you do not wish to crop.

Added Pre-Time Shift option
Shift Subs1 or Sub2 dialog timings before the lines are processed. This is the equivalent to using an external program (such as Aegisub) to apply a time shift to the Subs1 or Subs2 subtitle file. Use this to reduce the gap between the Subs1 and Subs2 timings. This will reduce errors when processing/matching subtitle lines.

Added abiltiy to reduce size of the interface.
When the size in reduced, scroll bars will be used. I added this so that I could use subs2srs on my netbook's 1024x600 native resolution.

Time Shift is now called Post-Time Shift.
The functionality remains the same however.


As always, let me know if I broke something.

cb4960

Last edited by cb4960 (2009 October 03, 7:28 pm)

Reply #295 - 2009 October 03, 10:30 pm
distefam Member
From: United States Registered: 2006-06-25 Posts: 80 Website

I am able to get everything to work perfectly, except that my output media folder does not include the mp3s. Both jpegs and pngs (vobsubs) are output, but no mp3s. While running I see that the mp3 is being encoded and I am even able to locate the temporary file in the temp directory, however after completion the files are nowhere to be found. Any ideas?

Thank you!

Reply #296 - 2009 October 03, 11:36 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

Hmm, the only times that I've encountered that behavior is when the video uses a protected AC3 audio stream. But in that case, I don't think it would even create a temporary file or show the MP3 being encoded. Have you tried any other files? Has anybody else seen this behavior? Has any body else been able to use subs2srs on TinyXP?

Reply #297 - 2009 October 04, 1:16 am
distefam Member
From: United States Registered: 2006-06-25 Posts: 80 Website

I tried with another video that used AAC audio, which didn't work either. Do you have any suggestions? I don't think it could be putting the audio in another directory (other than the one I specified in output) but is that possible? Also, do I need to install anything else, such as mp3split? Thank you.

UPDATE: I also attempted to use the audio extraction tool and I have the same problem.

Last edited by snozle (2009 October 04, 1:24 am)

Reply #298 - 2009 October 04, 10:17 am
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

With the exception of .Net, subs2srs comes included with everything that it needs. If you want to see if it is putting the audio in the wrong place, you could try again and then use the Windows search tool to show all files modified within the last day. Does it work any better with video? Do you have any non-ASCII characters in any of the paths?

Reply #299 - 2009 October 04, 4:10 pm
pm215 Member
From: UK Registered: 2008-01-26 Posts: 1354

bombpersons wrote:

Use a virtual machine to run windows, and then run subs2srs inside that. It's a bit slow, but it works.

Yuck :-)  So since I had some spare time this weekend I threw together a Python reimplementation. The brave can get hold of it with

Code:

bzr branch http://www.chiark.greenend.org.uk/~pmaydell/bzr/pysubs2srs

(if you're not comfortable with running bzr this may be too beta for you :-))

Command line only. Sample invocation:

Code:

 ~/pysubs2srs/trunk/pysubs2srs  --debug --outdir=out --subdir=jsubs \
   --videodir=video --deck=aoi --sub2dir=esubs --audio --snapshots

Still missing a big pile of features: video generation, support for non-ASS format subs, leading/trailing context, and others listed at the top of the script. However, it works for me and produced a usable audio+image snapshots deck on my test input. May well work on Mac; unlikely to run on Windows without hacking about with it.

Huge debt owed to cb4960 for (a) having this great idea in the first place and (b) making his version available under the GPL so I could easily reimplement it. (My code is also GPLed.) Thanks!

Reply #300 - 2009 October 04, 9:50 pm
Vinchenzo Member
From: Illinois Registered: 2009-09-06 Posts: 14

Wish I could use this, but the complexity of it is out of my league. Seems cool though.