Zaphod's Deepest Thought Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Sylvania music/video player

 
Reply to topic    Zaphod's Deepest Thought Forum Index » General Discussion View previous topic
View next topic
Sylvania music/video player
Author Message
ben



Joined: 17 Feb 2009
Posts: 4

Post Sylvania music/video player Reply with quote
Hey Zaphod,

Thanks for the useful information on transcoding for the Curtis/Sylvania video player! You saved me a lot of time experimenting to figure out which codecs the player can handle. I had bought the player because the package said it could handle OGG/Vorbis and FLAC files, but the documentation doesn't say anything about what sort of video it can handle.

I don't use Microsoft Windows at the moment, so I made my own GNU/Linux script that uses mencoder from the command line. Would it be useful to you or others if I posted it here?

--Ben
Tue Feb 17, 2009 10:01 am View user's profile Send private message
ben



Joined: 17 Feb 2009
Posts: 4

Post sylvanize shell script Reply with quote
Actually, you know what, my script for transcoding video under GNU/Linux is short enough that I'll just post it and people can use it or ignore it at their leisure.

First create a file called ~/.mplayer/mencoder.conf with these lines in it:

Code:

# Ben has a Sylvania SMPK2242 video music player. 
# It can play FLV, XviD, and WMA but must be at 320x240 or less.
#
# Experimenting with bitrate shows that 384k gives a nearly perfect
# image when transcoding HD quality (Thunderheist's 'Jerk It').
# http://www.vimeo.com/1124192
#
# Although the player doesn't seem able to handle 24fps video without
# dropping frames, setting output frames per second (ofps) seems to
# only make things worse.  (Again, see the Thunderheist test video).

# Example usage (two steps):
#
# mencoder -profile sylvaniapass1 chicken.mp4 -o /dev/null
# mencoder -profile sylvaniapass2 chicken.mp4 -o chicken-qvga.avi

[sylvaniapass1]
profile-desc="Sylvania SMPK2242 MP4 player, AKA D-Wave AK1025"
ovc=xvid=yes
xvidencopts=pass=1:turbo=yes
oac=pcm=yes
vf=scale
xy=320
zoom=yes

[sylvaniapass2]
profile-desc="Sylvania SMPK2242 MP4 player, AKA D-Wave AK1025"
ovc=xvid=yes
xvidencopts=pass=2:bitrate=384
oac=mp3lame=yes
vf=scale
xy=320
zoom=yes

# MIT's RealVideo lectures have 8000Hz mono audio which lame chokes on.  This fixes it.
#af=resample=24000
#srate=24000



Then you can run mencoder from the command line (see example in the comments), or you can use my handy sylvanize shell script which runs both passes and can be used to convert many files at once using wildcards.

Code:

#!/bin/bash

# Given a video file, convert it to a format that is playable on
# Ben's Sylvania MP4 music video player.

# Usage:  sylvanize chicken.mp4
#
# Note that multiple files can be specified and files that are not
# videos or that have already been converted will be skipped. 
# So, 'sylvanize *' will always do the right thing.

# Author: Ben
# Date: Feb 6, 2009
# License: Public domain

for file; do

    # Don't double convert a file.
    case "$file" in
   *-qvga*) continue
       ;;
    esac

    f="${file%.*}"
    output="$f-qvga.avi"

    # Don't convert a file if we've already done it.
    if [ -e "$output" ]; then continue; fi

    echo "Converting $file to $output, pass 1 of 1"
    mencoder -profile sylvaniapass1 "$file" -o /dev/null || continue
    echo "Converting $file to $output, pass 1 of 1"
    mencoder -profile sylvaniapass2 "$file" -o "$output" || rm "$output" && continue

    rm -f divx2pass.log
done


--Ben
Tue Feb 17, 2009 10:39 am View user's profile Send private message
zaphod
Site Admin


Joined: 28 Jan 2008
Posts: 75

Post Thanks! Reply with quote
I appreciate the kudos on my research/presets. And I ESPECIALLY appreciate your time in adapting them to be useful to Linux users. People like you make the work worthwhile.

About frame dropping...

When encoding to AVI/XviD do not use b-frames! This will cause 1/2 or more of your frames to be dropped! After setting bframes to 0, my playback speed reached full 30 or 25 fps framerates.

I suspect sometimes when there is alot of flashing there to be dropped frames, and have noticed also along of triangular shaped hash in some of that flashing...

...But otherwise for normal video, smooth as silk.

About quality...

Yes, I may have been shooting low at 256kbps Audio, and 256kbps Video, but "good enough" is good enough. The player doesn't have much memory to play around in, so, I guess personal tastes dictated lower rates. My source files are still on my HDDs in much higher quality. Now my question is, along with b-frame problems, could setting your video rate too high (384 kbps) possibly be causing some data movement/MMU blitting problems in the player itself, causing dropped frames?

About flv...

I had no idea it could play out of the flv wrapper. That is news to me! Probably will still convert the YouTube videos I download to .avi first though (yes, I know, double conversion loss, but you can forget that somewhat when rescaling to a lower resolution). I just normally don't trust closed standards. (Although I wish this player accepted the totally open mp4 wrapping, rather than the somewhat open Audio/Video Interleave)

Thanks again,
Zap Smile
Tue Feb 17, 2009 3:11 pm View user's profile Send private message
ben



Joined: 17 Feb 2009
Posts: 4

Post Re: Thanks! Reply with quote
zaphod wrote:

About frame dropping...

When encoding to AVI/XviD do not use b-frames! This will cause 1/2 or more of your frames to be dropped! After setting bframes to 0, my playback speed reached full 30 or 25 fps framerates.


Oh! Thanks for the tip. I'll have to read up on B-frames and get back to you.

--Ben
Tue Feb 17, 2009 3:47 pm View user's profile Send private message
zaphod
Site Admin


Joined: 28 Jan 2008
Posts: 75

Post Theory on why b-frames causes dropped frames. Reply with quote
As far as I know, B-frames stand for "between frames", a kind of pseudo i-frame that uses data before, and after itself to do the job of an i-frame but in the meantime consuming less bandwidth. The trade-off? b-frames are very CPU intensive!

It is my theory that this is the reason for the dropped frames. I would suggest no encapsulation other than the avi wrapper.

Zap:)
Tue Feb 17, 2009 7:49 pm View user's profile Send private message
ben



Joined: 17 Feb 2009
Posts: 4

Post Re: Thanks! Reply with quote
Hey Zaphod and all other SMPK2242 users,

Sorry I took so long to get back to you. You see, I traded in my Sylvania Music/Video Player. I still think it was a darn nifty, little device, especially for the price. It worked pretty well but it had a few flaws, and I thought I'd post them here so that other people can see them before they buy it:

* Poorly planned, inconsistent UI (user interface) -- volume down to go back in menu!?
* UI doesn't show correct time and titles for concatenated/streaming oggs.
* Can't sort files; always shows dirs in directory order! (however, see my sortdir script below)
* Video drops frames

I assume that the Sylvania software comes with some Windows program for changing the order in which files are played. Since I use GNU/Linux, I was rather surprised to see that the SMPK2422 does *not* actually play files in alphanumeric order. It plays files in the raw order in which the FAT (DOS) directory added the files. That means that it'll play the first file you copied into the directory, and then the next, and so on. I've written a shell script that will sort a DOS directory into alphanumeric order by simply recopying each file. Here it is,

Code:
#!/bin/sh
# The Sylvania MP4 player is peculiar.
# It can't sort directories, even alphabetically,
# so it shows files in directory order.
#
# This script makes the directory order equal the alphabetic order.
mkdir foo
mv * foo
mv foo/* .
rmdir foo


In case you're curious, I've replaced my Sylvania video player with an even better device, which, unfortunately, cost quite a bit more. I got a Neo Freerunner from OpenMoko.org. Some wacky open source guys decided to make an open source phone. It doesn't just run GNU/Linux, like the G1 does. All the phone software and even the hardware blueprints are public under the GNU General Public License. It's a hackers dream for tinkering and extending. OpenMoko has tossed so much nifty stuff into it, that it's basically a tiny PC that also happens to make phone calls. Of course, it works great for playing music and video files, so I don't really miss the Sylvania SMPK2242. I think the only feature the Sylvania had over the OpenMoko was its size.

--Ben

P.S. Zaphod, I think you'll appreciate that when the FreeRunner boots up, the first thing you see, in big friendly letters, is "DON'T PANIC!"
Tue Jun 02, 2009 4:41 am View user's profile Send private message
zaphod
Site Admin


Joined: 28 Jan 2008
Posts: 75

Post Reply with quote
Sorry I don't check this forum as often as I should, http://www.spambotsecurity.com is eating my life, but that looks like one cool gadget.

Also, if yer looking for something to game on, with the same features, minus phone, may I suggest the GP2X. It is another Open Source Linux based project.

Zap Smile
Wed Jul 08, 2009 7:41 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Zaphod's Deepest Thought Forum Index » General Discussion All times are GMT - 7 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Vjacheslav Trushkin / Easy Tutorials (Photoshop Tutorials).