Archives 2005 - 2019    Search

Guide to working with Cinelerra

published Jan 04, 2010 10:32   by admin ( last modified Jan 04, 2010 10:32 )

The best guide for understanding how to work with Cinelerra I have found so far is this one:

Cinelerra for Grandma

LOADING MEDIA - Import your resources in Cinelerra FIRST EDITING- Arranging edits in a basic layout SECOND EDITING - Finishing off and polishing

It answered the following questions for me (directly or indirectly):

Q: Why does my quicktime export have such weird colors and how do I change it?

A: You can adjust the codec used by clicking at the tool icon (Configure video compression) before the video in the render dialog.

Q: How do I make my labels into a selection?

A: Double click in the space in between two of them.


Get Spotify working on Ubuntu 9.10 on Vostro 1015

published Jan 02, 2010 06:35   by admin ( last modified Jan 02, 2010 06:35 )

(check out my newer blog post on the subject)

Follow the instructions at the spotify site, but select OSS instead of ALSA.

If you have any other application open using sound, it won't work. At least I expect so, since closing youtube windows in Firefox made the sound come back.


HD Video from Canon HF200 on Ubuntu Linux - convert and play

published Jan 01, 2010 01:55   by admin ( last modified Mar 07, 2016 05:21 )

Notes to self on how to play videos from the camera on my Linux computer.

The files that the Canon HD video camera outputs have the suffix MTS. These can be played by Videolan client on my Dell Celeron-equipped laptop. Well, kind of: It plays the first two frames or so, then chokes on the video and keeps playing the sound.

The mts files can be converted to other formats with ffmpeg. The video from the Canon camera seems to be interlaced. If you use ffmpeg straight off the bat like so:

ffmpeg -i canonvideo.mts -sameq video.mp4

lines will be all wavy because the canon format is interlaced. Use the -deinterlace option like this:

ffmpeg -deinterlace  -i canonvideo.mts -sameq video.mp4

Update 2016-03-07 ffmpeg tells me to use -qscale instead of -sameq:

ffmpeg -deinterlace  -i canonvideo.mts -qscale 0 video.mp4

 

The mp4 file then plays effortlessly with vlc on the computer.

It should be possible to make the output interlaced as well, with the ilme option

However this:

ffmpeg  -i 00002.MTS -sameq -flags ilme video.mp4

still creates wavy lines. There are a number of idioms with ilme in them floating around the Internet, and I am not sure how to use it.

Put together a video split in parts

Canon HF200 splits long videos in separate files, each part about 2GB in size. These files cannot be converted as individual videos! Well, the first one can, but the  following ones each depends on the one before. This is because the camera in order to save space writes incomplete frames to the files, frames that only contain the changes as compared to previous frames. Some frames however are complete on their own and are usually called key frames. Now when the camera splits the video into files, it does not take care to do this at key frames.

The video therefore before conversion needs to be put together into one large file. On Linux this can be done with the cat commmand:

cat 00001.MTS 00002.MTS 00003.MTS > whole-video.MTS


Quote of the day - Churchillian drift

published Jan 01, 2010 01:42   by admin ( last modified Jan 01, 2010 01:42 )

"Churchillian Drift" - process whereby the actual originator of a quotation is often elbowed to one side and replaced by someone more famous.

-Winston Churchill


Länk - Tänkvärd artikel av Bruce Schneier på CNN.com

published Dec 30, 2009 01:21   by admin ( last modified Dec 30, 2009 01:21 )

 

Once a society starts circumventing its own laws, the risks to its future stability are much greater than terrorism. Despite fearful rhetoric to the contrary, terrorism is not a transcendent threat. A terrorist attack cannot possibly destroy a country's way of life; it's only our reaction to that attack that can do that kind of damage. The more we undermine our own laws, the more we convert our buildings into fortresses, the more we reduce the freedoms and liberties at the foundation of our societies, the more we're doing the terrorists' job for them.



Läs mer: Is aviation security mostly for show? - CNN.com


New year’s Python meme

published Dec 28, 2009 10:10   by admin ( last modified Dec 28, 2009 10:10 )

Here’s a short, 5 questions, 2009 Python meme. Copy-paste the questions, and blog your answers ! (From Tarek Ziadé)

1. What’s the coolest Python application, framework or library you have discovered in 2009 ?

Coherence. Coherence is a really cool framework for Audio/Video on your local network.

Coherence is a server that has has plugins for multimedia storage, for interfacing with multimedia servers, for its own renderer (player) based on GStreamer, interfaces to BBC radio shows, to TED talks. I giggled with excitement  yesterday when I realised that in the Coherence UPnP inspector you can right click on devices discovered on the network  to get relevant user interfaces for them and start dragging and dropping stuff between them: Drag a BBC Q & A session with Derek Walcott served from a Coherence server on my server machine, with a GUI provided by the UPnP Inspector onto the GUI, again provided by the Inspector, of a Gstreamer player on another machine and it just starts to play.

2. What new programming technique did you learn in 2009 ?

Tarek Ziadé wrote Network Programming in his meme. I will do the same, although I started learning Coherence only last week, it is within 2009 :-)

3. What’s the name of the open source project you contributed the most in 2009 ? What did you do ?

 play-next-pause is a simple remote control for UPnP/DLNA devices that I wrote over Christmas. It is crude, only 55 lines of code and built on top of Coherence. It is for providing me with a remote control for Rhythmbox here and now, scratching that itch quickly. 

Some of the code for Plone products I 've contributed to during the year will surely be released as open source during 2010.

4. What was the Python blog or website you read the most in 2009 ?

Planet Plone. Through the web.

5. What are the three top things you want to learn in 2010 ?

  1. Python wise it would be to deal with more dynamic network high level stuff of the kind that Twisted is made for. Coherence is built on Twisted.
  2. In connection with that, a more agile framework in connection with Plone, might be inside it with Dexterity and other stuff, might be Repoze.bfg or something  else.
  3. A new (human) language. Maybe Spanish.

Link - GUI Toolkits that can be integrated with Twisted

published Dec 27, 2009 01:33   by admin ( last modified Dec 27, 2009 01:33 )

Note to self:

Twisted provides a variety of implementations of the twisted.internet.reactor. The specialized implementations are suited for different purposes and are designed to integrate better with particular platforms.



Twisted Documentation: Choosing a Reactor and GUI Toolkit Integration


List of open source DLNA/UPnP AV software devices

published Dec 25, 2009 03:05   by admin ( last modified Nov 01, 2012 05:02 )

Updated January 2 2012, December 21, 2010; May 31, 2011

DLNA.gifupnp.jpeg

DLNA is a set of standards for home entertainment equipment to interoperate. The equipment can be hardware devices, but also software applications running on an ordinary computer. There are four types of DLNA devices according to the standard says Wikipedia (my explanations):

  • Digital media servers (DMS)
    A database of multimedia content, that other devices can play media from
  • Digital media renderers (DMR)
    Plays stuff, that is it makes sound and in required cases shows moving images.
  • Digital media controllers (DMC)
    A device that works as a remote control, can play stop, skip, pause, change loudness, brightness etcetera.
  • Digital media players (DMP)
    Not sure what this is. Maybe it is a combination of a DMR and DMC, or all of the above.


I will try to compile a list of open source software devices when I find them, with an emphasis on components, i.e. no listing of all-in-one solutions and a preference for software that runs on Linux and that is maintained. Although they most likely aren't certified, they interoperate via the DLNA protocol.

gupnp_logo.png gUPnP control point

Works as a

  • Digital media controller

Gupnp is a project that provides components for upnp applications. One part of it is the gupnp control point. It gives "remote control" for upnp and dlna applications. It can be intstalled on e.g. Ubuntu 10.4 by using synaptic or apt-get, installing "gupnp-tools".

gupnp1.png

"Play" worked fine, "Next" and "Previous" did not work on my setup. Note Rygel logo in renderer selection field

 

The control point is invoked with "gupnp-av-cp". It needs a renderer to be present on the network. I tested by installing rygel-gst-renderer, then starting "rygel" from the command line. After that I started "gupnp-av-cp". It picked up the renderer, and a media tomb server on the network.

gupnp2.png

 

Selecting a file and clicking "Play", or just double clicking a file made it play

 

rhythmbox.png Rhythmbox Music Player with DLNA/UPnP plugin

Site

Works as a

  • Digital media server
  • Digital media renderer (tested with upnp-inspector)

I have successfully remote controlled Rhythmbox Music Player, making it play, pause and skip, from a DMC. Tested on Ubuntu 9.10.

 

mediatomb50p.png Media Tomb

Media Tomb works as a

  • Digital media server

I have successfully played a video from Media Tomb through Totem. Media Tomb has a web userinterface where you can add all files that the user account has the right to, the media tomb database. This means that if you are running it under your own user, all your files may get exposed.  From the Media Tomb documentation:

The server has an integrated filesystem browser, that means that anyone who has access to the UI can browse your filesystem (with user permissions under which the server is running) and also download your data! If you want maximum security - disable the UI completely! Account authentication offers simple protection that might hold back your kids, but it is not secure enough for use in an untrusted environment!

Tested as a static binary, version 0.11.0, on Ubuntu 9.10.

 

totem.png Totem with Coherence DLNA/UPnP Client Plugin

Totem with the appropriate plugin

  • Works as a client

which means it can access and play media from media servers, but it does not advertise itself on the network, i.e. other dlna components cannot use Totem. It picks up Rhythmbox, Coherence:FSStore, Coherence:BBCStore and Media Tomb as mediaservers but not ushare, in my tests. upnp-inspector picks up all five. Tested on Ubuntu 9.10.

 

ushare

ushare works as a

  • Digital media server

ushare can be configured to only serve content from one folder. ushare 1.0 tested on CentOS 5. According to the web site ushare is currently not actively developed.

 

djmount

djmount is a gateway between the UPnP world and the Linux file system. It allows programs who do not handle UPnP but can handle local files, to access files from devices as if they were on the file system. djmount mounts itself on a mountpoint and presents each media server it finds in a subdirectory. It can even do searches. (djmount is currently untested by me).

 

linn.png Linn Kinsky Desktop

Linn Kinsky Desktop seems to be an ambitious project with a unique interface for making a DLNA/UPnP control point, among other things. On my Ubuntu (tested December 2009) the text items of the UI do not show up and then the application crashes X. Maybe it works better on other platforms or will work better in upcoming releases.

I tried it again in a nightly build 2010-11-03, and now there is text and I can add a music library, but cannot make it play.

 

inspector-logo.png UPnP Inspector

 

upnp.png

 

 

UPnP Inspector is a great tool for seeing what devices are on your subnet and what capabilities they have. If you are running Linux, check the repositories of your distribution for it, or if you are a pythonista, use easy_install or pip to install it. The Inspector is a part of Coherence (see text further down about Coherence).

Update: I just realised you can right click the devices in the tree, and you get a remote control for that device!

 

upnp2.png

Not only that, but you can drag songs from a media server to a media renderer and it plays the song. Amazing. It may nullify the need for the remote play-next-pause devide that I've made.

 

coherence.png The Coherence framework

Coherence is a server that runs a number of UPnP/DLNA devices for you. These devices, that come with Coherence,  are called "plugins". You can enable or disable plugins in a ".coherence" file in your home directory. The coherence framework can be installed on Ubuntu 9.10 in the normal way with apt-get or synaptic, and I suppose similar is true for other Linux distributions. Otherwise if you cannot find a ready made package for your OS, Coherence is a python project so if you are a python developer familiar with how to install python things, you can use easy_install, pip or even buildout.

You can try out Coherence by just typing "coherence" at the command line. I will list some of the plugins in Coherence below.

 

Coherence: Gmediastreamer

  • A digital media renderer

GMediastreamer is a pure media renderer. It has no concept of playlists and has no media database of its own. You need UPnP Inspector to give it files to play (by dragging them onto the UI of GStreamer in the inspector, hint: Right-click on the devices). It can then be controlled with the inspector or I guess any other digital media controller. Maybe there are or will emerge ways of providing it with a steady stream of files.

To enable GMediastreamer, put this in your .coherence file:

[[GStreamerPlayer]]
name= Myplayer

Change "MyPlayer" to whatever you want. Or keep the name :-)

 

Coherence: FSStore

  • A digital media server

FSStore is a media server that serves up a directory and its sub directories. It is useful outside of Coherence, you do not specifically need the UPnP inspector. Totem can play music and videos directly from it.

To enable FSStore, put this in your .coherence file:

[[FSStore]]
name = Jorgen's video store  # default: my media
content = /home/jorgen/Videos/videos            # default: None
enable_destroy = no                  # default: no


Well, maybe you need to change "jorgen" to something else...

 

Coherence: BBCStore and TEDStore

  • Digital media servers

BBCStore and TEDStore are media servers just like FSStore, put pull their content from external sources, in this case BBC Radio and TED Talks respectively. I have tried BBCStore and it works fine. It is useful outside of Coherence, you do not specifically need the UPnP inspector. Totem can play programs directly from it.

To enable BBCStore, put this in your .coherence file:

[[BBCStore]]
name = Coherence - BBC  # default: BBC
refresh = 2             # default: 1 (hours)

 

rygel.pngRygel

Rygel is... I'm not sure what Rygel is from its web page or when installing it, but a friend installed it and he claims it is a working DLNA server.

Update 2011-November-04: The same friend now reports that rygel stopped working for him when upgrading to Ubuntu 11.10, and that he is now using minidlna instead to good effect.

 

Pulseaudio DLNA Streaming

Pulseaudio is an ambitious sound architecture which is installed by default on Ubuntu as of currently. Pulseaudo has many possibilities but is also widely disliked because of complexity and reliability issuues. In Pulseaudio I can now choose to output the music from one computer on the sound card of another, over TCP/IP. This means you can have one computer close to your amplifier, as a glorified wireless soundcard. I have only done preliminary tests, but is seems like the bandwidth of wireless 802.11g is not enough. while wired 1Gb/s Ethernet is. Would be interesting to check 802.11n and 100Mb/s wired Ethernet.

 

leia.png Leia Upnp Audio Control Point

Leia Upnp Audio Control Point is a control point, that according to the web site can do a lot of interesting things. It runs on a variety of platforms. Unfortunately on my current platform (Ubuntu 10.10) Leia 0.5.8 (tested 2010-12-21) crashes when it encounters a DLNA device. If no devices are available on the subnet, it does not crash though, but is of course in that case of no utility. I hope they get it working on Ubuntu because it looks cool.

 

 

play-next-pause

sc_ubuntu.png

play-next-pause is my own try to make a simple remote control. It relies completely on the Coherence framework and was written largely from looking at the code of the UPnP Inspector. I have made two big binaries, one for Linux and one for Windows. These should have all dependencies included so you do not need to install Coherence, Twisted or GTK or anything else hopefully. The binaries weigh in at about 12MB which means they sport about 200KB per line of code (play-next-pause is about 55 lines of code) or about 2MB per button! This can surely be trimmed but hey, it works for me.


Speaker muting in Vostro 1015 to work with kernel 2.6.33

published Dec 23, 2009 10:25   by admin ( last modified Dec 23, 2009 10:25 )

Update 2010-10-25

Ubuntu 10.10 has a kernel that does speaker muting when the headphone plug is inserted. Tested repeatedly be me :-)

According to a discussion at Ubuntu Launchpad, the annoyance that the speakers aren't muted in Dell Vostro when you insert headphones should be gone come kernel 2.6.33. In the discussion there is also a patch for kernel 2.6.31.14 if you need something right now. It seems other laptops are also affected by this that use the same sound chip, the Conexant 5067.

Update 2010-01-07

It seems like Ubuntu 10.4 will be based on 2.6.32. So it would be a long wait unless somebody backports the patches for the sound. Or maybe we will just need to build our own kernels? 2.6.33rc3 is out now at kernel.org, and here is a description (that I have not tried) on how to build a kernel on Ubuntu.

Now if someone could just get the Option 505 3G modem to work on Ubuntu 9.10, I'd be a happy camper.

No, it'll be in 2.6.33. On Dec 4, 2009 5:56 AM, "foomor" wrote: Has this fix been added to kernel-2.6.32? I am arch linux user, i'd like to know which package should i wait to be updated. Thanks.



Read more: Bug #477154 in alsa-driver (Ubuntu): “When headphones are plugged in, the speaker does not get muted automatically.”


Non Nokia Phone on Maemo platform has arrived

published Dec 21, 2009 05:37   by admin ( last modified Dec 21, 2009 05:37 )

Well, at least in China it has, and it is calles Optima OP5-E.  It would be cool if we could get many devices on the Maemo platform, since it as far as I can tell supports more development frameworks than Android.

Since I filmed such a great video of it at IFA, OPTIMA TECHNOLOGY(SHENZHEN)CO.,LTD sent me a review sample of their new Optima OP5-E for me to publish an exclusive hands-on video-review. The new Optima OP5-E Maemo Linux based MID is now being released by http://www.chinaoptima.com/ and China Telecom on the Chinese market and they are now looking for global distributors (if many people demand it, there may be a distributor bringing this device to your local 3G telecoms market or sell it unlocked). (contact shkwan@wtpacific.com if you might be interested in ordering 300 units or more).



Läs mer: ARMdevices.net » Blog Archive » Optima OP5-E Maemo Linux MID video-review


Link - Coherence - a python framework for DLNA

published Dec 21, 2009 01:57   by admin ( last modified Dec 21, 2009 01:57 )

DLNA is a standard for how multimedia components should interact over a network. Coherence seems to supply a lot of functionality for this. I will look into this, and see if I can make the Inspector component into an on screen remote control, a bit like how the different clients for mpd (music player daemon) work.

Coherence offers a toolkit including: * a DLNA/UPnP MediaServer stand-alone application, which exports local/home or on-line media files via its backends to other UPnP clients. * an audio/video DLNA/UPnP Media renderer stand-alone application, based on the GStreamer framework (early stages). * an image DLNA/UPnP Media renderer stand-alone application, called Cadre, to be used as a picture frame. * a standalone UPnP bridge application, called Mirabeau, to share your UPnP content between two or more local networks over the Internet (work in progress). * a UPnP Device and Service analyzer/debugger tool, called The Inspector , which can also be used as a UPnP control-point. * some plugins or extensions for other applications to open them to the UPnP world, thanks to the framework (either as media servers, control points or renderers). This includes Totem, Nautilus, Eye Of Gnome, Rythmbox, Banshee, Elisa, amarok..



Coherence - a DLNA/UPnP Framework for the Digital Living - Trac


Link - python-vnc-viewer, a VNC viewer written python

published Dec 19, 2009 03:24   by admin ( last modified Dec 19, 2009 03:24 )

Haven't tried it yet, but I am thinking if it might be of use together with some authentication and authorization layers...

Simple VNC viewer that is built with Twisted-Python and pygame. Originally written by Chris Liechti. The viewer supports the following encodings: Hextile, CoRRE, RRE, RAW, CopyRect The display is done using pygame because of it's good graphics performance but any GUI system can be used as the code is modular and can easily adapted. Clipboard transfer is supported but not used in the sample application.



Läs mer: python-vnc-viewer - Project Hosting on Google Code


Länk - Good list of free icons for download

published Dec 14, 2009 12:18   by admin ( last modified Dec 14, 2009 12:18 )

 

In the overview below, we present 50 beautifully designed, free and professional high-quality icons for desktop and Web design. All of them can be freely used for private projects, and some are available for commercial use as well. Regardless, always read the licenses — they may change from time to time. You can also scan through our other icon-related articles:



Läs mer: 50 Free High-Quality Icon Sets - Smashing Magazine


Dum Tobinskatt föreslagen - "för miljön"

published Dec 13, 2009 12:58   by admin ( last modified Dec 13, 2009 12:58 )

Via Mikael Ståldal blir jag uppmärksam på en artikel i Dagens Industri där EU bestämt att lägga en EU-skatt på finansiella transaktioner - för miljöns skull.

Men, som en säger i kommentarerna till artikeln, är det då inte bättre att lägga en skatt på miljöfarliga utsläpp? Den föreslagna skatten minskar ju inte några utsläpp överhuvudtaget! Man vill överföra pengar från den privata sektorn till den offentliga, i detta fall EU, som en åtgärd mot global uppvärmning.

Men politisk styrning kan inte bara handla om att ta pengar och hävda att staten/EU är objektivt sett goda. Då kunde man ju lika gärna ge alla pengar til EU så att de kan göra kraftfulla åtgärder, för vilket problem som helst.

Vad man bör göra är istället två saker:

  • Gynna miljövänlig energiproduktion, med t ex skatter på andra energiformer, eller koncessioner eller annan lagstiftning, Dvs internaliser externa kostnader
  • Gynna teknikutveckling genom att skapa bra förutsättningar för kunskapsutveckling och ett bra investeringsklimat

Tobinskatten gör vare sig det ena eller det andra, tvärtom kommer den att minska investeringarna. Skatten för bara över pengar till EU, så att de kan pytsa ut dem till sig själva i lön och till olika byråkratiska åtgärder.

Läs mer: di.se - Tobinskatt ska betala klimatåtgärder


pqi i810 plus -det bästa USB-minne jag haft

published Dec 13, 2009 01:47   by admin ( last modified Dec 13, 2009 01:47 )

Hur hållbara kretskortskontakterna är vet jag inte, men det är sååå smart att ha minnet på en karbinhake på nyckelknippan. MInnet är alltid med, och man behöver inte ha nyckelknippan i datorn. finns i812 och i815 också med karbinhake.

 

Bild


Länk - Korttidsminnets ringa storlek kan bero på exponentiella faktorer

published Dec 08, 2009 06:25   by admin ( last modified Dec 08, 2009 06:25 )

 

As a sentence or a string of numbers gets longer, it becomes exponentially harder for the excited cluster to suppress the others from firing, resulting in pathways that are weak or barely there. Recalling seven items requires about 15 times the suppression needed to recall three. Ten items requires inhibitory powers that are 50 times stronger, and 20 or more items would require suppression hundreds of times stronger still. That, Rabinovich explained, is normally not biologically feasible.



Läs mer: In the Brain, Seven Is A Magic Number


Slow motion a video with preserved sound pitch and save to file

published Dec 06, 2009 05:20   by admin ( last modified Nov 09, 2012 11:57 )

This guide shows you, on Linux,  how to make a slow motion video of an mp4 video (in this case downloaded from Youtube), with the pitch of the sound intact. There is probably a one-line command to do this in mencoder, ffmpeg or vlc, if so please enlighten me. This guide starts with a terse summary, and then continues with a more verbose explanation.

Summary

You need:

  • mencoder (part of mplayer)
  • ffmpeg
  • sox

All are open source and freely downloadable.

Assume the video is called "normal.mp4", that should be made into a slow motion video called "slomo.mp4", with the pitch intact so we do not get those grovelling noises.

First to slow down the video to half speed, use mencoder, part of mplayer:

mencoder -ovc copy -oac mp3lame -speed 0.5  normal.mp4 -o slow.mp4

Extract the sound with ffmpeg:

ffmpeg -vn  -i slow.mp4 slow.wav

You may now discard the slow.mp4 file.

Pitch it up:

sox slow.wav slow_but_pitched_up.wav pitch 1200

Make a slow version of normal.mp4 with no sound:

mencoder -ovc copy -nosound -speed 0.5  normal.mp4 -o slow_no_sound.mp4

You can put sound and video together with with mencoder:

mencoder -ovc copy -audiofile slow_but_pitched_up.wav -oac faac slownosound.mp4 -o slomo.mp4

or use ffmpeg:

ffmpeg -i slownosound.mp4 -i slow_but_pitched_up.wav -map 0.0 -map 1.0 slomo.asf

(the sound needs to be compressed above, methinks)

If you can make an mp4 file instead of an asf file, so much better. On my machine it complained about not having the correct codec for sound; I am still looking into that.

Slow motion an mp4 video on Ubuntu Linux 9.10

--longer explanation and screenshots --

If you watch a video in vlc, you can slow it down, the sound is slower but stays at the original pitch, which is neat. I was unable to find a "Ok, good, now play through this and save it to a file" setting in vlc, so below is the road i treaded to finally convert a video file into a slow motion video file, with pitch intact.

We have two video processing tools at our disposal: ffmpeg and mencoder. ffmpeg does not have a slow-down option so we cannot use it for slowing down the video, instead we need to use mencoder. First to slow down the video to half speed, use mencoder, part of mplayer:

mencoder -ovc copy -oac mp3lame -speed 0.5  normal.mp4 -o slow.mp4

This will slow the video down to half speed, but unfortunately it also speeds down the sound. Mplayer has a switch for affecting the pitch but mencoder does not pick it up.

The -speed flag above indicates the speed, with 0.5 being half speed.

So far I have been unable to make mencode preserve the pitch (i.e pitch shift it back), but sox can pitch shift. However it only operates on sound files. So, the sound of the mp4 file needs to be separated out, then sox can operate on it, then we combine the sound and video again.

Separating out the sound

On  my Ubuntu 9.10 I hade to install "libavcodec-extra" to get it to work. The  command is like this:

ffmpeg -vn  -i slow.mp4 slow.wav

Now sox can operate on it. AFAICT sox should be able to read mp3 too, but not on my machine, despite library installations and hand waving.

Pitching up the sound

Now sox can pitch it up

sox slow.wav slow_but_pitched_up.wav pitch 1200

Sox is special in that it wants the input and output files first, and then after them, the command line arguments. Sox has a flag called "pitch" pitch takes among other things a percentage value, where 100 is one semitone, and hence 1200 is an octave. We want an octave shift since we slowed down the the video to 50%, and an octave is a doubling of frequency (pitch).

Combining slow motion video and pitched up sound

Make a slow version of normal.mp4 with no sound:

mencoder -ovc copy -nosound -speed 0.5  normal.mp4 -o slow_no_sound.mp4

You can now put sound and video together with with mencoder:

mencoder -ovc copy -audiofile slow_but_pitched_up.wav -oac faac slownosound.mp4 -o slomo.mp4

There is some problem with that file though since ffmpeg reports:

Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 14.99 (15000/1001)

It plays fine in vlc, though

You can use ffmpeg like so:

ffmpeg -i slownosound.mp4 -i slow_but_pitched_up.wav -map 0.0 -map 1.0 slomo.asf

 

If you can make an mp4 file instead of an asf file, so much better. On my machine it complained about not having the correct codecs with ffmpeg.

Combining video and sound with vlc

If yu would prefer to put sound and video together with vlc instead of mencoder or ffmpeg, here is how to do it:

vlc has a gui for combining sound and video for different files. First, for it to work I had to produce a slow version of the video with no sound, so rerun the command from the beginning of the guide, but make a video file with no sound:

mencoder -ovc copy -nosound -speed 0.5  normal.mp4 -o slow_no_sound.mp4

 Then the GUI in vlc can combine them. Start vlc and choose "Convert/Save" from the "File" menu:

 In the dialogue, select your slow motion file with no sound. Tick "Show more options", "Play another media synchronously" and click "Browse" to add extra media, and select the sound file there.

 Click "Converts/Save" in the above dialog, and you get the below dialog:

 

Here you have to experiment a little to select a profile that uses codecs that

  • you have on your system
  • vlc realises you have on the system

Happy slow motioning!

 There is this command in vlc, I wonder if it could be used for something:

--audio-time-stretch, --no-audio-time-stretch
                                 Enable time streching audio (default enabled)
          This allows to play audio at lower or higher speed withoutaffecting
          the audio pitch (default enabled)

Harvard: IT gör inte 4000 sjukhus effektivare

published Dec 02, 2009 01:52   by admin ( last modified Dec 02, 2009 01:52 )

När man inför ett IT-system, eller byter till ett nytt IT-system, så är det lätt hänt att man cementerar dåliga arbetsvanor och strukturer genom att stadfästa dem i programkod. Dessutom kan sidoeffekter av datoriseringen öka kostnaderna. Datorer är inflexibla jämfört med människor och mycket möda kan spillas på att jobba runt dem. Jag tror detta är orsakerna till att Harvard Medical School i en rapport kommit fram till att IT-system inte varit kostnadseffktiva i vården i snitt, sett över 4000 amerikanska sjukhus.

The recently released study evaluated data on 4,000 hospitals in the U.S over a four-year period and found that the immense cost of installing and running hospital IT systems is greater than any expected cost savings. And much of the software being written for use in clinics is aimed at administrators, not doctors, nurses and lab workers. The study comes as the federal government prepares to begin dispensing $19 billion in incentives for the health industry to roll out electronic health records systems. Beginning in 2011, the Health Information Technology for Economic and Clinical Health (HITECH) Act will provide incentive payments of up to $64,000 for each physician who deploys an electronic health records system and uses it effectively.



Läs mer: Harvard study: Computers don't save hospitals money


Ligger Skåne fem veckor före Stockholm i vaccination?

published Nov 28, 2009 02:20   by admin ( last modified Nov 28, 2009 02:20 )

Under den vecka som gått, som kan beskrivas som sista veckan i november, så har de som är mellan 40-49 år vaccinerats i Skåne, efter att yngre och riskgrupper vaccinerats under tidigare veckor. Samtidigt kan man läsa att de som är över 18 i Stockholm kan räkna med att få sina vaccinationer "under december eller i början av januari". Det tyder på en eftersläpning på 4 -6 veckor. Det är stor skillnad.

Nu dör ju dock inte folk som flugor, men det är en ganska stor regional skillnad, och skulle ju få väldiga olika regional utfall i dödlighet om farsoten vore värre. Kruxet ligger ju ytterst i leveransförseningarna som bygger på en kombination av massiv upprampning av produktion, med en besvärlig tillverkningsmetod. Nu när vaccinproduktion och utveckling blivit mer lönsamt igen i världen kan vi räkna med att relativt snabbt få snabbare och säkrare vaccintillverkning, till nästa pandemi.

Men friska människor över 18 får vara beredda på att inte få vaccin förrän under december månad eller början av januari, säger Håkan Ström.
Läs mer: Vaccinbrist i Stockholm efter försenade leveranser | SvD


MS kan vara orsakat av järn-förgiftning

published Nov 25, 2009 11:52   by admin ( last modified Nov 25, 2009 11:52 )

Detta är bara en hypotes men ett antal behandlingar har gjorts som verkar ge resultat. Teorin är att för mycket av metallen järn i kombination med förträngningar i cirkulationssystemet som kan vara medfödda, ger MS. Om det är sant så ställs de vedertagna teorin om att MS är immunsjukdom på huvudet.

Idén är att vener som ger blod till huvudet har delvis blockerats och i vissa fall har blodflödet i fel riktning. Tillståndet heter CCVSI (chronic cerebrospinal venous insufficiency) och anses då av dene italienske läkare vara orsaken till MS

Den nya teorin kommer från en italiensk läkare som började med att behandla sin fru.

 

He hypothesized that iron was damaging the blood vessels and allowing the heavy metal, along with other unwelcome cells, to cross the crucial brain-blood barrier. (The barrier keeps blood and cerebrospinal fluid separate. In MS, immune cells cross the blood-brain barrier, where they destroy myelin, a crucial sheathing on nerves.) More striking still was that, when Dr. Zamboni performed a simple operation to unclog veins and get blood flowing normally again, many of the symptoms of MS disappeared.

Läs mer: Researcher's labour of love leads to MS breakthrough - The Globe and Mail

 

These are preliminary results only so it's too soon to say exactly how CCVSI (chronic cerebrospinal venous insufficiency) is involved in MS and how/whether these types of treatments should be used in MS. An international meeting will be held in Italy next week to discuss this topic further, including a presentation by a doctor at Stanford (Michael Dake) who has recently treated some MS patients using these procedures.

Läs mer: Unblocking cerebral veins in MS - results from a surgical study | MSNews