I always wanted to use the ffmpeg command line tool (the one ffmpegX is the GUI of) in Terminal, but I didn't find it in Fink, and I didn't want to compile it from an experimental source. Well, there is a working binary of ffmpeg bundled with ffmpegX. To get it, simply follow these steps:
1. Get ffmpegX from the above URL. It's a pretty useful tool, because the ffmpeg synatx isn't quite easy to handle. 2. Control-click on the ffmpegX application, choose Show Package Contents from the pop-up menu, and navigate into Resources. 3. Copy ffmpeg to /usr/local/bin. 4. Execute the following in Terminal (as admin):
The output folder has the media folder and .tsv in it. I just need to do the rest of the work with the blank anki template now, I think (but I've done that before sucessfully on a Mac).
Anyway, I have to go out now, but I'll be back in a few hours and will post a more detailed summary of what I did.
Until then here is a brief description
Download Mono download ffmpeg (asriel link) in /bin (In Finder-->Go-->Go to folder-->/bin) Do the chmod command Make sure subs and vid in seperate directories terminal: "export MONO_MWF_MAC_FORCE_X11=1" terminal: "mono subs2srs path"
(I'll edit this later)
Thanks a lot for the help cb
Last edited by blackmacros (2010 February 23, 11:25 pm)
From: california Registered: 2007-05-23 Posts: 159
We ought to spread this program. Make it for more languages. Like if you can find a different language to learn it from, upload that too. I'd love to see this program do better. Might help with more download links (and if it stood out a little more or got its own proper site)
I uploaded a deck for people learning English with Korean subtitles (admittedly for my gf) and did Korean to English one as well. Took me awhile to figure out how to convert .smi subtitles without breaking Korean font, lol
2. Download ffmpeg from the link Asriel provided http://www.megaupload.com/?d=ZBU4FM3M (perhaps you might want to package this with the download? As a layperson I found it very difficult to find despite much googling. Thankfully Asriel rode to the rescue)
3. Put the ffmpeg file in /bin. You can get to /bin by opening Finder, selecting Go from the toolbar, then select Go to folder and type /bin (pm215 mentioned this might not be a good idea, but I don't know how to add other directories to $PATH. I don't even really know what PATH is)
4. Open terminal (found in Applications-->Utilities)
5. Type "chmod a+x /bin/ffmpeg" (without quotes) into the terminal, then press enter
6. Type "export MONO_MWF_MAC_FORCE_X11=1" (without quotes) into the terminal and then press enter
7. Type "mono" (without quotes) in the terminal, followed by a space, and then drag the subs2srs.exe file onto the terminal so that it automatically finds its location. Press enter.
8. Use Subs2SRS. Yay.
Every time you wish to use subs2srs, you will have to repeat steps 6 and 7 to open the program.
Thanks a lot for the patient hand holding cb, and for your help too Asriel.
Last edited by blackmacros (2010 March 05, 6:22 pm)
Just thought I'd mention I finally got around to using the newest version of subs2srs--I hadn't tried any of the features I'd asked for just yet, really, including cropping. Works a treat, though! Eliminated bottom 70 pixels from a 1280x720 hardsubbed video, creating 'raw' video clips. Still tinkering with optimum max milliseconds per line. I'm thinking 2250-2500. Looking forward to making many decks... Now if you'll excuse me, I think I need a time out from the forum. Happy studying and thanks again.
Hmm, so I've been having trouble getting audio/video clips generated with subs2srs--it says: "System.ComponentModel.Win32Exception: The system cannot find the file specified... " -- I noticed that for Audio Stream, when I select Video, it says "0 - ???", and that when I check the properties of the video, the audio stream has (edit: shift-JIS?) or whatnot, and also if I only generate snapshots, that works, so I'm thinking it's related to encoding of the audio? If so, how do I 'rename' the audio track within the avi? That is to say, if I play the .avi and check the properties, the audio stream has a name consisting of non-unicode gibberish.
I tried it with earlier versions and it doesn't give me error messages, even generates a .tsv with clip references, but the actual media folder is empty.
Okay, tried tinkering around with stream titles and I'm thinking that's not the problem. Guess I'll give up for now. The files in question are Shokojo Seira 01 and Buzzer Beat 03.
Here's the full error message that results in an Action Canceled once it attempts to generate audio or video clips (but not snapshots):
"Something went wrong while generating the video clips. System.ComponentModel.Win32.Exception: The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at subs2srs.UtilsVideo.convertVideoToXvidAvi(String inFile, String audioStream, DateTime startTime, DateTime endTime, ImageSize size, ImageCrop crop, Int32 bitrateVideo, Int32 bitrateAudio, String outFile) at subs2srs.WorkerVideo.genVideoClip(WorkerVars workerVars, DialogProgress dialogProgress) at subs2srs.SubsProcessor.bw_DoWork(Object sender, DoWorkEventArgs e)"
Edit: Oh damn it, I think I might know what the problem is, but I deleted those particular files already. I think it's because I was running Tea Timer in the background, which also uses .NET framework, but it's always seemed to run awkwardly, in the way it appears in my alt-tab icon list... maybe I'm grasping at straws, though. I'll try to replicate the situation...
Edit2: Nevermind, that wasn't it. Tried a variety of other videos too, which didn't work. Then I tried with version 16, that worked, though sadly it doesn't use the max milliseconds or have those nifty previews. Curses!
Edit 3: Okay, everything I just wrote, forget it, it all works now with every version. Know what I did? I re-extracted the subs2srs zip file that kept failing on me. Voila.... Perhaps it has to be in the same root? *shrug*.. No, not *shrug*, *facepalm*.
From the error message, it sounds like subs2srs.exe couldn't locate the relative path Utils\ffmpeg\ffmpeg.exe.
I'll keep that in mind 'next time'. All I know is, the thought that I could not use subs2srs filled me with fear such as I have never known. Greater even than staring upon the ineffable vastness of Cthulhu!