Much ado about scripting, Linux & Eclipse: card subject to change

Showing posts with label video. Show all posts
Showing posts with label video. Show all posts

2010-01-18

Monitor fail

Well, that's a week of my life I'll never have again. Spent most of last week playing with WinXP, LinuxMint 8, and Fedora 11 & 12 (both 32- and 64-bit) trying to find a solution to my external display issues.

Turns out that it's a software issue: the latest xorg intel driver has a bug.

Humorous Pictures

2008-11-06

xorg.conf: Fedora edition

After installing a Fedora 10 preview spin on my new Thinkpad X200 last week, I got to learn yet another way to generate and test an /etc/X11/xorg.conf file. Every time I upgrade my OS, my xorg.conf file gets simpler. I expect one day I won't need one at all!

Where in the past for *ubuntu I've used dpkg-reconfigure -phigh xserver-xorg, with Fedora I needed to discover a new way. Here's what I did.

  1. First, run man startx to see a sample /root/.xinitrc file
  2. Next, create a /root/.xinitrc file
     #!/bin/bash
     xrdb -load $HOME/.Xresources
     xsetroot -solid gray &
     xclock -g 50x50-0+0 -bw 0 &
     xload -g 50x50-50+0 -bw 0 &
     xterm -g 80x24+0-0 &
     screenruler &
     twm
  3. To generate a new config file, you can run:
     startx -- :2 -configure
  4. To test a given config file (other than the default, /etc/X11/xorg.conf):
     startx -- :2 -config /root/xorg.conf.new

The above steps let you be booted graphically @ default resolution, then switch to another vt (CTRL-ALT-F2, for example), log in, and try a new xorg.conf on a different video port without affecting your running instance. To kill a trial X, use CTRL-ALT-BkSp. To switch from vt2 to the existing graphical instance, use CTRL-ALT-F1 or CTRL-ALT-F7 (it should be on vt1 or vt7).

Once I was statisfied that the xorg.conf file worked, I rebooted. On restart, using xfce or gnome, I can now graphically switch from laptop @ 1280x800 to 24" external monitor @ 1600x1200, or run both screens at 1024x768, eg., for presentations.

2008-09-29

From DVD to online Flash video with dvd::rip, FFmpeg, and JW FLV player

Last week I set myself the task of finally figuring out how to convert a DVD to Flash video, then to post it online. Turns out with the latest xubuntu 8.04, dvd::rip, FFmpeg, and the JW FLV player, it's quite straightforward.

Step 1: Convert a DVD to AVI file (.avi)

After a number of tests with dvd:rip 0.98.6 (installed .deb version: 1:0.98.6-0.0ubuntu1) and transcode 1.0.2 (installed .deb version: 2:1.0.2-0.8ubuntu7), I've settled on this configuration:

Storage
  • On the fly
Clip & Zoom
  • Autoadjust or No modifications (original size)
Subtitles
  • Activated for rendering
Transcode - Video
  • AVI/Xvid, 50 keyframes,29.97 video framerate
  • Single pass encoding, no deinterlacing
  • 1 x 850M (for 2hr DVD track)
Transcode - Audio
  • MP3 audio @ 128 kbit/s x 44100 Hz (required for .flv conversion)
  • Quality 2
  • Nice 0 or 19
  • No PSU core

I managed to rip a 2hr DVD track in about 4 hrs, resulting in an 850M AVI file. This was using my new Samsung 20X USB DVD-RW drive (TSSTcorp CDDVDW SE-S204N), writing to my Western Digital 160G USB bus-powered hard drive. Considering USB to USB read-and-write tends to be slow, I'd consider this pretty good performance, especially for a 1.6GHz machine with only 1.2Gb of RAM.

Here's the resulting .dvdrip-info file:

Step 2: Convert an AVI file (.avi) to Flash Video (.flv)

The next step is to convert your .avi to .flv using FFmpeg (installed .deb version: 3:0.cvs20070307-5ubuntu7.1+medibuntu1). There are lots of config options for this, but the simplest is this, where file types is determined from the input and output filenames. If your input file includes MP3 audio @ 128 kbit/s x 44100 Hz, you'll be able to convert to Flash Video (.flv):

ffmpeg -i input.avi output.flv

Step 3: Streaming Online

Finally, to post the video online, you can upload host it on your own site using the JW FLV Player. The site includes tons of examples including this one for creating a player with chapter, thumbnails, and decriptions. In addition to video, the player also works with audio files and still images, and can be skinned a number of different ways.

2008-09-19

915resolution + xorg.conf = Intel 82852/855GM @ 1600x1200x60Hz

Last week I ordered a new Sceptre 24" monitor from Tigerdirect.ca, and this week it arrived, only a few days later. Zero dead pixels, works perfectly -- and the current website price is 22% more! Timing is everything, apparently.

Of course setting up my laptops to play nice with it was another story, but for my Thinkpad T60p, I've managed to get a single display using aticonfig:

aticonfig --initial=dual-head -f
aticonfig --dtop=horizontal --overlay-on=1 --mode2=1920x1200 \
 --resolution=0,1920x1200,1600x1200,1400x1050,1280x1024,1024x768 \
 --resolution=1,1920x1200,1600x1200,1400x1050,1280x1024,1024x768

Granted, I don't have both the laptop and monitor enabled at the moment, but that's probably because I'm trying to push the laptop screen to a res it can't support (1600x1200). I could probably get them to both go to 1400x1050, but so far I'm happy w/ the single screen.

Anyway, the harder project was getting my wife's old R51 to connect to the Sceptre X24, for two reasons: one, its screen is all but dead (still works, but it's as if it's set to a brightness level of 2%); and two, the automatic configuration in Xubuntu kinda sucks for xorg.conf creation.

After a number of searches, attempts, and failures, I finally found a way to push the Intel 82852/855GM (rev 02) card to 1600x1200 at 60Hz. Here's how:

First, install 915resolution 0.5.3-1ubuntu1 from the ubuntu universe repositories. I tried downloading drivers from Intel, but I couldn't compile anything -- xf86-video-intel-2.4.2.tar.bz2, i915Graphics.tar.gz, drm.tar.gz or mesa.tar.gz -- missing dependencies, apparently.

Next, read the README that comes with 915resolution, /usr/share/doc/915resolution/README.Debian. It explains exactly how to use this tool. Here's what I put in my /etc/default/915resolution file:

MODE=3c
XRESO=1920
YRESO=1440
BIT=8

Next, in your xorg.conf, set the Driver to "i810", set the BusID to the value shown by lspci | grep VGA, set HorizSync & VertRefresh to values that will work for your monitor, and then add Display subsections for all the resolutions you want to try to use.

Section "Device"
       Identifier      "Intel Corporation Mobile Integrated Graphics Controller"
       Driver          "i810"
       BusID           "PCI:0:2:0"
       Option "DevicePresence" "true"
       Option "DRI"      "true"
EndSection

Section "Monitor"
 Identifier "Configured Monitor"
 ModelName    "Sceptre X24"
        HorizSync    31 - 80
        VertRefresh  55 - 76
        Option      "DPMS" "true"
EndSection

Section "Screen"
       Identifier      "Default Screen"
       Device          "Intel Corporation Mobile Integrated Graphics Controller"
       Monitor         "Configured Monitor"
       DefaultDepth    16
       SubSection "Display"
               Depth           16
               Modes           "1920x1440_60" "1920x1200_60" "1920x1080_60" "1680x1050_59.883" "1360x768_59.8" "1600x1200_60" 
       EndSubSection
       SubSection "Display"
               Depth           24
               Modes           "1920x1440_60" "1920x1200_60" "1920x1080_60" "1680x1050_59.883" "1360x768_59.8" "1600x1200_60" 
       EndSubSection
EndSection

Note that the most useful thing I managed to find was how to explicitly set display frequencies: for 1600x1200 at 60Hz, use "1600x1200_60". (This was required because xubuntu by default was trying to run at 59Hz and was creating terrible ghosting effects.)

To test out the above configuration, I wrote this little script (based on ideas here):

#!/bin/bash
# start a new X session on head :5, fire an xterm, and 
# launch kruler to measure screen res
# switch between vt sessions with CTRL-ALT-Fx, 
# eg., for vt2, CTRL-ALT-F2.
# I found this new vt with CTRL-ALT-F9
X -novtswitch :5 & xterm -display :5 & kruler -display :5 &

Now, granted, I still can't get 1920x1200x60Hz (the monitor's native resolution), but I may have found a solution: Tritton TRIUV200 See2 Xtreme USB 2.0 to DVI/VGA adapter.

Anyway, using a Kinamax KVM-USB4 USB 4 Port KVM Switch, I've got two laptops sharing the 24" 1600x1200 screen, with room to add up to two more systems. Minimal desktop clutter, maximum productivity.

Now, if I can just figure out a solution to my wife's workspace clutter...

2008-07-20

Dr. Horrible's Sing-Along Blog

I've just wasted a good chunk of my Sunday afternoon watching this show, and you can too... at least until it disappears and can only be found on iTunes (which I found out today is entirely unavailable for Linux).

If you were ever a fan of Joss Whedon, Capt. Tightpants, er., Nathan Fillion, or the incomparable Neil Patrick Harris, go watch. Now. Then laugh. Heartily. Or at least evilly.

2008-05-01

Welcome To The Machine

Looking for concert tix at Ticketmaster tonight, I got to talking about reCaptcha w/ SWMNBN, and found this video. Take a look.

Web 2.0 ... The Machine is Us/ing Us

In related news (or lack thereof), Terminator: The Sarah Connor Chronicles has not yet been picked up for a second season. C'mon, FOX, surely Summer Glau beating people up trumps another *freakin'* season of Family Guy or American Dad??

2007-07-14

CTRL-ALT-DELETED!

To celebrate Friday the 13th, I went to Ontario Place's Molson Amphitheatre tonight to see Billy Talent tonight w/ SWMNBN, our niece Skylar, and and her friend Katrina. It was Katrina's first time at a concert, and everyone else's second time seeing BT play the home town crowd. Gotta support the local, ahem, talent, after all.

This gave me a chance to try out the video recording on my phone, along with Blogger-in-draft's new video upload feature.

Here's a couple of examples of the a/v quality achievable from my phone, after converting the .3gp files to .mpeg using Miksoft's Mobile Media Converter. I have to say I'm very impressed with the converter (yes, there's a version for linux!) but not so much with the source data captured by the phone.


Surrender


Where Is The Line?

In addition to video, I tried to take some photos throughout the show (including the encore where Ben got everyone to light up cellphones and lighters), but was repeatedly thwarted by the manic fans in front of us. (I can't fault them for having fun, however, as that was the point of the evening after all.) Good times.