Sunday, December 28, 2008

libmtp #2

To give libmtp a fair chance I downloaded the lastest released version, compiled and installed it, and retried. I must say the process went smoothly -

./configure
make
sudo make install
./hotplug.sh

(it seems the fedora 8 rpm for libmtp is very old... still I'm avoiding moving from linpus on the aspire one... I was however impressed yesterday by a fedore 10 vmware image... hmm.. q-emu on linpus perhaps?)

The updated mtp-sendtr now prompts for meta-data which is nice. I found giving an empty album name resulted in a seg fault... however, after being more forth-coming with meta-data, it worked!

Starting program: /usr/local/bin/mtp-sendtr u2.avi u2.avi
libmtp version: 0.3.3

PTP: Opening session
u2.avi,u2.avi,(null),(null),(null),(null),(null),(null),00,0,0
Sending track u2.avi to u2.avi
type:avi,8
Title> U2
Album> U2
Album artist> U2
Artist> U2
Writer or Composer> U2
Genre> rock
Track number> 1
Year> 2004
Length> 228
Sending track:
Codec: Audio Video Interleave
Title: U2
Album: U2
Album artist: U2
Artist: U2
Writer or Composer: U2
Genre: rock
Year: 2004
Track no: 1
Length: 228
Storage ID: 0
Sending track...
Progress: 25604828 of 25604828 (100%)
New track ID: 94879
Album doesn't exist: creating...
success!
PTP: Closing session

Program exited normally.

The length I found using
[user@localhost ~]$ tcprobe -i u2.avi
[tcprobe] RIFF data, AVI video
[avilib] V: 29.970 fps, codec=XVID, frames=6856, width=320, height=240
[avilib] A: 44100 Hz, format=0x55, bits=16, channels=2, bitrate=128 kbps,
[avilib] 6856 chunks, 3659103 bytes, CBR
[tcprobe] summary for u2.avi, (*) = not default, 0 = not detected
import frame size: -g 320x240 [720x576] (*)
frame rate: -f 29.970 [25.000] frc=4 (*)
audio track: -a 0 [0] -e 44100,16,2 [48000,16,2] -n 0x55 [0x2000] (*)
bitrate=128 kbps
length: 6856 frames, frame_time=33 msec, duration=0:03:48.761

and simply converted it to seconds.

Perhaps I should give gnomad2 another try, with a later release of libmtp.

No comments: