Showing posts with label Video. Show all posts
Showing posts with label Video. Show all posts

Monday, April 30, 2012

2012-04 Music and Video

I really need to finish a piece of music.

I had a general idea and planned to keep it simple; Some autoharp mic'd up close so all the key bridge noises and fingers on the strings and creaks etc. would be picked up then add some short wave radio noise and some tabla.

Setup the mic's. Do a sound check with the electric guitar first. Like the sound. Try some delay effects. Like that. Add some more. Sounding quite good and a sequence of notes comes together quite well. Do a take. Sounds good. Add effects. Yum.

Now the video.

I wanted this to be about Autumn. Dig out photos of Autumn of Daniel's farm and some dead tree and park photos. Get the TV23 image scripts out and generate some scenes with them. Fire up a video editor and mix the stylistically best fitting ones together to the right length and add the sound.

Quite nice really.

Upload to Youtube. http://www.youtube.com/watch?feature=player_embedded&v=A6Fl3EMZd2U

Sunday, February 19, 2012

2012-02 Digitise Video tapes

I've had a few goes at this. always a bit half-hearted but I'd like to get rid of the tapes lying around and I have a gruntier system then when I last tried so I'll give it another shot.

# ***** Done: *****
# size is good.
# deinterlace is acceptable.
# cropping - could be better.
# Selects the correct video input (instead of the TV tuner) Check the size and rate settings.
# output to file. - works without fram dropping on video only - test with audio.
# audio capture. - need to set the capture channel via alsalmixer.
# sync to keep sound in sync - no noticable drift in 10 min tests
# A format better: 10min = 270meg. Try audio compression too ? Great - tiny now.
# Cropping top and bottom looks a bit out too. - Better, good enough for now.
# ***** Needs: *****
# nothing really - some good long tests.
# find out why the grab is sometimes textured and a restart fixes it.
mencoder -tv driver=v4l2:input=3:alsa:adevice=default:width=768:height=576 -vf pp=lb,crop=768:560 tv:// -oac mp3lame -lameopts preset=medium -ovc x264 -x264encopts pass=1 qp=40 -o deathrace2000.avi

# Result:
# Works very well indeed with 927M for a full length video that looks as good as the original and can be viewed close to real time with mplayer so you can record as you watch.
# Outstanding issue:
# find out why the grab is sometimes oddly textured and a restart fixes it.
# Workaround:
# Check recording with mplayer after a few seconds. Restart if not right.

mencoder -tv driver=v4l2:input=3:alsa:adevice=default:width=768:height=576 -vf pp=lb,crop=768:560 tv:// -oac mp3lame -lameopts preset=medium -ovc x264 -x264encopts pass=1 qp=40 -o deathrace2000.avi

# Trim and crop:
# ***** Needs: *****
# Needs to be sped up
# Needs to preseve quality.
# ***** Done: *****
# Start time: -ss hh:mm:ss.xx
# End time: - t seconds or hh:mm:ss.xx
# Crop: -vf crop=width:height:x:y
# the -vcodec copy overrides any -vf - fix quality: Use another codec.

ffmpeg -i deathrace2000.avi -ss 00:00:50.00 -t 20 -vcodec libx264 -vf "crop=656:560:54:0" dr2000-02.avi

That's all a bit sucky: Just trim instead and use the player to crop if needed. So I can just go:

ffmpeg -i deathrace2000.avi -ss 00:00:50.00 -t 20 -vcodec copy dr2000-02.avi

Which is blindingly fast and preserves quality.

Sunday, July 13, 2008

2008-07 Video for TIM

I've been taking a few good photos and seeing some neat old films and I'd like to do something where the problems are creative instead of technical or mechanical so a video for TIM sounds good.

Sort out the track(s).
Sort out and idea for it.
Sort out the tech' to do it.

OK well, sorting out the track and the treatment were kind of linked:

Something short and fun perhaps?: I had the idea of doing a space travel track based on animating graphics from styled on 60's SciFi paper back covers and sketched up an idea but it didn't jell. Those graphic artists were great and I only really realized how great until I tried to copy their style. I still think I'll have a go but I need to mull it over for a while.

Something with a very clear and simple process?: A photographic temporal cutup for a jazz track was another option so I bit of thinking that through made me realize that I have an idea for another project that is too close to that and I don't want them to bleed together. (And I'd already done something quite similar to this for another of the tracks.)

It looked like the epic track was going to be the one after all. I'd been holding off on this trying to find a way of using Camus's The Myth of Sisyphus using a weird old doll . But I need a better blue screen then I have right now and photos and lighting etc. etc.... too much. So trim it down: Rhinoceros by Inesco sounded easier and it fits the track almost as well. I could re-use an older idea I'd had and just plonk Rhino heads on the narrators as the film continued.

Easy.

So that was it.

The process was quite obvious after that:
Generate backgrounds:
Generate Narrators:
Use kino to put the narrators on the backgrounds.
Use cinelerra to edit the scenes in sync with the soundtrack.

Backgrounds: I picked through one of my piles of freak newspaper clippings and scanned then clipped and resized them in gimp. I sorted the images in to categories then dug up the script I used for the TV23 stuff and used that to make some video from them.

Narators: These are from a set of photos that disquiet. A lot. Trimmed them, sorted them and made temporalfilms oif them with the TV23 script.

Edited a narrator to inject more of the soul of the image owner back into it with kino. Used a custom png file as a mask for a luma wipe and set the start and end to 40% or so to fudge the narrator onto the background.

Finally got enough cinelerra skill to layer the back grounds and narrators onto a soundtrack and did a test run. I think it looks good enough not to use the Rhinos. Cool. Just the grunt work to do now.

A week Later: A few hours work and the figures and backgrounds are all done. I need to composite the figures onto the backgrounds and then mix them in cinelerra. I've been playing with cinelerra a bit and dont get the interface.

Thursday, June 26, 2008

2008-06 PC Infra-red Remote

After last months project burn-out I wanted a simple P.T.O.M. this time. I've started using the TV card on the PC and watching vcds etc on my PC. The TV card(s) both came with remotes and in these cold winter nights lying on the sofa these could be useful.
So how hard can it be? and the IR can control all sorts eh? oxine looked great for example so that was it. Get IR control going in the POTM.

LIRC seems to be the main project here. It looks like it supports both of the TV cards I have, One SAA7134 based and one BT878 based.

It goes: A Real Quick Run-down for fedora 9.
  • Set up the remote: Install the IR drivers and lirc. Use irrecord to create a config file for your remote control and copy it to /etc/lircd.conf.
  • Get lircd running. Configure /etc/sysconfig/lirc to use the right driver for you and then lircd to start on system boot like any daemon. (use the /dev/input/by-path device if you use devinput as the device driver. Don't use /dev/input/eventX as X can change on reboot)
  • edit (and create if necessary) ~/.lircrc. Check the application you want to control for details on lirc commands and match the commands to the keys in ~/.lircrc
  • use irexec if needed. It will trigger things if the app you wan't to control isn't looking at lircd for events itself. For example; tvtime needs irexec but gnome-radio does not. I use gnomes session management to run this.

OK What happened in detail:
First it had to track down the parts; The remote controls and the IR sensors. Found the remotes. Now check that they remotes both work aftre years in storage.
I recall a note in Silcon Chips serviceman pages saying you can check IR by looking for the IR led in a CCD device.

IE by looking at them with a web cam or digital camera and that works: Off and On.
Both remotes are good and so are their batteries.
Kinda ghostly seeing one thing in the view finder and another with your eyes.

Now find the IR sensors. Both found (yeah for my pack-rat self) and the different plugs mean it's clear that which sensor is for which card.

OK plug in the sensor and let's try to get IR control going on the existing card in my desktop PC.

Nothing. OK, check the module options for the card; I was never that sure they were right even thought the seemed to work OK with BT878 card. Check the PCI ID and find it could be one of three so try them all:

options bttv card=30 #Seems OK. No IR. The value I have been using.
options bttv card=39 #Video OK. No sound, no IR, snd_BT87x won't help with sound.
options bttv card=52 #Video OK. No sound, no IR, snd_BT87x won't help with sound.

OK that's not getting me anywhere, lets try the SAA7134 card from gnabgib. I think that was more upmarket and I've bumped into reassuring references to them while checking the LIRC docs.

Fire up gnabgib which is the machine that the card had last been used in (mothballed right now) and check the existing config (from memory it worked OK, never tried the IR though, only really used the FM card for the Concert and National stations):

relevant Modules loaded on gnabgib:
saa7134 110741 0
video_buf 23365 1 saa7134
v4l2_common 5825 1 saa7134
v4l1_compat 13125 1 saa7134
i2c_core 21825 2 tuner,saa7134
ir_common 7493 1 saa7134
videodev 9537 1 saa7134
soundcore 10529 2 saa7134,snd

relevant modprobe.conf line from gnabgib:
alias char-major-81 saa7134

Log from gnabgib of saa7134 loading:
kernel: saa7130/34: v4l2 driver version 0.2.12 loaded
kernel: saa7134[0]: quirk: PCIPCI_TRITON
kernel: saa7134[0]: found at 0000:00:04.0, rev: 1, irq: 11, latency: 66, mmio: 0x41080000
kernel: saa7134[0]: subsystem: 5168:0138, board: LifeView FlyVIDEO3000 [card=2,autodetected]
kernel: saa7134[0]: board init: gpio is 39000
kernel: saa7134[0]: there are different flyvideo cards with different tuners
kernel: saa7134[0]: out there, you might have to use the tuner= insmod
kernel: saa7134[0]: option to override the default value.
kernel: saa7134[0]: registered input device for IR
kernel: saa7134[0]: i2c eeprom 00: 68 51 38 01 10 28 ff ff ff ff ff ff ff ff ff ff
kernel: tuner 0-0061: chip found @ 0xc2 (saa7134[0])
kernel: tuner 0-0061: type set to 5 (Philips PAL_BG (FI1216 and compatibles))
kernel: saa7134[0]: registered device video0 [v4l2]
kernel: saa7134[0]: registered device vbi0
kernel: saa7134[0]: registered device radio0
kernel: saa7134[0]/audio: audio carrier scan failed, using 5.500 MHz [default]

OK, pull the card out.

Card label info:
DSE PCI TV Tuner Card XH6765

Well, that just worked. No config nothing: I thought I'd just try the remote to see and the volume and channel numbers worked on both remotes.

(Later I understood that this is becase lirc creates a fake keyboard that sends keystrokes matching keycodes of a real keyboard so numbers, enter key and volume all worked as though the keystroke came from the keyboard. I think the vol worked becase it emulates those odd-arsed mutlimedia keys )

Events are commint in on /dev/input/event7 so I'll look at irc now and see if I
can get things going more generally.

After reboot it was event6. Then on the next reboot event7 again . Himmm...

OK: Created a profile for the remote with irrecord - painless - and moved it to
/etc/lircd so that the keys are recognised and have names that mean something.

Set up /etc/sysconf/lirc.conf to tell it to use event7.

Got stuck then. Created a test ~/.lircrc for tvtime but nothing.
read read read...
OK tvtime is not a client itself. Run irexec as a daemon which connects to lirc as a client and then ~/.lircrc will be used by it and any revient lines executed.
NOTE it seems that as soon as a vaild client connects the fake keystrokes are no
longer available.

Beaut mate.

Friday, February 01, 2008

2008-02 Digitize VHS cassettes.

I have a lot of old SciFi films I'd like to get onto my media server and then a friend had some old tapes he wanted converted too so that made it a good project of the month.