OESF Portables Forum

Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => C1000/3x00 General discussions => Topic started by: xamindar on September 13, 2010, 02:50:24 pm

Title: Video Playback On Your Cxx00
Post by: xamindar on September 13, 2010, 02:50:24 pm
Well seeing the dvd catalyst post inspired me to post my video experience with my c3100. Here is my way of doing it which makes stable, smooth, clear enough movies just about every time.
I use handbrake which is free so no need to spend any money at all. Handbrake is best ripping from DVDs. I also use a mencoder script ro convert anything else that handbrake doesn't like. I attached my handbrake profile below which includes my zaurus encoding info.
This encodes with settings:
mpeg4
640x480 resolution
600kbps (2-pass) video
96kbps audio (faac)
default video framerate (doesn't change it)

packages needed to get this playing smoothly:
kino2_0.4.3c_arm.ipk or QuasarMediaPlayer_0.96_r193_r31-2010-03-28.ipk for a player
mplayer-bvdd-iwmmxt_1.1.5-1_arm.ipk which has hardware acceleration with bvdd
bvdd_0.4.0-1_arm.ipk for the kernel module
libffmpeg_0.4.6_20030304_arm.ipk for the video codec (I think, been a while)
You also need a kernel that allows overclocking the cpu. Tetsus or eviljazz should work. I am using eviljazz's.
qtopia-combbatteryapplet_1.0.6_arm.ipk to overclock from an applet easily

The best results I have had is to overclock to the (520/260/130 Mhz) setting. Anything higher and it is more choppy and can lock up and anything lower and the framerate drops.
Load up kino2 or quasar. I find quasar better for playback control but they both work fine either way.
Quasar: In the quasar configuration have all the boxes checked under "MPlayer" section, my cache is set to 512 KiB. Also add "-noslices -noaspect" to the addtional options. Noslices really speeds up framrate and makes it play smooth. You can set frame drop to normal or hard. Mine is set to hard right now but occasionally you will come across a video that will crash mplayer on hard, in that case just set it back to normal.
Kino2: In kino2 preferences on the general tab check "enable cache" and set it to 512, and add "-noslices" to the "options for mplayer" section. On the Video tab, only check "Drop frames", "Enable Doublebuffering", Disable aspect ratio correction", and "Enable audio autosync". And on the audio tab do not check "Resample audio", it will slow it down a little. Other options are up to you. Another nice thing about kino2 is that it can overclock automaticly for you when you play a video so you don't have to do it manually.

Now encode your video with handbrake, copy it to your Z, and play it with kino2 OR quasar. Remember to overclock or it wont play smooth. Surprising that overclocking makes such a big difference but it does. You might be able to increase the video bitrate a little. I got some videos to play smoothly on up to 1000kbps settings but not all. (I think I will try re-encoding Avatar to a higher than 600kbps setting as that movie looks more blocky than others). The bandwith of the SD slot seems just over 1mb/s and the CF slot is just a little higher than that so it limits the bitrate of the videos quite a bit. CF slot is probably better to use but all my movies play smooth from the SD slot at 600kbps.

White screen problem: With using the bvdd driver for video playback comes another issue. I found that after 5 minutes of playback my screen would go all white all of a sudden in a manner that looks like the zaurus locked up or crashed. I then had to hit cancel a bunch of times and turn off and on my Z until I got the screen back. At first I thought it was a bug in the driver or the overclocking was overheating the Z but that's not the case. It turns out when the screensaver kicks in it causes this. At least it is a simple and easy fix; disable the screensaver. Edit /home/zaurus/settings/qpe.conf and set to "Interval_AC_Screensaver = 0" to disable the screensaver on AC and "Interval = 0" to disable screensaver on battery. Problem solved.

Good luck! I still haven't found a phone/pda that can do what the Z still does today!
Title: Video Playback On Your Cxx00
Post by: jakfish on September 14, 2010, 08:50:47 am
What a great post--detailed, and its step-by-step process was incredibly helpful.

I'd had trouble playing movies on Kino2, but your specs paved the way, and many thanks.

Using your guideline, I was able to make a 640x480 movie, but as you point out, over-clocking seems necessary for smooth play.  In full screen, there was some blockiness.  I noticed that even  at full screen, I'm getting a black band over top and bottom.  Is that what you get, or am I using a DVD with full-screen-only capability (as opposed to wide screen)?  Is your Z screen literally full?

Jake
Title: Video Playback On Your Cxx00
Post by: koan on September 14, 2010, 09:58:46 am
There is an easier way to disable the screensaver via the shell. See https://www.oesf.org/index.php?title=Sharp_...a_QCop_Messages (https://www.oesf.org/index.php?title=Sharp_Qtopia_QCop_Messages) and https://www.oesf.org/index.php?title=SendingQCop (https://www.oesf.org/index.php?title=SendingQCop)

On my SL-C750 the signal format is slightly different, this seems to work:

Code: [Select]
$ qcop QPE/System 'setScreenSaverOnOff(int)' 0
Title: Video Playback On Your Cxx00
Post by: xamindar on September 14, 2010, 08:53:21 pm
Quote from: jakfish
I noticed that even  at full screen, I'm getting a black band over top and bottom.  Is that what you get, or am I using a DVD with full-screen-only capability (as opposed to wide screen)?  Is your Z screen literally full?

Jake
The encoder is set to keep aspect ratio so for most DVD movies there will be black bands on top and bottom. Most movies I have found to scale to something like 640x360. I'd rather have black bands than stretched or croped images. It should depend on the original video. If it can be scaled to 640x480 and keep aspect it should fill your screen. I have a few music videos that do fill the entire screen.

Thanks for the suggestion koan. In my case I want the screensaver to always be disabled, even on reboots. I don't even see the point of having a screensaver on an LCD, let alone a pda.
Title: Video Playback On Your Cxx00
Post by: jakfish on September 14, 2010, 09:15:22 pm
Yes, that's what I was thinking.

DVD Catalyst 3 will decode DVD before converting, and my version of Handbrake (.9.3) will not decrypt.  How does your Handbrake version work?

Is installing the kernel that overclocks difficult?  I've only had my C1000 for a week and don't yet know my way around it.

Jake
Title: Video Playback On Your Cxx00
Post by: xamindar on September 14, 2010, 09:54:04 pm
Quote from: jakfish
Yes, that's what I was thinking.

DVD Catalyst 3 will decode DVD before converting, and my version of Handbrake (.9.3) will not decrypt.  How does your Handbrake version work?
Handbrake doesn't come with decoding libraries for legal reasons but it will use them if they are on your system. In linux just make sure libdvdcss is installed. Not sure about windows as I don't use it but maybe installing vlc will get it working.
Quote
Is installing the kernel that overclocks difficult?  I've only had my C1000 for a week and don't yet know my way around it.

Jake
The kernel I am using is here I believe: http://katastrophos.net/zaurus/kernels/v55/ (http://katastrophos.net/zaurus/kernels/v55/)
Just follow the instructions. It's not that dificult. Just put the zImage and updater.sh file on a flash card and reboot while holding OK.
Title: Video Playback On Your Cxx00
Post by: jakfish on September 15, 2010, 07:27:27 am
Thanks for that kernel link.  The process seems very doable; I have one of those MIPS 7" Linux netbooks and they flash kernels and OSs pretty much the same way.

A final thing about the kernel: I'm using Trisoft's C1000 ROM and in my amateur opinion, I think it runs well--so I'd love to have a link to its kernel or a way to back up the present kernel in case of something untoward.  At Trisoft http://www.trisoft.de/en_c1000howto.htm (http://www.trisoft.de/en_c1000howto.htm) they have the whole NAND backup, a SYSTC100.DBK file.  Would the kernel be there?  Or is there another place where I can get the kernel only, without having to reflash everything along with restoring a backup.

My Trisoft specs are:

Qtopia 1.5.4
2.4.20 Kernel
1.01 JP ROM version

Many thanks for your assistance; you've been very helpful,
Jake
Title: Video Playback On Your Cxx00
Post by: xamindar on September 15, 2010, 12:09:57 pm
Sorry I do not know where to get a c1000 rom. I looked around on trisofts site but it doesn't look like they have it. A full rom would include the updater.sh, zImage, and another file with the OS on it.

What you can do though, is make a NAND backup instead. That will make a snapshot of your entire flash including kernel and OS. I would make two or three to be safe. Then you can always restore the nand to go back to the exact state you left it as. Also, that NAND file you have from trisoft should work the same as restoring everything from factory. The only difference between that and the updater method is that the NAND will erase everything when you restore it, a fresh slate from the factory. Whereas the updater method (if you have the OS file with it) will restore the kernel and OS but leave your home directory intact.
Title: Video Playback On Your Cxx00
Post by: jakfish on September 15, 2010, 05:50:43 pm
Again, I'm very grateful for your help.  I was able to make a NAND backup (I had a hard time getting the D and M keys to work and get me to the maintenance menu and felt lucky to get there when I did).  Then I went ahead and did the kernel install from  your provided link.  All is well so far.

In light of the apparent battery savings under clocking could provide, I was wondering if you had any anecdotal evidence.  I realize this has nothing to do with video, and I see that the lowest under clocking makes the screen flicker, but I'm curious to hear if word processing and other low-key things within underclocking have a longer battery life.

Excuse the strange typing; I'm piecing this out on my wife's birthday Ipad, which has a bigger screen than my C1000 but not as nice keyboard.

Jake
Title: Video Playback On Your Cxx00
Post by: xamindar on September 15, 2010, 06:34:10 pm
No worries about the help, there are not many zaurus users around anymore. By the way, why did you decide to get one so late?

Yeah D and M is pretty annoying. You have to remove ALL power including the battery. Then hold those two buttons down while plugging in the power cable. That works for me. Just hold down the buttons while plugging in the AC and a couple of seconds later the screen comes on into the mainanence menu. Don't need to press the power button or anything.

I haven't tested battery length with underclocking. My zaurus batteries are pretty much shot at this point anyway. Also, underclocking creates noticable gui slowdowns so opening programs and switching screens gets annoying. The only time I underclock is when listening to music. That and with the zaurus LCD off seems to last a pretty long time with music playback.

Some of the overclocking settings make the screen flicker as well - some of the settings are changing the LCD clock speed. I don't really notice it while watching movies though.

Offtopic in case you haven't found this yet. https://www.oesf.org/forum/index.php?showtopic=27186 (https://www.oesf.org/forum/index.php?showtopic=27186)
That is a new SD driver that allows up to 32GB cards to be used. The stock sharp module only works with up to 1GB cards.
Title: Video Playback On Your Cxx00
Post by: jakfish on September 15, 2010, 09:05:32 pm
Yes, that's what I ended up doing: groping for the keys while plugging it in and not even worrying about the battery.  Too, I was a little freaked by the "backup...ok" ending.  There's no official sign-off, and I didn't find any instruction about rebooting, so I just unplugged the a/c.

I bought a 2000MaH battery for 15USD shipped from ebay/Hong Kong.  I imagine it's shown up but for complicated reasons, I can't get to my mail until the end of the month.  The price was right, though, if the thing did ship.

Thanks for the SD driver tip.  I did find that post last week after a frantic search when nothing but a 1GB card would work.  Since then, I've gone as high as 16B w/o complaint.

The transition to the C1000 has been pretty smooth, thanks to folks like yourself.  The one nagging thing is the lack of an ftp client that can do PASV file transfers.  GFTP can do this, but I'm sticking with Sharp ROM.  Explorer's ftp client, OpieFTP, tkcftp, etc. for Qtopia all seem to be hardcoded to active transfer, so XP's files on its built-in ftp server don't show up on the Z.  Uploading from the Z is okay, though.  The family computer is XP Pro, for better or for worse.

I got to the Z so late because my handhelds had been either CE or Psion (though my first PDA was a Zaurus 3500x, Synergy OS, lots of fun).  Linux is a long jump for CE users.  That, and the Zs were so expensive for a while.

Another one of my devices is the cheapo Chinese Linux netbook:

www.littlelinuxlaptop.com

The 7" netbook's default OS is atrocious, but the machine is flashable, and a wag named Wicknix developed 3mx Ultra, a Debian Etch lite, and it's been very entertaining.  Even runs Firefox's Bon Echo.  They kick around on ebay for $50-$100 should you be looking for a new toy.

Jake
Title: Video Playback On Your Cxx00
Post by: xamindar on September 15, 2010, 10:18:30 pm
Quote from: jakfish
I bought a 2000MaH battery for 15USD shipped from ebay/Hong Kong.  I imagine it's shown up but for complicated reasons, I can't get to my mail until the end of the month.  The price was right, though, if the thing did ship.
Let me know how that battery turns out. I have seen it as well and there is also a website that sells them for $10 but probably a little more with shipping. I asked the ebay seller when these batteries were actually manufactured (because lithium-ion degrade even when not used). I did not receive a response so I took that to mean a bad thing and didn't bother buying any.

Probably better than my current situation though. My current battery (official Sharp 5600 battery) seems to last an hour or so, less if I watch a movie or connect to wireless. With the original C3100 battery my Zaurus will complain that the battery is dead and put its self to sleep as soon as I try to connect to a wireless access point.
Title: Video Playback On Your Cxx00
Post by: koan on September 16, 2010, 04:01:22 am
Quote from: jakfish
The one nagging thing is the lack of an ftp client that can do PASV file transfers.  GFTP can do this, but I'm sticking with Sharp ROM.

Can you do this using cURL ?

The cURL feature list (http://curl.haxx.se/docs/features.html) says
Quote
- active/passive using PORT, EPRT, PASV or EPSV

It doesn't have a GUI but it may be enough for you.

ipks for curl are here (http://www.lyndonhill.com/Projects/zaurus-libraries.html).
Title: Video Playback On Your Cxx00
Post by: jakfish on September 16, 2010, 08:52:31 am
I'll keep you posted on that battery as soon as I can wrestle it from the post office.

koan, many thanks for the curl tip.  I've played with it, and it does actually list the files in XP's directory.  Given its PASV setting (which is its default, apparently), at least I know for certain why the other Qtopia clients weren't listing.

The lack of GUI for serious file transfers is rough.  Until now, for downloads, I've been using Opera 7.55 which plays nice with ftp sites (Netfront 3.1 does not).  For uploads, Explorer's ftp client, and I just blindly sending files to the blank directory.  The upload works but you can't prove it.  I'll see if I can adapt to curl.

At any rate, I already need curl for Zocalo 1.9

Jake
Title: Video Playback On Your Cxx00
Post by: agosine on September 17, 2010, 11:52:18 am
Hi xamindar, can you post your mencoder script?  I have lots of tv shows recorded with MythTV that I would like to convert and take with me on my Zaurus.
Title: Video Playback On Your Cxx00
Post by: deluxe on September 17, 2010, 06:16:40 pm
Quote from: xamindar
Quote from: jakfish
I bought a 2000MaH battery for 15USD shipped from ebay/Hong Kong.  I imagine it's shown up but for complicated reasons, I can't get to my mail until the end of the month.  The price was right, though, if the thing did ship.
Let me know how that battery turns out. I have seen it as well and there is also a website that sells them for $10 but probably a little more with shipping. I asked the ebay seller when these batteries were actually manufactured (because lithium-ion degrade even when not used). I did not receive a response so I took that to mean a bad thing and didn't bother buying any.

Probably better than my current situation though. My current battery (official Sharp 5600 battery) seems to last an hour or so, less if I watch a movie or connect to wireless. With the original C3100 battery my Zaurus will complain that the battery is dead and put its self to sleep as soon as I try to connect to a wireless access point.

I have bought several of those batteries over the years, still have 2 that I have never actually used. They work perfectly fine, seemingly identical in capacity to the original Sharp battery............and SO much cheaper. Last time I bought one was about a month ago, got it from an ebay auction BIN for $12 shipped.
Title: Video Playback On Your Cxx00
Post by: jakfish on September 28, 2010, 08:26:06 am
@ xamindar

I was able to finally get the battery out of the post office, and it appears to be a good one.  I get about 4 hours with wifi card on all the time.  Not bad, considering their physical size.  I just ordered another one, and I'm hoping for the same luck.

Jake
Title: Video Playback On Your Cxx00
Post by: agosine on September 28, 2010, 03:05:07 pm
Has anyone used SUPER (http://www.erightsoft.com/SUPER.html) to encode videos?  What file type and encoding formats work with the Zaurus?
Title: Video Playback On Your Cxx00
Post by: xamindar on October 17, 2010, 04:41:14 am
Quote from: agosine
Hi xamindar, can you post your mencoder script?  I have lots of tv shows recorded with MythTV that I would like to convert and take with me on my Zaurus.
So sorry I didn't reply to this. I read it then forgot about it. Here you go. It uses mencoder which is usually part of mplayer. Just make sure you have mencoder installed and you should be good.

One thing about it though. When I use it to encode HD content (very high resolution video) the framerate of the resulting video is a little strange. It drops frames on encode for some reason. Maybe there is a filter I can add or something but I haven't gotten around to it. Most resulting videos are great though.

just run the script like this:
zvidencoder.sh input output

It encodes with a width of 640 by default.