Re: [SLUG] vnc2swf

From: Ian C. Blenke (icblenke@nks.net)
Date: Tue May 13 2003 - 16:40:56 EDT


On Monday 05 May 2003 04:22, Vernon wrote:
> Ian C. Blenke wrote:
> >If you want synchronized audio, you want to apply the patch from the
> > vnc2swf page first.
>
> The key word here is "synchronized" ...
>
> Ok ... Debian (sid), vnc2swf, both patches for it applied ...
> Basically ... launch the vncserver, start a "sox | lame" mp3 encoder,
> start the vnc2swf client generate the swf file without error, quit the
> client, kill the server ...
>
> But the video is out of sync with the audio :-/
> The audio is about 4 seconds behind the video ...
> Any idea of what I can do to synchronize them, short of editting the swf?

yeah, both sox and lame buffer, and then there's the file buffering of the
pipe between them, ideally, you want to pre-record the mp3, and then record
the VNC *after* having the mp3 file handy (and playing at the same time you
start recording the SWF file).

> Below is a log of the commands i've been using to make swf recordings.
> By the way, when ever I "mkfifo out.mp3", or "mknod out.mp3 p", as the
> patch instructions say to do, the sound always cuts out after the first few
> seconds of the resulting swf file. The method shown below does not
> have that problem, but it may be worth noting why I cannot get the
> recommended instructions to work.
>
> $ vncserver :1 -geometry 1000x750
>
> New 'X' desktop is godfearer:1
>
> Starting applications specified in /etc/X11/Xsession
> Log file is /home/vds/.vnc/godfearer:1.log
> $ rec -c 1 -d /dev/dsp -t wav -r 44100 - | lame -h - - > out.mp3
> Send break (control-c) to end recording
> sox: Length in output .wav header will be wrong since can't seek to fix it
> LAME version 3.92 (http://www.mp3dev.org/)
> Using polyphase lowpass filter, transition band: 13692 Hz - 14226 Hz
> Encoding <stdin> to <stdout>
> Encoding as 44.1 kHz 64 kbps single-ch MPEG-1 Layer III (11x) qval=2
> $ vnc2swf -soundfile out.mp3 :1
> VNC server supports protocol version 3.3 (viewer 3.3)
> Password:
> VNC authentication succeeded
> Desktop name "vds's X desktop (godfearer:1)"
> Connected to VNC server, using protocol version 3.3
> VNC server default format:
> 32 bits per pixel.
> Least significant byte first in each pixel.
> True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
> WriteInitMovie: Opening file: "out.swf" with frame rate 12
> Using default colormap which is TrueColor. Pixel format:
> 32 bits per pixel.
> Least significant byte first in each pixel.
> True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
> Using shared memory PutImage
> Same machine: preferring raw encoding
> ShmCleanup called
> WriteFinishMovie: 188 frames (15.7 sec), expanded_image: 17075108
> WriteFinishMovie: 1727747 bytes dumped.
> $ vncserver -kill :1
> Killing Xvnc process ID 24610
> $ ls -l out.swf
> -rw-r--r-- 1 vds vds 1727747 May 5 03:48 out.swf

Pre-recording the mp3 audio is probably best. When you go to record the
vnc2swf session, start an xmms player at the same time against the same mp3
file and follow along. When you close the window, you should have a merged
file that isn't too far out of sync (if at all).

Again, this isn't a very happy thing yet... and it has been giving me a hard
time as well.

-- 
- Ian C. Blenke <icblenke@nks.net>

(This message bound by the following: http://www.nks.net/email_disclaimer.html)



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:47:18 EDT