Sunday, September 24, 2006

title sequence for birthday video complete..

Between writing doc to help myself and others on the Cinelerra list, I've finally produced some usable output. Check out my birthday video intro titles:
1.5MB

This is an mpeg4 quicktime vid. Mplayer/Xine should play it fine.

zoomed title

Well, this took way too long to do. Again with projector automation and manipulation of bezier curves. But, I figured I'd try it anyway. Nice little zoomed title
670K

Thursday, September 21, 2006

first split screen..

I used the projector and camera automation to do my first split screen today:
split.mpg
670K

Wednesday, September 20, 2006

digging that Batch Render capability!

Since I wrote that document regarding Cinelerra's QT for Linux compatibility, Cin's batch rendering came in quite handy.

Things to watch out for:
1) make sure your output path is not only the directory, but the destination filename as well
2) clicking New will add that render to the list. Now you can highlight the batch item and tweak its settings (file format/audio/video/batch enabling) if need be.
3) make sure to Save List to save out the batch. Inevitably, you'll make a mistake the first time you setup a batch. So it's important to be able to reload it if Cinelerra crashes or you've forgotten something.




Here is an updated discussion of the batch render feature:
http://crazedmuleproductions.blogspot.com/2010/01/batch-render-redux.html

the mule

Monday, September 18, 2006

Quicktime for Linux compatibility chart

I spent Sunday afternoon and evening creating this compatibility chart for QT for Linux formatted files exported from Cinelerra. There are many compression schemes that can be used within this file format and I did not have a list to tell me what scheme works and what doesn't in Cinelerra and some default media players like Mplayer, Quicktime for Win and Windows Media Player 10. Hence the guide.

Enjoy!
html format
open office calc format

Friday, September 15, 2006

upgraded video workstation has arrived!

My video rig is finally ready to go! After one month of hardware and software upgrades, I'm ready to start editing. Here are the upgrades I did:
- from 1GB non-ECC, Dual DDR to 2GB ECC Dual DDR mem
- from a system and a content drive to a system and RAID0 content drive
- from a 128MB ATI video card to a 512MB NVidia video card
- from non-OpenGL to OpenGL editing software

Update (9/19): converted my old 80GB dual-boot XP/Core 4 system drive to shiny new 250GB SATA w/16MB cache! Took about seven hours to backup the filesystems, partition the new drive and restore, with a few lessons learned along the way. Here's how this went:
http://cacasodo.blogspot.com/2006/09/replacing-old-dual-boot-system-drive.html

So, we're ready to go with da editing! Hooray!!

Install notes:
- FC4 install
- fstab/ntfs kernel module/NVidia drivers/xorg.conf/mdadm.conf/rpmkeys/remove libdv/install libdv4
- libdvDeps.sh
- install cinelerra
- cinSourceDeps.sh
- create /mnt/win, /mnt/nt
- window prefs/google/cin window placemnet/save on exit

rebuilding the workstation: lost my damn RAID set!

I *almost* had a minor tragedy last night while rebuilding my Fedora Core 4 box. The *almost* tragedy occurred while reinstalling Core 4. While going through the process, I told the installer to use my existing RAID set, but do not reformat it. I figured what harm could come to the drive if it doesn't get formatted? Well, a lot, apparently. Since I was rushing through the install, I neglected to take proper care of the 40GB of MPEG2 files on the RAID set. Here's what happened.

After the FC installer finished, it asks to reboot the box, so I rebooted. On bootup, the system gave me errors regarding an unrecognized filesystem and dropped me to a filesystem shell to fix what was wrong. I didn't know what was wrong, so I rebooted into a linux rescue disk and simply took the RAID filesystem out of /etc/fstab and rebooted.

On the second bootup, I started fdisk to look at the drives. To my dismay, fdisk did not recognize the RAID set partitions. Agh! I did some preliminary research online. I came to the determination that I figured I had lost my data, though I did have it backed up. But it would be a pain to retrieve the 40GB or so of videos from my backup system. Damn it. So I bit the bullet and created new partitions of type "fd", a Linux RAID autodetect partition as I had done when I setup the RAID set initially. When I wrote the partition table, fdisk gave me some error saying that the drives will resync after the box reboots. I rebooted and looked at the output of "fdisk -l". Things seemed alright, as the drives were recognized as Linux RAID autodetect. So I then reenabled /dev/md0 in /etc/fstab and made sure that /etc/mdadm.conf was correct. Dejectedly I rebooted.

When the system started, it dropped me into a prompt complaining of filesystem problems again. Now what? This time, I looked at the man pages for fsck and figured out the commands I needed to repair the disk. They ran something like this:
fsck -t ext2 /dev/md0 -V -r
-t filesystem type
-V verbose
-r prompt for each repair


A couple of inodes were missing or corrupt. OK. Fsck seemed to continue on with the different stages of the five stage check procedure. About five or ten minutes of this, I was getting worried. Happily, it finished the checks and dropped me to a prompt in order to exit and reboot. OK..that's progress! Also, the box came up clean with no errors. Sweet. I now went to view the filesystem, and to my shock and surprise, my original files were there! Awesome!! But now the real test is reading from and writing to files. I first viewed one of the videos in mplayer. This worked! I then performed an extensive write test. Cinelerra needs table of contents files for each video. These are index file, essentially. So at a prompt, I generated a bunch of toc files for the 30GB or so of video I had by using this one command:
for i in `ls -1 *.m2t` ; do echo $i ; mpeg3toc $i $i.toc ; done

The file creation took about twenty minutes but worked! I then loaded the files into Cinelerra, started editing and wouldn't you know they are good to go! Hooray! But I'm still an idiot.

Moral of the story is make sure you do your research on RAID before you decide to implement it.

Wednesday, September 13, 2006

ATI OpenGL 2.0 implementation incomplete..hello NVidia!

Sad to say, but all you ATI lovers (like I USED to be) are in for a rude surprise with ATIs' "OpenGL2.0" Linux driver implementation. After 1 1/2 days of finally getting my ATI All in Wonder 9800 Pro to actually use Direct Rendering and OpenGL2.0 and see it working well (5000FPS on glxgears), it was very disheartening to find out that ATI had not provided the proper 2.0 hooks for Cinelerra to use. Specifically, programming hooks like glDeleteShader were not implemented. The troubleshooting was quite informative, as I am not an active C programmer.

The solution was typical of today's PC market. If it don't work, buy one that does! So I went to B&H Photo and bought a BFG nVidia GeForce 7600GS, 512MB. Twenty minutes after getting home, the card was in the box, drivers were compiled, installed and working. Fifteen minutes after that, Cinelerra was compiled and I was using OpenGL2.0! Yeehoo!! And at twice the playback speed of what I was getting previously with the ATI card. I will report back on the performance of this card once I actually USE it.

Tuesday, September 12, 2006

openGL acceleration for Cinelerra not working just yet

Well, I spent all Sunday and Monday reconfiguring my workstation for hardware rendering (as detailed here), but my recompile of the latest Cinelerra code blew up on some obscure header file. Hopefully, the smart fellows on http://cvs.cinelerra.org can help out.

Wednesday, September 06, 2006

tracing a specific path using camera automation

For my Paris video, I wanted to simulate our walk of the city by panning an old map of Paris highlighted with the streets we traveled. To do this, I imported a series of large (2800x2100) still images created in Gimp and used camera automation to simulate movement. The camera automation needed to be very specific to trace our path. Thus, I had to get the X,Y coordinate pairs of each point I wanted the camera to center upon. The hurdle I encountered is that the origin of the X,Y coordinate system used in Gimp is at the upper-left hand corner of the image, whereas the origin of an image or video imported into Cinelerra is at the center of the image. So I had to do a conversion.

For an image that is 2800x2100:
(0,0) in Gimp is (-1400,-1050) in Cinelerra
(1400,1050) in Gimp is (0,0) in Cinelerra
(2800,2100) in Gimp is (1400,1050) in Cinelerra

Hence, in Gimp, all X/Y values are positive, but in Cinelerra, X and Y can have negative values.

Most of the camera automations to simulate our walk required about four coordinate pairs; hence, four conversions:
1) origin
2) first leg of walk
3) second leg of walk
4) destination

As you can see, when I wanted to change the speed or direction of the pan, the conversion of coordinates got a bit tedious. Also, I varied the movement of some of the camera automations so that not all were bezier curves, but more linear. As noted in an earlier post, this can be accomplished by displaying the X and Y camera positions and using CTRL-click on the vertices to "pull" the curves straight. This takes a little getting used to and is very time consuming. Note that there will be two sets of "pull" vertices on either side of the actual X/Y positions that you can adjust to straighten the curve slope.

But the result is quite pleasing:
ParisRoutes
55MB

Saturday, September 02, 2006

outputting HDV from Cinelerra

Update 9/10/06:
This procedure doesn't work. The working one is listed here:
/2006/11/cam-compatible-hdv-edit-chain-part-ii.html

Do it with FFMPEG:

Audio and Video Mux Example:
ffmpeg -i jpegphoto.mov -f mpegts -vcodec mpeg2video -aspect 1.777 -b 18300 -r 29.97 -s 1280x720 -acodec mp2 -ac 2 -ab 384 -ar 48000 output.m2t

Container/File Format:
-f mpegts

Video
-vcodec mpeg2video
-aspect 1.777
-b 18300
-r 29.97
-s 1280x720

Audio
-acodec mp2
-ac 2
-ab 384
-ar 48000

Tuesday, August 29, 2006

smooth scrolling credits for Cinelerra

An easy way to simulate scrolling credits is to use a very long jpeg or png image and use camera automation in order to scroll from the top part of the image all the way to the bottom of it. The one issue that has been called out on the Cinelerra boards is that the default camera automation is done using bezier curves. So, what'd you'd see by taking the defaults is that the scrolling would quicken at the beginning and the end of the automation, but be somewhat linear in the middle. The steps below show how to straighten out the curves in order to make the scrolling linear from beginning to end; in other words, a constant rate of scrolling all the way through the automation. Thanks to Nicolas from Paris for the directions!

- turn on the X and Y camera position indicators in the View menu
- click on the "Generate keyframes while tweaking" small key icon in the Timeline or Compositor
- for the scroll beginning, modify the Y position of the camera, in the compositor window. You can also click the "?" icon to enter the value directly
- at the end of the scroll, click and then I go back 1 frame to edit the Y camera position again
- go back to the main window and select "Camera Y" in the view menu.
- type "Alt-F" to modify the "Camera Y" green line height to see it entirely on the video track
- click on the start keyframe while typing "CTRL" to modify the keyframe curve slope
- do the same for the end keyframe in order to get a straight line between the start and end keyframes

After tweaking the settings, the scroll speed becomes nice and linear.

FC4 dependencies for Cinelerra CVS

Here are the packages you must have installed in order to compile the Cinelerra CVS from source on Fedora Core 4:

automake-1.9
libdv4, libdv-0.104*
ffmpeg*
xvidcore*
lame, lame-devel
libvorbis*
libogg*
libtool-1.5
a52*
libtheora*
libpng-1.2*
libjpeg-6*
libtiff*
esound*
audiofile*
libraw1394*
libavc1394*
freetype*
fontconfig*
nasm
e2fsprogs*
faad2-dev*
mjpegtools*
OpenEXR, OpenEXR-devel
fftw3*
libsndfile*
libiec61883*
x264, x264-d*
faac*

Notes
*for libdv-0.104, you must remove libdv-1.0.3 first which is used by *many* programs
*for mjpegtools, conflict msgs w/dries mjpegtools-libs
*OpenEXR path problem on build, create sym link to /usr/include/openexr

Thanks to Brendan Conoboy for suggesting the libdv-1.0.4 upgrade. Really sped up my playback framerate from about 9fps to 30fps.

Sweet!

Saturday, August 26, 2006

shaking title/freeze frame effect

The Projector is responsible for the shaking title effect. With "generate keyframes while tweaking" option selected, I created the shaking effect manually by moving the X/Y coordinates of the projector randomly in the compositor. I added further jerkiness by resetting projector coordinates manually via the X, Y, Z projector coordinate tool. I set the coordinates to 0,0 sometimes and then wildly negative and positive numbers (-264/+300) for real bouncy titles. I enabled the video track with titles only:
blurTitleShake
400K

After the shaking title experiment, I then completed the picture by adding a second video track with a Freeze Frame.
blurTitleShakeVideo
3MB

Timing fade outs and the proper freeze frame position were somewhat of a chore, but since I will be repeating this same sequence with different video and titling three or four more times, I should have the process optimized after finishing the last one.

blurred title

Boy, does that blur effect take forever in Cinelerra. And my box isn't a slouch: P4, 3.2Ghz, 2GB of 400DDR. For this short, four second video, it took 4.5 minutes to apply the blur effect on the title at DVD resolution using YUV4MPEG & FFMPEG. Ridiculous. Here it is though:
blurred title

Baby steps, I tell myself.

Sunday, August 20, 2006

system reconfig, final entry

Sil680 Not Recognized by Fedora
OK. I'm tired. Going to make this quick. Sil680 ATA RAID0 stripe set not recognized automatically by Fedora. Tried reinstall of Fedora. Does not recognize the RAID0 set I created. ARGH.

Saved by MDADM
I had to dust off my very, very rusty Linux RAID creation skills and manually create a software RAID set. In short:
- fdisk to mark the drives as part of a raid set
- use mdadm to make the raid set active
- create a mdadm.conf for the array
- put it in /etc/fstab
- format the stripe set

Here is the most important snip of what I did:
[root@computer /]# mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/hdg1 /dev/hdh1
mdadm: array /dev/md0 started.
[root@computer /]# mdadm --detail --scan >> /etc/mdadm.conf
[root@computer /]# cat /etc/mdadm.conf
DEVICE /dev/hdg* /dev/hdh*
ARRAY /dev/md0 level=raid0 num-devices=2 UUID=9c4c078f:8935e3e4:bfface8f:6a3c2c18
devices=/dev/hdg1,/dev/hdh1

[root@computer RPMS]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
/dev/md0 /mnt/videos ext2 defaults 1 1
[root@computer /]# mkfs.ext2 /dev/md0
mke2fs 1.37 (21-Mar-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
29310976 inodes, 58609088 blocks
2930454 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=58720256
1789 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


Congrats to me/Girlfriend Doesn't Care
Pretty good for a guy who didn't know mdadm before tonight. So yeah! RAID0 set works! Hoohah! Copied a movie to it and then tested it in Cinelerra. HOLY SMOKES! Getting 50fps on a 1280x720 HDV movie! Damn that's fast! I can't understand why my girlfriend doesn't care about this at 1am??!

Gotta crash. I think my work is done here.

Update, 9/11/07:
Here is a very nicely organized article on adding new hard drives to Fedora:
http://fedoranews.org/tchung/storage/

Saturday, August 19, 2006

system reconfig, #3

Cinelerra Installed..Working Another Matter
OK. So I am going to take a two hour break to watch Apollo 13. What better movie to watch to get you psyched to configure a RAID set! Before I am leaving, I have installed Core 4 successfully, got yum working after some RPM key stickiness, and downloaded all the dependencies for Cinelerra:

Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
cinelerra i386 2.0-0.4.20051210.2.fc4 /root/Desktop/cinelerra-2.0-0.4.20051210.2.fc4.i386.rpm 23 M
Installing for dependencies:
OpenEXR i386 1.2.2-6.fc4 extras 404 k
a52dec i386 0.7.4-8.fc4.rf dries 50 k
faac i386 1.24-3.fc4.rf dries 75 k
faad2 i386 2.0-8.fc4.rf dries 382 k
ffmpeg i386 0.4.9-0.lvn.0.21.20051228.4 livna 1.6 M
fftw i386 3.1.1-1.fc4 extras 865 k
fltk i386 1.1.6-1.2.fc4.rf dries 1.0 M
gsm i386 1.0.10-5.2.fc4.rf dries 39 k
imlib2 i386 1.2.1-1.fc4 extras 562 k
lame i386 3.96.1-4.fc4.rf dries 394 k
libiec61883 i386 1.0.0-0.2.fc4 freshrpms 35 k
libquicktime i686 0.9.7-0.lvn.8.4 livna 355 k
libsndfile i386 1.0.15-1.fc4 extras 218 k
mjpegtools i686 1.8.0-1.2.fc4 freshrpms 763 k
Updating for dependencies:
cpp i386 4.0.2-8.fc4 updates-released 2.1 M
gcc i386 4.0.2-8.fc4 updates-released 2.8 M
gcc-c++ i386 4.0.2-8.fc4 updates-released 2.8 M
gcc-gfortran i386 4.0.2-8.fc4 updates-released 2.3 M
gcc-java i386 4.0.2-8.fc4 updates-released 2.3 M
libgcc i386 4.0.2-8.fc4 updates-released 60 k
libgcj i386 4.0.2-8.fc4 updates-released 7.6 M
libgcj-devel i386 4.0.2-8.fc4 updates-released 1.1 M
libgfortran i386 4.0.2-8.fc4 updates-released 152 k
libraw1394 i386 1.2.0-1.fc4 updates-released 37 k
libstdc++ i386 4.0.2-8.fc4 updates-released 307 k
libstdc++-devel i386 4.0.2-8.fc4 updates-released 9.0 M
libtool i386 1.5.16.multilib2-3 updates-released 656 k

Now that's alotta dependencies. And this doesn't even cover the development versions of the programs so that you could compile the CVS version of Cinelerra. Cinelerra now works! Untested however..

Note to self: create image of this pristine FC4 root filesystem BEFORE it gets gobbed up!

Now let's watch the movie!

system reconfig, #2

Woops with Ghost
OK. A minor foul up in the steps from the last post. Seems that Ghosting the utility partition is not working as expected. Norton Ghost created a total new partition at the end of the XP partition on the 80 gigger. So, I went ahead and deleted it, as this 2GB partition eats into my Linux root partition. I never used the utility partition anyway, but I thought that Ghost would have correctly selected the 100MB partition I had chosen. Oh well. I'm not that concerned.

FDISK is for F*@K!
Another foul up was trying to use a Windows 98 boot disk and the classic fdisk program to both create the XP/Linux partitions and mark one as active. Word to the wise: DON'T USE FDISK! It has an annoying habit of "Verifying Drive Integrity" that takes FOREVER. So, I just decided to reboot and use my old 40GB XP system to carve up the drive and mark the 30GB partition as active. Saved a good deal of time there with that brainstorm. Phffflt!

Going SLEOOWLY.
Applying the XP image to the partition designated for it went super smooth, but the Dell has this ugly habit of taking forever to start up when I have the power to some disks plugged in and some not, but still connected to my Sil680 IDE stripe set RAID card. Frustrating, as it adds two minutes at the front end of every boot cycle. Argh. But now I have my XP system back up and running on my new 80GB drive! Hooray!

Core 4 from Scratch..with a bad CD!
I've decided that installing Fedora Core 4 from disks will make life cleaner. I could apply a partimage of my FC3 build or take the time to reimage the FC4 system, but I just want this to be over, so I am now in the middle of reinstalling FC4. The install has been crapping out on the Open Office RPMs. Seems there is a bad spot on the CD for them, so I deselected those packages for install. Only took me three FC4 installations and an hour to realize that I should do this. Oh, I'm just not very smart. :(

OK! What's left? Finishing the FC4 install and the stripe set.

system reconfig, #1

New Memory
Earlier this week, I had called TechDepot on the mistaken assumption that the memory speed drop to 333Mhz was due to the wrong Kingston memory being sent. So the Depot sent me another pair (at an unhealthy $187 per). So, after battling during the week with a conflict between my older Corsair (non-ECC/400DDR) and my new Kingston memory (ECC/400DDR), I decided to throw in the towel and use the older DDR in my audio editing rig and use both Kingston clips in the Dell video box. Installation was a snap, as all four Kingston clips were the same. Now I am running at full 400Mhz/Dual DDR/ECC POWER! Nothing like an upgrade!

Move the System Drives
Right now, the steps to moving the system drives are quite a few:
1) boot with Ghost disk
2) save an image of my XP system drive
3) save an image of my XP utility partition
4) sweep clean the 80GB drive I have in the system by backing my Fedora Core 3 partimage files to USB drive
5) remove 40GB drive
6) reformat and repartition the 80GB for two systems (XP and Linux)
7) apply recent XP image to XP partition
8) reinstall or apply Linux image to Linux partition

Right now, I am waiting for Ghost to finish creating the XP image. Talk back later.

Friday, August 18, 2006

system reconfiguration

All right. The time has come. This weekend, I intend to reconfigure my Cinelerra video rig for the upcoming task of editing surprise birthday, Stockholm and Paris videos. This will entail:
  • 2GBs of 400Mhz ECC, Dual DDR
  • migration of system drives from older 40GB to newer 80GB drives
  • 2x120GB stripe set

I have a lot of work ahead of me. Ugh. So let it begin.