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

Index » Learning resources

Reply #301 - 2009 October 05, 1:59 am
bombpersons Member
From: UK Registered: 2008-10-08 Posts: 907 Website

Looks really good big_smile Though it was a bit confusing to read through with all the code in one file 0.o

I use python a lot, I wouldn't mind contributing smile

Reply #302 - 2009 October 05, 2:45 am
pm215 Member
From: UK Registered: 2008-01-26 Posts: 1354

bombpersons wrote:

Looks really good big_smile Though it was a bit confusing to read through with all the code in one file 0.o

I use python a lot, I wouldn't mind contributing smile

Yeah, I should probably split it up; legacy of the way it started as a short script and grew. Also I don't write much python so the style might be weird. Patches gratefully accepted :-)

Reply #303 - 2009 October 05, 5:21 am
distefam Member
From: United States Registered: 2006-06-25 Posts: 80 Website

I've attempted to locate the audio files and they definitely haven't been made. I attempted the same process but with video this time. Video files were output, however, they have scrambled audio when I play them. I have uploaded a sample video here:
http://tr.im/AJec

Advertising (register and sign in to hide this)
JapanesePod101 Sponsor
 
Reply #304 - 2009 October 05, 8:42 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

The video that you uploaded plays fine on my computer. I'm using CCCP with the included Media Player Classic.

Reply #305 - 2009 October 05, 8:55 pm
distefam Member
From: United States Registered: 2006-06-25 Posts: 80 Website

Looks like you're right, when I play it with Mplayer it works fine. Should have thought of that myself. So it looks like the encoding is working properly, do you have any ideas about the audio?

Reply #306 - 2009 October 05, 9:29 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

If you want, you can try a simple test to ensure ffmpeg and mp3splt work correctly on your system.

Copy the video file into the ffmpeg directory (in subs2srs\Utils\ffmpeg) and execute this command from the command prompt:

Code:

ffmpeg.exe -ab 96k -vn -y -i "input.mkv" -ss 00:05:00.000 -t 00:01:00.000 "output.mp3"

Being sure to replace input.mkv with the name of you video. It will produce a 1 minute MP3 called "output.mp3" starting at the 5 minute mark of the video.

Then copy output.mp3 to the mp3splt directory (in subs2srs\Utils\mp3splt). Now run this from the command prompt:

Code:

mp3splt.exe -q -o the_split_file -2 -g %[@a=blah,@b=blah,@t=blah,@n=1] -d "C:\Temp\subs2srs_temp" "output.mp3" 000.20.00 000.30.00

This will output a 10 second MP3 called "the_split_file.mp3" into the folder "C:\Temp\subs2srs_temp".

Do you see this file?

Reply #307 - 2009 October 06, 6:12 am
distefam Member
From: United States Registered: 2006-06-25 Posts: 80 Website

I executed the above commands and it did create the file. However, when running the commands as they were written windows was unable to find the command. I'm not familiar to DOS as I am on a mac and it uses a Unix prompt, but when you are trying to run a command from the command line in Unix one has to add the path to one's profile. I was able to get the commands to run once I specified the entire path to ffmpeg.exe, mp3split.exe and the input files.

I don't think this could be the cause, but I suppose it is a possibility that subs2srs can't find ffmpeg.exe and mp3split? Perhaps it is something else.

Reply #308 - 2009 October 06, 6:25 am
b0ng0 Member
From: Scotland Registered: 2008-12-04 Posts: 84

I have a question (sorry if it's already been answered).

Most of my files that have subs, have them encoded into the file (not as seperate sub files). Can I extract them somehow?

Reply #309 - 2009 October 06, 7:26 am
distefam Member
From: United States Registered: 2006-06-25 Posts: 80 Website

b0ng0 wrote:

I have a question (sorry if it's already been answered).

Most of my files that have subs, have them encoded into the file (not as seperate sub files). Can I extract them somehow?

Not if they are hardsubbed. In other words, if they are embedded in the video you cannot. If you can switch them off however, you can extract them from the file.

Reply #310 - 2009 October 06, 7:49 am
zodiac Member
Registered: 2008-04-01 Posts: 123

What format is the file? If it's mkv you can google mkvtools.

Reply #311 - 2009 October 06, 5:20 pm
theasianpleaser Member
From: 神戸市 Registered: 2008-09-04 Posts: 231

Has anyone gotten the Final Fantasy 7 files posted by Bombpersons on the Wiki page to work?

I can't seem to do it.

Reply #312 - 2009 October 06, 8:49 pm
jcdietz03 Member
From: Boston Registered: 2008-12-19 Posts: 324 Website

The show I want to do with this is InuYasha (Original Series, TV Episode 1).  However, I cannot find the subtitles anywhere on the internet, so I want to make my own.  How do I make a subtitle file?  Is there a way I can extract timing info from the existing English subtitle file?

Reply #313 - 2009 October 06, 9:51 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

snozle wrote:

I executed the above commands and it did create the file. However, when running the commands as they were written windows was unable to find the command. I'm not familiar to DOS as I am on a mac and it uses a Unix prompt, but when you are trying to run a command from the command line in Unix one has to add the path to one's profile. I was able to get the commands to run once I specified the entire path to ffmpeg.exe, mp3split.exe and the input files.

I don't think this could be the cause, but I suppose it is a possibility that subs2srs can't find ffmpeg.exe and mp3split? Perhaps it is something else.

On to the next step. I have uploaded a version that will output a log containing all of the commands it uses for splitting audio.

http://www.mediafire.com/download.php?wy0b2ytzmrz

Replace the old .exe with the new one. After running it, the log (named subs2srs.log) will be be in the same directory as subs2srs.exe.

Send it to my username at gmail.com. I'll see if anything looks out of the ordinary.

Reply #314 - 2009 October 08, 7:19 am
zodiac Member
Registered: 2008-04-01 Posts: 123

jcdietz03 wrote:

The show I want to do with this is InuYasha (Original Series, TV Episode 1).  However, I cannot find the subtitles anywhere on the internet, so I want to make my own.  How do I make a subtitle file?  Is there a way I can extract timing info from the existing English subtitle file?

You should be able to open the subtitle file in an ordinary text editor and edit it without touching the timing information.

Reply #315 - 2009 October 08, 9:36 am
bombpersons Member
From: UK Registered: 2008-10-08 Posts: 907 Website

theasianpleaser wrote:

Has anyone gotten the Final Fantasy 7 files posted by Bombpersons on the Wiki page to work?

I can't seem to do it.

The one's at the learnanylanguage forum? What's the problem?

Reply #316 - 2009 October 08, 9:41 am
bombpersons Member
From: UK Registered: 2008-10-08 Posts: 907 Website

jcdietz03 wrote:

The show I want to do with this is InuYasha (Original Series, TV Episode 1).  However, I cannot find the subtitles anywhere on the internet, so I want to make my own.  How do I make a subtitle file?  Is there a way I can extract timing info from the existing English subtitle file?

If you open the english subtitles with aegisub, you can just replace the engish with japanese.

Reply #317 - 2009 October 10, 3:04 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

Hello,

I have just released version 16 of subs2srs.

Download subs2srs v16 via SourceForge

New:

1) Linux/Mac Support!
Using Mono you can now use subs2srs on a Linux or Mac platform.

http://img66.imageshack.us/img66/7645/subs2srsv16ubuntu.png

In order to run, you must do the following:

1) Download the Mono version of subs2srs from SourceForge. Both the Mono and Windows versions actually use the same executable, but the Mono version does not come packaged with ffmpeg.

2) Install Mono and Mono WinForms. To do this on Ubuntu 9.04, execute these commands:

Code:

sudo apt-get install mono
sudo apt-get install mono-winforms*

You might not need that first command, but I can't remember whether or not Ubuntu comes pre-installed with Mono.

3) Install ffmpeg. The ffmpeg execucatable must be called "ffmpeg" and the directory that it resides in must be in $PATH. To do this on Ubuntu 9.04, execute these commands:

Code:

sudo apt-get install ffmpeg
sudo apt-get install libavcodec-unstripped-52

Other distros might not need the second command.

4) To run subs2srs, open a console, cd to the location of the subs2srs executable and type:

Code:

mono subs2srs.exe

Note 1: I have only tested this on Ubuntu 9.04. If someone has success with another distro or with a Mac, please share setup details and any issues you encounter.

Note 2: As an aside, this port was extremely simple. Practically the only thing I had to do was to use ffmpeg instead of mp3splt to split the audio files.

2) MP3 ID3 tags now include the dialog text
Each MP3 is now embedded with the corresponding Subs1 and Subs2 line in the lyrics tag.


cb4960

Reply #318 - 2009 October 10, 3:38 pm
bombpersons Member
From: UK Registered: 2008-10-08 Posts: 907 Website

AAAAAAAAAAAAAAAWWWWWWWWWWWWEEEEEEEEEEESSSSSSSSSSSSSSOOOOOOOOOMMMMMMMMEEEEEEEEEEEEE!!!!!!!!!

Thanks a lot cb4960, now I can finally stop using windows entirely smile

*Just tried it on Ubuntu Jaunty (9.04), works great smile

Last edited by bombpersons (2009 October 10, 3:49 pm)

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

cb4960 wrote:

Note 2: As an aside, this port was extremely simple. Practically the only thing I had to do was to use ffmpeg instead of mp3splt to split the audio files.

Just curious -- any particular reason for not just using the ubuntu packaged mp3splt?

Reply #320 - 2009 October 10, 5:00 pm
bombpersons Member
From: UK Registered: 2008-10-08 Posts: 907 Website

pm215 wrote:

cb4960 wrote:

Note 2: As an aside, this port was extremely simple. Practically the only thing I had to do was to use ffmpeg instead of mp3splt to split the audio files.

Just curious -- any particular reason for not just using the ubuntu packaged mp3splt?

Meh, less dependencies are always good smile

Reply #321 - 2009 October 10, 8:30 pm
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

I could have kept using mp3splt, but I didn't want to have yet another program that needed to be installed beforehand. Actually the dependency on mp3splt goes back to the early days of subs2srs when it still relied on Avisynth. Eventually I made the switch to ffmpeg but kept using mp3splt because it was a convenient way to tag the mp3 files. At the time it seemed to work well enough, so I never felt the need to find an alternative. This seemed like a good opportunity to remove an unnecessary dependency.

Last edited by cb4960 (2009 October 10, 8:32 pm)

Reply #322 - 2009 October 11, 4:39 am
pm215 Member
From: UK Registered: 2008-01-26 Posts: 1354

While I'm asking random questions: is it really faster to do a single ffmpeg to yank/convert audio/video to a temp file and then invoke it again to do the split by line, rather than just doing the split and convert at the same time? I was thinking about speed-testing both approaches but if you've already done it I'll save myself the bother :-)

Reply #323 - 2009 October 11, 9:46 am
cb4960 Member
From: Los Angeles Registered: 2007-06-22 Posts: 917

pm215 wrote:

While I'm asking random questions: is it really faster to do a single ffmpeg to yank/convert audio/video to a temp file and then invoke it again to do the split by line, rather than just doing the split and convert at the same time? I was thinking about speed-testing both approaches but if you've already done it I'll save myself the bother :-)

I originally had it the other way, but (for some reason) it was dreadfully slow.

EDIT: It looks like I introduced the current method in Version 10. In the post I made about it, I claimed it that it was 20 times faster.

EDIT2: Oh, and I don't mind random questions smile

Last edited by cb4960 (2009 October 11, 10:03 am)

Reply #324 - 2009 October 11, 5:29 pm
ruiner Member
Registered: 2009-08-20 Posts: 751

Thanks for the update! You rock.

Reply #325 - 2009 October 19, 5:54 pm
sarenya New member
Registered: 2009-07-31 Posts: 6

Hello! I have read this whole thread, though not recently, so I apologize if this information is present somewhere and I've missed it.

I'm currently living in Japan and so have access to all sorts of fun Japanese movie content (Lord of the Rings dubbed, say). I'm wondering what the best way of going all the way from a physical DVD all the way to Anki cards is. It's my understanding that this is currently to manually convert the DVD to a movie, then convert the DVD subtitle tracks to external subtitle files, then feed that collection of files into subs2srs. If this is the case, that's fine, but if there are shortcuts available I'd be eager to exploit them.

In any event, this in an incredible tool and an amazing use of technology to take some of the gruntwork out of getting language resources.