edit_vnc2swf
Editing Tool for Vnc2swf

This page is obsolete. Now edit_vnc2swf is integrated into pyvnc2swf.


What's It?

Edit_vnc2swf is an editing tool for vnc2swf. This program allows you to chop, splice, crop, and attach an MP3 audio to a .swf (ShockWave Flash) movie generated by vnc2swf. Also this program does some optimization to reduce the movie size a little bit. From version 0.2, it supports ScreenVideo format which was newly introduced in Flash version 7. Generally with this new format a movie can lose the weight without losing the quality, and it requires much less memory to play on your browser.

NOTICE: This program assumes a .swf file generated only by vnc2swf or this program itself. When other types of .swf files are given the behavior is not defined. (Generally you cannot manipulate other files in this way.)

TODO:


Download and Installation

Prerequisites:

Download:

Since edit_vnc2swf.py is just a Python script, you don't need an extra compilation process.


Usage

To view a movie, just give a SWF filename. To edit or snapshot a movie, you have to specify one (or more) original movie and exactly one output filename with '-o' option. edit_vnc2swf.py determines its function mode by the extension of the output filename.

0. To preview a movie: (Pygame required)

With this function you can look up the frame number for chopping movies.

$ edit_vnc2swf.py input.swf

Or you can play only selected frames with '-f' option:

$ edit_vnc2swf.py -f 100-200,350- input.swf

Controls:

Playback timing is not accurate. Sound playback is not currently supported.

1. To reorganize a movie:

Specify *.swf as output filename. You can combine the following options:

  1. Resample frames:

    With '-f' option, you can select specific frames. For example, to create a new movie which has frame #100-#200 and #350 to the end:

    $ edit_vnc2swf.py -o out.swf -f 100-200,350- input.swf
    
  2. Convert to screenvideo format: (for Flash version 7 or above only)

    Give '-V' option.
    WARNING: This format is not supported by older Flash Players (<= 6).

    You can also give '-c' option to enable compression. (This is turned off by default since compression is not very effective in other cases, as all images are already compressed by zlib algorithm.)

    $ edit_vnc2swf.py -o out.swf -V -c input.swf
    
  3. Concatenate multiple movies:

    Just give multiple movie files. The obtained movie is played in the order you specified in command line.
    NOTICE: If both files include MP3 files, its sample rate and the number of channels (stereo or mono) must be same.

    $ edit_vnc2swf.py -o out.swf input1.swf input2.swf
    
  4. Crop a certain area of a movie:

    Using '-C' option instructs the program to cut some specific area of the movie. Area is given in a similar format to X11 geometry.

    By specifying '-H' option, it generates an HTML file to frame the obtained movie to stdout.

    $ edit_vnc2swf.py -o out.swf -H -C 100x100+10+10 input.swf > movie.html
    
  5. Attach an MP3 audio:

    Normally, the audio in the original movie is copied verbatim (if any). However you can attach a pre-recorded MP3 file as follows:

    $ edit_vnc2swf.py -o out.swf -a voice.mp3 input.swf
    
    To cancel the audio, specify an empty file (or /dev/null).

    You can also give '-S' option to skip some samples at the beginning of the sound:

    $ edit_vnc2swf.py -o out.swf -a voice.mp3 -S 10000 input.swf
    

2. To take a snapshot of certain frames in a movie:

By specifying *.png as output filename, you can save certain frames as still images:

$ edit_vnc2swf.py -o frame.png -f 0,1,5 input.swf
In this case, frame #0, #1 and #5 are saved as frame-0000.png, frame-0001.png and frame-0005.png, respectively.

3. To extract an mp3 sound:

By specifying *.mp3 as output filename, you can save the MP3 stream in a movie as a separate file:

$ edit_vnc2swf.py -o voice.mp3 input.swf

4. To splice mp3 files:

There is an additional tool called edit_mp3.py, which allows you to extract a certain part of an MP3 audio file as follows:

$ ./edit_mp3.py '0-100,1000-2000' a.mp3 > b.mp3

You need to specify the range to extract by its "MP3 frame numbers", not sampling numbers or durations. Generally one MP3 frame has several milliseconds (with sampling rate = 44.1KHz) and they are stored separately in MP3 files. You can extract these frames without reencoding the audio, but you cannot change its bitrate, channels, or sampling rate.


Last Modified: Fri Oct 28 09:06:04 EDT 2005 (10/28, 22:06 JST)

Yusuke Shinyama