Wednesday, November 29, 2006

very simple interpolate effect experiment

I wanted to use the interpolate effect to mimic motion, or at least generate a smooth flow between static images. I thought I might be able to use this effect for video overlays and such.

For the experiment, I used four png images, each with a green dot near the center of each image. For each image, I moved the dot a bit so that the arrangement of the four images on the Cinelerra timeline would show a circle of green dots when played back. First, I imported each still frame into a Cinelerra project formatted to 30fps and 320x180. Then, I stretched each png to the length of 30 frames using the "align cursor on frames" option and then re-added the first png image to the end of the timeline in order to complete the circle of dots. Finally, I added the interpolate effect with an "input frames per second" value of 1.

Here is the resultant video with no interpolate effect (17Kb).

Here is the video with the interpolate effect applied (38Kb).

It does mimic movement, but is not very interesting just yet. I will try to add motion blurs to enhance this.

Friday, November 10, 2006

cam compatible HDV edit chain, part II (short)

I posted a more detailed version of this two posts ago (, but I thought I'd reiterate it in a shorter format:
1) from Cinelerra, export video using YUV4MPEG using mpeg2enc (.m2v) compression scheme with special params:
mpeg2enc --verbose 0 --aspect 3 --format 3 --frame-rate 4 --video-bitrate 18300 --nonvideo-bitrate 384 --interlace-mode 0 --force-b-b-p --video-buffer 448 --video-norm n --keep-hf --no-constraints --sequence-header-every-gop --min-gop-size 6 --max-gop-size 6 -o %
2) from Cinelerra, export audio using mpeg audio, layer II (384Kbps)
3) multiplex audio and video streams to MPEGPS (Program Stream) format using mplex:
mplex -f 3 -b 2000 video.m2v audio.m2a -o
4) convert .ps to .ts, MPEGTS (Transport Stream) format using VLC
5) export to cam, consider using 10sec blank leader

Update 5/17/2009
Note that if you bring the video into Cinelerra and the thumbnail is green, this means that the first frame of the video is not a keyframe. This is a problem with VLC. You can avoid this problem by using this ffmpeg command in place of Step 4 above:
ffmpeg -y -i -acodec copy -f mpegts -qscale 1 OUTPUT.m2t
*** end update ***

Update 3/14/2008
Once the video is converted, you may then output to the camera using test-mpeg2 from libiec61883:

Also, take note of a possible 2GB limit in libiec61883 uploading your content to the cam:
*** end update ***

Update 11/17/06
Last night, I found that doing performing other operations on your system like surfing the web or playing audio while running mplex or VLC convert may cause problems with the video as it uploads to the camera. So don't do anything while you convert your videos.

In my case, I was 28 minutes into an hour long video uploading to the cam when the import stopped. I no longer had uploading video displayed on the LCD screen of the cam. I only saw blue, the upload seemed to continue, but I got no final output. The solution was to remux the original streams using mplex and rebuild the MPEGTS using VLC. The important point being that one of these two processes is very sensitive to fluctuations in CPU or hard drive performance. So leave your PC alone while these processes are active.
*** end update ***

That's all she wrote for today. Enjoy!
the mule