Wednesday, November 29, 2006

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.

Update 5/17/2009Note 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 OUTPUT.ps -acodec copy -f mpegts -qscale 1 OUTPUT.m2t*** end update ***

Update 11/17/06Last 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 ***

Monday, October 30, 2006

Update 2009/03/17I finally put together a motion stabilization tutorial. Hopefully, it helps folks who are as confused as I using the thing.*** end update ***

The motion stabilizer is one of the most difficult effects to use in Cinelerra, as it has so many knobs and switches to figure out. It is very frustrating.

I had more luck this time with the motion effect, but it was still very hard to get working correctly. I kept playing around with different settings, but ended up using these:- translation block around 1/6 of entire screen- translation block more wide than high (400x150)- track single frame- stabilize subpixel- zoom set to auto in compositor

Once I did get it working, I thought I did have a better feel for how the different parts interact. But the motion effect seems to be is something you have to spend a LOT of time with to get working correctly. It is still frustrating, though.

Saturday, October 28, 2006

As you may know, I've been successful in rendering HDV MPEGTS that works being output back to my cam. However, I stumbled upon the fact that libiec61883 cannot output files greater than 2GB. Well, I rolled back my operating system to an earlier image, rebuild libiec61883 with the -D_FILE_OFFSET_BITS=64 DEPS param in examples/Makefile and now I can send data greater than 2GB using the command[scf@localhost ~]# test-mpeg2 -t 0 file.m2t
where 0 is the physical id of the cam as specified by gscanbus

I have found that using the incorrect physical id will result in the following error message:[scf@localhost ~]# test-mpeg2 -t 1 file.m2t libiec61883 warning: No plugs exist on either node; using default broadcast channel 63.

However, the camera will still display the incoming video. If the physical id is correctly specified, you should see no errors and the "Starting to transmit.." message only:[scf@localhost ~]# test-mpeg2 -t 0 file.m2t Starting to transmit

I have no idea why this fixed the problem, because I used the same steps as before. Just glad it works.

Thursday, October 19, 2006

Update 2009/03/17I finally put together a motion stabilization tutorial. Hopefully, it helps folks who are as confused as I using the thing.*** end update ***

I was able to get a better result from the video I made a while back. I realized I did not use the "Previous Frame Same Block" option originally. This made a huge difference. As I didn't have much time to fuss with it, I lowered the translation search steps to 128 as you suggest.

Here are my results with comparison of before, after and zoom. The video is very compressed, but you can see that the zoom doesn't degrade too badly, as my source is HDV, which is something you'd be interested in seeing:http://content.serveftp.net/video/motionexercise.m2v7MB

Monday, October 16, 2006

OK! I've got the latest video up on iTunes and now I just need to edit the XML for it. Editing the damn XML always takes too long. And of course, I want to get the track list right with the correct track times and witty comments. Ufff. OK! So the track list is done and now to send the boys the email for the latest video! Hurrah!

Well, four hours of overnight rendering yields a video I can't playback. I get this error:int YUVStream::read_header(): y4m_read_stream_header() failed: bad header magicint YUVStream::open_read(char*): Bad YUV4MPEG2 header: parameter out of range

Now what the F is wrong? Is it a problem with:- my rendering options I chose?- this version of ffmpeg in general?- my project?

I wasted a number of hours on the first two possibilities. I finally saw two issues in my project:1) for some reason, probably my big fat fingers, an audio transition was placed right at the beginning of the project (Timecode 00:00:00). I deleted this.2) I noticed that for joins between separate videos on the same a/v tracks, the joins between the audio and video segments did not end at the exact same place:http://content.serveftp.net/video/avmisaligned.png

To stop this, I went to the end of each segment, zoomed in all the way, and made sure that each video and audio segment ended at the exact same time. If they didn't end at the exact same time, I clipped off a bit of whatever audio or video track is dangling by using the mark in/mark out indicators and doing a "cut". After doing the cut, the segments aligned perfectly.Even with these changes, however, I still get a similar version of my original error when I load the project:int YUVStream::read_header(): y4m_read_stream_header() failed: bad stream or frame headerint YUVStream::open_read(char*): Bad YUV4MPEG2 header: parameter out of rangeHowever, I can output it to a usable format, so I don't mind the rather ugly error messages. You'd thought I would have known better by now. ARGH!

Along the way tonight, I've been trying to help the Cinelerra CVS community debug a couple of errors:1) the intermittent project hangs2) MS MPEG4 render crashes

I synchronized my hvirtual directory twice and recompiled, once for v932 for the project hang problem and then v940 for the MS MPEG4 render crashes. Both took a couple interations, but it seems like the programmers have the problems licked. That's good. We've been pushing them pretty hard lately.

So, finally around 11pm, I've rendered the video to a usable DVD mpg. Now it's time to render once more; this time to iPod format. It looks like FFMPEG has removed the "-b" bitrate switch in favor of some quality scale switch, "-qscale". The higher the qscale, the lower the quality. To create videos with the same quality as the original, you can use the "-sameq" switch. Otherwise, a qscale of 4 will yield a decent quality video with some significant compression. I'd use h264, but I haven't been able to install it successfully. I may try VLC..

Saturday, October 14, 2006

There were a number of outstanding bugs that some of the cvs.cinelerra.org programmers addressed. One of them was that Cinelerra keeps hanging when I open up projects. It seems to happen on projects I've built before 2.1 that I've saved as 2.1. So I've told the programmers I will test their work once they apply the patches. I drank too much coffee in the afternoon and deleted a number of files that I wish I hadn't off of my FAT partition. Stupid ass. Luckily, I have those on a second drive, so I should be OK. Another thing to do: MAKE DVD BACKUPs OF PARTITION IMAGES, PRONTO!! Ugh. What a hassle. This new rig is NOT making my life any easier!!

Tonight, I finally got to edit some video..the last band video. Amazing! It has been about a month and a half since I started the whole OpenGL/export HDV to tape excursion and while I've learned a lot, it has just been frustrating as hell. The state of HDV on Linux is pretty rough. I'm lucky I've made it this far and I wouldn't have without the help of the community, both cvs.cinelerra.org and linux1394.org. I'd like to finish this edit job so that I can spend some time with my girlfriend before she leaves me. As I'm editing this video, I'm a little upset by the quality: the crappy automatic gain control on the cam makes dark shots look grainy and grey and the focus fades in and out. How good of a video production will I make if the camera work sucks? Yarg. At least I've finished the edits. Off to render!

Friday, October 13, 2006

My editing rig is 95% there, outside of not having the ability to render using h264. Also, I'm only able to export files greater than 2GB to tape. Apparently, this is a typical problem that should be resolved by using some compiler flags (-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE). However, the compiler flags did not work, so I was just reading up on this thread: http://www.google.com/search?hl=en&q=reading+files+larger+than+2gb+cflags+D_LARGEFILE_SOURCE

that states that my system needs to support the following calls: mmap64, sendfile64, sendfilev64, mkstemp64. I will also try to pass --enable-lfs to configure.

Here are the steps I used to get HD content from Cinelerra back to my cam in full resolution, HD 720P format:

1) install the latest 2.6.18 kernel according to specs on http://www.linux1394.org2) you'll need the latest libiec61883 and libraw1394 libraries from the same place . I needed to manually tweak the ./configure procedure for libiec61883 with the following environment variable:PKG_CONFIG_PATH=/usr/local/lib/pkconfigAnother caveat to this step is that I needed to remove libraw1394 first, which was a nightmare because of all its dependencies. I created a yum install script to reinstall everything after this was complete.3) you'll need to make a change to tsbuffer.c and recompile libiec61883 (don't have it now..email me if you need it).4) you'll need to recompile mpeg2enc to allow for bitrates larger than 14000. This is referenced in the thread from way back when:http://www.dvinfo.net/conf/archive/index.php/t-19007.html--------------------A kludgy hack allowed me to get bit rates higher than 15Mbs in mpeg2enc

Here are the instructions for VLC from Paul St. Denis' original steps (http://www.celt.sunysb.edu/paul/mpeg2enc_HDTV.zip):------------------Start VLC, from the "file" menu select "open file", click on the "Browse..." button and find "programstream.ps", check on the "advanced output" check box and then click on the "Settings.." button. Make sure the "file" radio button is picked click on the "Browse..." button save the file on your desktop as "transport.ts".

Make sure that the "Encapsulation Method" is MPEG TS, leave everything else blank. Click OK, which brings you back to the other screen click OK again.------------------

Yes, it's a lot of work. But to be Microsoft free is a great feeling.

Update: as of this writing (10/17), I'm only able to upload less than 2GB of video. For my 720P video cam, this is about 19.7 minutes of video. I am working with the linux1394 community to resolve this.

Saturday, October 07, 2006

I should say that those notes are for HDV content, but some of them areapplicable for regular DV.

Today I spent some time with folks on the Cinelerra IRC channel trying to hook up my HDV cam for import and export functions. I used a combination of three programs: dvgrab to import/export DV content and test-mpeg2 (from libiec61883 source) or mpg1394grab for HDV export/import.

My camera is the JVCHD10U. In the onboard menu system of the camera, you can change the iLink Out setting to either SW (software) or AUTO (automatic). The JVC must be set to AUTO for Linux to recognize the cam. This is different than XP, which requires the camera setting to be SW.

For dvgrab, the camera must be set to DV/DVFor mpg1394grab and test-mpeg2, the camera must be set to MPEG2/HD

Wednesday, October 04, 2006

Lest ye think I have been sitting on my very small, small laurels, I want all the open source, JVC HD10U fans out there know that I am still working the problem. However, I have almost given up as a result of my many trials and tribulations over the past five days with MPEGTS file formats and the JVC cam.

I replicated all of the steps; however, the last step I cannot reproduce because I don't have an Apple Mac. I've tried exporting the .ts file to the cam using DVHSTool, CapDVHS and the utility that comes with the cam, but all of them give me errors. I've tested against many different versions of outputted files with little success. My last hope is that I can get a virtual Mac going using Xen, download DVHSCap to it and then try DVHSCap on the file.

Wednesday, September 20, 2006

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 well2) 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.

Monday, September 18, 2006

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.

Friday, September 15, 2006

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

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

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

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

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) origin2) first leg of walk3) second leg of walk4) 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.

Tuesday, August 29, 2006

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.

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.

Saturday, August 26, 2006

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:blurTitleShake400K

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

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.

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

Sunday, August 20, 2006

Sil680 Not Recognized by FedoraOK. 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 MDADMI 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

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

Congrats to me/Girlfriend Doesn't CarePretty 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??!

Woops with GhostOK. 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. :(

New MemoryEarlier 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 DrivesRight now, the steps to moving the system drives are quite a few:1) boot with Ghost disk2) save an image of my XP system drive3) save an image of my XP utility partition4) sweep clean the 80GB drive I have in the system by backing my Fedora Core 3 partimage files to USB drive5) remove 40GB drive6) reformat and repartition the 80GB for two systems (XP and Linux)7) apply recent XP image to XP partition8) reinstall or apply Linux image to Linux partition

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

Tuesday, May 09, 2006

Seems my camera does a better job with blue colors than green colors for chroma blue/green screen fun. Here's an example of using a blue pillow case for a chroma key background. Kinda came out well, minus the blue border around my hair!http://content.serveftp.net/video/chromaTest2.mpg3.3MB

Sunday, April 23, 2006

To follow up on this thread from a few weeks back, through a fair bit of reading and educated(?) guessing, I was able to get around this problem that stymied me.

One of the guys on the Cinelerra boards did clue me into the fact that the aclocal.m4 file was much too short, as it should be a superset of /usr/share/aclocal/libtool.m4. So that gave me a start. After reading a bit of doc and problem postings in Google regarding aclocal.m4, I saw that the file listing of hvirtual/m4 was about half as long as the list of *.m4 files in /usr/share/aclocal. So, I edited autogen.sh to point aclocal to build aclocal.m4 from the files in /usr/share/aclocal, rather than using the m4 directory under hvirtual. After running autogen, I then had a complete aclocal.m4 file with a libtool section. I did not have the libtool section in the file before building from /usr/share/aclocal.

I don't know what side effects this has, but the CVS compiled and I can playback and render video from my saved projects, so I assume this is a valid solution. The only side effect I've noticed so far is that I get a few more ALSA underruns like this:AudioALSA::write_buffer underrun

Saturday, April 15, 2006

Very happy to say that I was able to create an iTunes/iPod-ready movie from an ffmpeg produced mpeg1video! Hoohah! On my second FC4 box that has all the codec libraries, I was able to use the following ffmpeg string to get the iTunes file to work:ffmpeg -i sourceMpeg -b videobitrate -ab audiobitrate -f mov -vcodec mpeg4 -acodec aac output.mov

So, now my workflow is looking like this:1) bring in HDV footage2) run mpeg3toc (or rename files to .MPG)3) edit video (make sure no hanging or truncated video tracks are there!)4) render audio file as WAV5) render video file as MPG and add a -i for the audio6) outside of Cinelerra, convert to iTunes with the above command7) convert to DVD with script

Thursday, April 13, 2006

After struggling with video/audio synchronization issues, I've finally got 56 minutes of passable video. Due to my own stupidity (the fact that my Audio-Technica AT822 stereo mic was attached to, but not plugged in to the video cam) and that the audio coming from the cam is pretty lousy, I needed to use my backup recording device. So I had to sync the audio from my Creative Labs Nomad. Cinelerra is good with audio, but I had to resample to 48000hz to match the audio sampling rate of the original video.

I first tried to match the Nomad audio with the video, but that became an exercise in frustration. I still had the camera audio, so matching the Nomad audio to the cam's audio was MUCH easier than matching up to the video. As well, this method allowed me to play all four audio tracks (2 stereo from Nomad/2 stereo from cam) back at the same time. Monitoring this, if I heard bouncback echo, I knew my synchronization was off. So rule to remember, if you have a couple sources of audio, match to the audio, not what's on the screen, cause you'll be pulling out all your hair trying to match to the vid.

Glad this one is in the bag. It is truly my first complete video created in Cinelerra. Nothing special within, just fades/titles and a little time clock at the end. It was reduced from the original HDV to 320x180, 160kbps sound (247MB). Also, the video quality pretty much sucks because I didn't whitebalance or even focus for that matter. It was inevitable, as I was rushing to get setup for the three measly hours we had in the rehearsal space. Ah well.http://content.serveftp.net/video/20060406.mpg

Sunday, April 09, 2006

Today was a frustrating one. Tried to get the latest CVS build of Cinelerra (cvs.cinelerra.org) compiled on my Dell 400SC running Fedora Core 4. No go. I'm not the best at compiling beyond "configure, make, make install", so the process of autogen, aclocal and autoreconf were new to me.

A couple things learned:- running aclocal creates an aclocal.m4 file. In order to make sure you are pointing to the correct macros within the build files, you need to make sure to point to m4 using:aclocal -I m4

- the aclocal.m4 file should be larger than /usr/share/aclocal/libtool.m4, because aclocal.m4 is a superset of /usr/share/aclocal/libtool.m4.

Sunday, March 26, 2006

Such small things make us happy. Well, this was not a small thing, as I've been wanting to use Linux to burn a DVD of my custom videos created from Cinelerra for a loooong time. Up until now, I've copped out and just rebooted to XP to get the dirty work done. This was the first time I really sat down and muddled through the arcane commands to get a DVD burned. In fact, not only did I get a DVD-R burned, but I also figured out how to get a DVD-RW formatted and a DVD image burned to that! F'n A!!

I will work on a doc later, but here are the quick and dirty steps to burning a DVD on a Fedora Core 4 system:

Saturday, March 25, 2006

Update 2009/03/17I finally put together a motion stabilization tutorial. Hopefully, it helps folks who are as confused as I using the thing.*** end update ***

Tonight, I used Cinelerra's motion tracker to stabilize a section of shakey video. The source was some sunset footage taken in high wind. The wind was so blustery that the camera and tripod were shaking. Cinelerra's motion stabilization saved the day, though.

Sunday, March 12, 2006

Last night, I encoded my first full length video podcast as a Quicktime from Cinelerra. I brought it into iTunes and used the 'Convert Selection for iPod' feature and it spent all night (from 11pm to 11am) converting. The .MOV file specs were pretty heavy:- 50 minutes long- 720x404 resolution- 524MB

I used a PIII, 1.5Ghz laptop w/512MB of memory to do the conversion, hence the slowness. Once the file was converted, both audio and video tracks played back! Hooray! This was a lot better than my previous result wherein the audio was gone. So, I found the new .M4V file on the filesystem and looked at the metadata in the properties. I saw that there was no metadata, so not thinking that it could have a deleterious effect on the file, I added the missing metadata to the file as it existed on XP. Bad, nary I say REAL bad idea!

After adding the metadata to the file, the .M4V would no longer play in iTunes (6.0.4) or Quicktime. To put it politely..RATS!! I tried removing the metadata, but no go..the file still would not play. So, the twelve hours I spent converting the video was all for naught, cause now I have to do it all again. Wunnerful.

Let me be clear though..1) you CAN edit the metadata for an iTunes video podcast within iTunes2) you CANNOT edit the metadata for an iTunes video podcast in the filesystem. This will break the audio for the podcast.

This being the case, I decided to move my website over to my audio workstation in order to allow me to use my main video editing workstation to do the iTunes conversion. Screw the portable..conversion took way too long there. Copying the website from the video editing box to the audio workstation would allow me to use either of my primary machines to serve web content depending on which one I was using at the time. Both are dual boot setups, XP or Win2K and Fedora Core 4, so at least now I have flexibility. Of course, I wish it was under different circumstances that I make that improvement to my workstation setup. Argh.

So now the file is converting on my P4, 3.2Ghz, 1GB box. I'm hoping to get at least a 3x improvement in conversion time. So, I'm looking at 5pm today for the file to be done. 1-5pm..4hrs. Yeesh. I need a faster box..ain't it always the case!

UPDATE: Good news! It only took two hours to convert the file..sweet! I think the remarkable improvement may be bolstered by the MPEG compression available in my All-in-Wonder 9800 Pro video card. I should switch video cards and try this to verify..

Other things of note I'd like to get done:- setup RSS feed for newly created video- update Beginner's Guide for bitrate calculation/QT M4V metadata warning- change rendering partition to ext2 (non-journaling file system)- eventually get RAID0 back up and running for rendering partition

Saturday, March 11, 2006

Last night, I exported an MPG stream and put it into iTunes. The MPG in iTunes plays just fine. When I converted it using iTunes, though, the resulting file had no sound. What is going on here? If I use the Cinelerra standard YUV4MPEG pipe, with -target DVD, the video renders fine and comes back into Cinelerra in its' entirety. But when I use a custom resolution size (480x320), the video track gets truncated shorter than the audio track when I reimport the rendered MPEG back into Cinelerra. So something is definetly wrong about how Cinelerra is rendering files with custom resolutions. I guess I'm going to have to enter a bug because no one seems to be responding to my posts on cvs.cinelerra.org.

Tonight, I'm rendering the file as MOV and hopefully that will solve my issues. Of course, this is all extra work, because my original intent is to do all of this within Cinelerra, instead of having to go out.

More evidence of strangeness is that even though xine and mplayer played the MPG, ffplay played the video stream, but there was no audio. That may be telling me something.

Friday, March 10, 2006

To keep it simple, I would use five drives and do four logical partitions. This would allow for all filesystems to be on separate drive spindles:- one system drive for /root, /usr, etc - ext3- one storage drive for source files - ext3- one working drive for index files in .bcast - ext2- two working drives in RAID0 (stripe set) for destination render - ext2

If you only have four drives, just keep the source files on the system drive. I would think the index files would be the most used/most reads. I have to test this use "iostat -x " to monitor read/write stats of each physical device. I assume the render partition would be the heaviest hit, so make that your RAID stripe. You can do software RAID, but as a person who runs a decent sized HP web server farm, we've always depended on hardware RAID because CPU cycles are offloaded to the RAID card itself, rather than the operating system using CPU cycles for software RAID. Since rendering is pretty much all CPU, except for the input/index file reads and the destination render file writes, it makes sense that software RAID would tend to slow your rendering down.

Finally, ext2 is very important..no journaling necessary for the working drives..just storage.

When I used Adobe Premiere, I noticed that my ATI All In Wonder actually sped up the MPEG2 render times by 50%. However, I haven't been able to get the fglrx driver to work w/my dual monitor setup on FC4. Fglrx works with one monitor, but dammit, there's no way I'm going back to just one monitor! But I will need to test out whether or not the fglrx driver speeds rendering for Cinelerra as it does Premiere.

"Some of the songs in the iTunes music library, including the song "(Video name)",were not copied to your iPod because they cannot be played on this iPod."

Luckily, Apple provides a feature called "Convert Selection for iPod" when you right-click.But GEEZ! I already rendered this thing. I've got to do it again? Ugh. OK. And OH NO! The conversion utility takes a RIDICULOUS amount of time! Even on a very fast machine like mine, a 3.2Ghz P4 with 1GB of PC3200 memory, the conversion speed is roughly 1.5 minutes per minute of video. Argh!! That is way TOO slow. But I went ahead and did the conversion with my short test video. On the bright side, once the video was converted, I could then update my iPod and the video was on my iPod. Hooray!!

I continued playing around and loading many different videos into iTunes. In my travels, I stumbled upon one that did not require a conversion. I was shocked! I then reasoned that I'd save a helluva lot of time if I just produced the videos in the format that iTunes expects in the first place. But how to do that? So, my next course of action was to research why that one file worked in iTunes without a conversion and why mine needed the conversion.

To do this, I analyzed the output of MPlayer to determine the differences between files. I learned quite a bit over the past couple of days about audio and video formats by reviewing the output of MPlayer. It helps to have the text of both files displayed in two windows next to each other in order to more easily compare the files line by line. I've done this for you in the image below (click this link with SHIFT-click to open a second browser window):http://content.serveftp.net/video/renderTest/cinItunesConversion.jpg

Reviewing the diffences, I noticed the following:1) iTunes compatible file had the audio track as the first track in the MOV container, my file had the video as the first track2) iTunes compatible file was 44.1Khz audio, my file was 48000Khz3) iTunes compatible file included an extra audio header, my file didn't have the extra header4) iTunes compatible file audio compression method was MPEG-4, my file was twos complement5) iTunes compatible file FPS rate was 15, my file was 59.97

After way too many hours of trial and error (and scowls from my girlfriend and dog), I am proud to say that I have found the settings in Cinelerra that will make an MPEG-4 video totally compatible with iTunes so that iTunes does not need to re-render (the "Convert Selection for iPod" feature) the video!

Here are the specs:

For the project: Set Format Sample Rate to 44100khz Number of Channels to two FPS can be the FPS of your source video (try lower to 25 or less if problems) Width 320 Height 240 (320x180 fine as well) For the render: Audio MPEG-4 Audio Bitrate 128000 Quantization of 100 Video MPEG-4 Video The rest of the parameters are Cinelerra's defaults, but I will reiterate here: Bitrate 7000000 Tolerance 500000 Fixed Quantization selected Quantization 10 Keyframe Interval 45

I don't care how you do it, but you have to get your videos in that formatbecause iTunes is COMPLETELY STRICT when it comes to these settings! If you expect your video to upload into iTunes without needing a re-render, youCANNOT deviate from ANY of these settings!!

Caveat: with the possible exception of the MPEG-4 Video defaults. But Iwould only deviate from the settings after you've got the file uploaded intoiTunes without any issues first.

Why Mule?

"Mules are not really stubborn. They can seem lazy because they will not put themselves in danger. A horse can be worked until it drops, but not so with a mule. The "stubborn" streak is just the mule's way of telling humans that things are not right. Mules are very intelligent and it is not a good idea to abuse a mule. They will do their best for their owner, with the utmost patience."About Mules