Wink : SWF to FLV

I looked around on how to do this (converting Wink’s SWF output into FLV / other video format), but to no avail.
Apparently, the SWF produced is not really a video file (however, in return, the size is usually much smaller than if saved into a video file). Both mencoder & ffmpeg failed to convert Wink’s SWF file into FLV, both giving error message “No media found in SWF”.

But of course if you’re going to upload them to YouTube or other video sites, you’ll need the Wink screencasts in video format.

There’s a workaround for this.

**WARNING** I don’t claim to be the expert on the topic (video encoding / transcoding) and comments to make this guide better is most welcome. Make backups before proceeding with this short tutorial. Although the steps are safe to my knowledge if you’ve made backups of your original files, I give no warranty whatsoever.

1. In Wink, choose menu File - Export As HTML
2. Save As : /tmp/sss.htm (for example), then on “file type to save images” choose JPEG. click OK.
3. Get mencoder. If you’re using Ubuntu, it’s as simple as “aptitude install mencoder”
4. Now we’re going to convert it. Type mencoder “mf:///tmp/sss_files/*.jpg” -mf fps=2 -o /home/harry/cool.flv -ovc lavc -lavcopts vcodec=mpeg4 (pretty simple eh?)
5. Done !

Notes:

  1. Sharp-eyed reader may noticed the vcodec=mpeg4 parameter and wonder why it’s not vcodec=flv. Reason is because the resulting file can’t be played, with both VLC & Totem confused looking for flv codec. And they both play flv files from YouTube with no problem. Since vcodec=mpeg4 gives a playable file, so I used that.
     
  2. There’s a slight problem where Wink saved the screencast as 1.jpg … 10.jpg … 100.jpg, and so on. As you can imagine, they’re listed as the following :

    (snipped)
    -rw-r–r– 1 helen helen 84658 2007-08-20 11:20 sss09.jpg
    -rw-r–r– 1 helen helen 52921 2007-08-20 11:20 sss100.jpg
    -rw-r–r– 1 helen helen 53043 2007-08-20 11:20 sss101.jpg
    -rw-r–r– 1 helen helen 53345 2007-08-20 11:20 sss102.jpg
    (snipped)
    -rw-r–r– 1 helen helen 53382 2007-08-20 11:20 sss108.jpg
    -rw-r–r– 1 helen helen 98914 2007-08-20 11:20 sss109.jpg
    -rw-r–r– 1 helen helen 84702 2007-08-20 11:20 sss10.jpg
    -rw-r–r– 1 helen helen 98681 2007-08-20 11:20 sss110.jpg

    The naming convention messed up the order of the files, and as the consequences, mencoder’s output also got messed up.

    We’ll need to rename these files so the filenames order will be similar to this :

    (snipped)
    -rw-r–r– 1 helen helen 84658 2007-08-20 11:20 sss07.jpg
    -rw-r–r– 1 helen helen 84658 2007-08-20 11:20 sss08.jpg
    -rw-r–r– 1 helen helen 84658 2007-08-20 11:20 sss09.jpg
    -rw-r–r– 1 helen helen 52921 2007-08-20 11:20 sss10.jpg
    -rw-r–r– 1 helen helen 53043 2007-08-20 11:20 sss11.jpg
    (snipped)

    The easiest way is to use mmv tool. Again in Ubuntu this is as simple as “aptitude install mmv”. Then execute the following commands :

    ## assuming number of files reaching thousands
    mmv -v “sss?.jpg” “sss000#1.jpg”
    mmv -v “sss??.jpg” “sss00#1#2.jpg”
    mmv -v “sss???.jpg” “sss0#1#2#3.jpg”

    That should fix it in a few seconds.

     

  3. There’s a discussion here saying that this (SWF to FLV) can be accomplished with a command as simple as ./edit.py -o cool.flv cool.swf

    However, again VLC unable to play the resulting flv file, complaining about missing “undf” codec.

7 Responses to “Wink : SWF to FLV

Leave a Reply

Subscribe without commenting