Posts

Showing posts from January, 2014

apt-install

Image
Do you ever get tired of typing sudo apt-get update && apt-get install <package> just to install one package that you added to your DEB repo ? I do and I decided to do something about it. What I really miss is the intelligence of yum which simply updates its repo caches if they are too old. apt-install  ( github.com/schlomo/apt-install ) is the next best thing. It is a simply Python script that updates the cache and installs the packages given as command line arguments. And it shows a nice GUI with a progress bar: Turns out that the parts are all there and part of aptdaemon . The only part missing was putting them together into this little script: Please note that I actually completely don't understand how to write async code. I'll be happy about all feedback with better implementations.

Simple Video Tricks

Image
While working on the new Recorder (see also last posting) I suddenly faced several challanges with the resulting video files: Many short chunks (50MB each, about 30-60 seconds) need to be merged Extract the actual talk from a longer recording, e.g. the recorder was on for one hour but the talk was only half an hour Convert the video into another container format because Adobe Premiere does not like AVI files Create video thumbnails Convert videos to be compatible with HTML5 <video> playback Turns out that avconv (or ffmpeg ) is the swiss army knife for all of these tasks! I am not qualified to say which is better, for my purposes the avconv that ships with Ubuntu is good enough. The examples given here work with both. When I write avconv I mean both tools. Since I don't want to degrade the video quality through repeated decode/encode steps I always use  -codec copy after the input file to simply copy over the audio and video data without reencoding it. C...

Hostname-based Access Control for Dynamic IPs

Image
Sometimes less is more. The most simple way to protect my private web space on my web server is this: <Location />     Order Deny,Allow     Deny from All     Allow from home.schapiro.org </Location> But what to do if home.schapiro.org changes the IP every 24 hours and if the reverse DNS entry (PTR) is something like  p5DAE56B9.dip0.t-ipconnect.de ? When my computer at home connects to the web server the source IP address is used for a reverse DNS lookup. This lookup returns the above mentioned provider-assigned name and not home.schapiro.org ,  the web server will never be able to identify this IP as belonging to my home router. The solution is to write the IP↔Name mapping for my dynamic IPs into /etc/hosts . That way a reverse lookup on the IP will actually yield the information from /etc/hosts and not ask the DNS system. Since I don't want to do this manually every time my IP changes, I automate it with this script. I...

Simple UDP Stream Recorder

Image
At the office I got a 3 channel digital Audio/Video Recorder to conveniently record our talks without much human effort. The device has an analog video input for the video camera (standard resolution) and a digital video input (Full HD) and an audio input. Epiphan VGADVI Recorder These 3 inputs will be merged into a single side-by-side video where you can see the speaker next to his computer output. The video can be even larger than Full HD, for example 2688x1200 (a 768 pixels wide SD image next to a 1920 pixels wide HD image): The device is far from cheap (list price is 1840 € + VAT) and can really do a lot. For example, it can create H.264 movies with a bitrate of up to 9 Mbit. It can also upload the videos to a CIFS share, but sadly that works only at a transfer speed of about 4 Mbit! So how could I transfer the videos at really high quality settings (9 Mbit) to the CIFS share? Waiting 2 hours to transfer the videos of a 1 hour talk is no option. Linux and Open S...
Like this content? You could send me something from my Amazon Wishlist. Need commercial support? Contact me for Consulting Services.