Cannot open file (/home/u0059333506/public_html/wordpress/wp-content/backup/.htaccess)Cannot write to file (/home/u0059333506/public_html/wordpress/wp-content/backup/.htaccess) mp3 « Hanno’s Coding Log

Posts Tagged ‘mp3’

news on cover art

Chris Bowron just released a new version of foo_sendtodevice, including my contribution for copying cover art files.

accessing the Windows Media Devices API

I am currently working on a Python library for accessing MTP-based MP3-players via the Windows Media Devices API.

Current preview and development versions are available from Pypi.

You can find further information on the project page.

Projects

RSSTorrentCollector

This is a small project for conveniently downloading torrents from a RSS feed.

Hosted on BitBucket.

Working on Ubuntu

I have a page on wiki.ubuntu.com, where I keep track on my various (small) contributions to Ubuntu.

WMDLIB

Update: I am no longer working on WMDLIB, since I have switched to Linux entirely. If however somebody is willing to collaborate / take over, I would try to support the effort.

WMDLIB is a Library for interfacing with the Windows Media Devices API from Python. Its aim is to make copying of files to an MTP-based MP3-Player as easy as copying a file to a directory. Tools for playlist creation will also be included.

The library is in the absolute beginnings at the moment. (Pre-Alpha)

I plan to build a COM interface to the library for the most important features, so applications written in C++ can use it, too. (Thinking of foobar2000 for example…)

WMDLIB is availeable from the Pypi project page.

more cover art

I am currently working on a patch for foo_sendtodevice, an MP3 player plugin for the excellent Foobar2000.

Chris Bowron was so kind, to send me the source code. My patch will allow to automatically copy album cover art in separate files to the device, too.

MP3 Cover Art Embedder and Resizer

I updated my Cover Art Resizer program.

New features:

  • configurable output verbosity
  • allows wildcards in directory names
  • “force” switch for thumb.jpg re-creation

The program takes one or more paths as an argument, searches the entire directory tree for “cover.jpg” files and creates “thumb.jpg” files in 100×100 pixels size. It also embeds the thumb.jpg into the mp3s found in the directory.

It requires the Python Image Library and Mutagen. (If you have setuptools installed, the dependencies will be installed automatically)

You can install by running python setup.py install from the source code distribution or installing the supplied EGG or using the EXE.

Run coverresizer -h for help. (Your Python Scripts directory must be in the PATH)

Files:
Coverresizer 0.3 Source Distribution
Coverresizer 0.3 Windows Installer EXE
Coverresizer 0.3 EGG for Python 2.4

thumbnail creator for cover.jpg / album art

I just wrote a small python script that allows you to create thumbnails on all your cover.jpg album art in your MP3 collection.
Make sure you save the covers as cover.jpg in the folder that contains the MP3s. This is recognized by most programs.

With this script you can generate thumbnails for all the cover.jpg files:

#!/usr/bin/env python
import sys
from os import path, walk
from PIL import Image, ImageOps
 
def process_path(dir):
    for dirpath, dirnames, filenames in walk(dir):
        for name in filenames:
            if name == "cover.jpg":
                if not path.exists(path.join(dirpath, "thumb.jpg")):
                    process_image(dirpath, name)
        for name in dirnames:
            full_path = path.join(dirpath, name)
            process_path(full_path)
 
def process_image(dirpath, name):
    full_path = path.join(dirpath, name)
    print full_path
    img = Image.open(full_path)
    img = img.resize((100,100), Image.BILINEAR)
    img.save(path.join(dirpath, "thumb.jpg"))
 
if __name__ == "__main__":
    dir = sys.argv[1]
    print dir
    process_path(dir)

You’ll need the Python Imaging Library. Just call the script with the root path of your MP3 collection as the first command line parameter.

You might want to import the thumbnails into the MP3s with software like MP3Tag.

Dynamic ip based authentication with Apache

I have a very cool Squeezebox WiFi MP3-Player which comes with a very cool music server software called Slimserver (written in Perl, Open Source, too!).
One thing this Slimserver can do is stream MP3 to every MP3 stream capable player. (Winamp, etc.)

The problem: How to access my music from any computer that has i.e. Winamp installed, without risking a big security breach at my home computer.
Solution: Secure the Slimserver with Apache as a proxy, using Apache’s SSL and authentication capabilities.
Catch: Winamp doesn’t do SSL and MediaPlayer isn’t to good at it, either.

The real solution: Access the management interface of Slimserver via SSL, protect it via some AuthType and allow unprotected, unencrypted access to the stream URL only from IPs that have previously accessed and successfully logged in at the SSL protected page.
I do that with mod_python and the various hooks it provides. Yes, you can do more with it than just executing Python scripts.
More »

Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien: