maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N800 (https://talk.maemo.org/forumdisplay.php?f=25)
-   -   Here is a working VLC Media Player!! (https://talk.maemo.org/showthread.php?t=14126)

lokidor 2008-05-21 20:33

Re: Here is a working VLC Media Player!!
 
Looking at the VLC code, it seems that the "Failed to wait (VIDIOC_DQBUF)" error is returned by vlc when the VIDIOC_DQBUF function of the v4l2 driver returns the error code EIO.

And looking at the maemo bug list, I found a patch from Sakari Ailus dealing with this error :
https://bugs.maemo.org/attachment.cgi?id=661

"vidioc_dqbuf returned -EIO in a number of cases which is probably a bit confusing for many programs. This patch changes behaviour so that the next intact frame is always returned (i.e. never -EIO anymore)."

I don't think this patch is applied to the current kernel because I don't see it in the source code, but I think it could do the trick.

Lokidor

qole 2008-05-22 17:33

Re: Here is a working VLC Media Player!!
 
Any ideas why "size" is being ignored?

As for the buffer errors: I've seen similar buffer errors with other camera-related programs, especially mplayer. I would say that all of the programs that use the camera (even gstreamer) struggle with the "missing frames" problem. I would love to see a patched kernel (I guess fanoush is the go-to guy for that), but I hope that a maemo version of VLC has some kind of workaround, since most people won't have a custom kernel.

qole 2008-05-22 23:34

Re: Here is a working VLC Media Player!!
 
I have a fairly acceptable stream from VLC now. I replaced "size" with "width" and "height" and I used 160x120 for the dimensions.

Code:

vlc -Idummy v4l2://dev/video0:chroma=RV16:width=160:height=120 :sout="#transcode{vcodec=WMV2,fps=10,vb=196}:duplicate{dst=std{access=http,mux=asf,dst=:7070}}"
I have to use mplayer (mplayer http://localhost:7070) if I want to see the video on the tablet, since I can't seem to get VLC to actually display video. :( :o

One bit of good news: we don't have to worry too much about hildonizing VLC. Just run the following:

Code:

vlc -I http
and then point your browser at http://localhost:8080 :D

lokidor 2008-05-23 17:53

Re: Here is a working VLC Media Player!!
 
Hey qole,

Reading your command line I think you are missing a slash, you should do this :
Code:

vlc -Idummy v4l2:///dev/video0:chroma=RV16:width=160:height=120 :sout="#transcode{vcodec=WMV2,fps=10,vb=196}:duplicate{dst=std{access=http,mux=asf,dst=:7070}}"
That will have no impact on the video but that will prevent the following error to come :
Code:

[00000369] v4l2 demux error: cannot open video device (No such file or directory)
You will still have the ALSA/OSS errors.

Lokidor

lokidor 2008-05-24 19:37

Re: Here is a working VLC Media Player!!
 
Hey sampppa,

Can't reply your last private message, I think your inbox or outbox is full.

To do the mv commands you need to be outside scratchbox and run the commands as root.

Be sure to be in the folder you run "scratchbox/login" and you should be able to complete commands like:
Code:

mv scratchbox/tools/bin/m4.bak scratchbox/tools/bin/m4

qwerty12 2008-05-24 19:44

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qole (Post 184715)
Any ideas why "size" is being ignored?

As for the buffer errors: I've seen similar buffer errors with other camera-related programs, especially mplayer. I would say that all of the programs that use the camera (even gstreamer) struggle with the "missing frames" problem. I would love to see a patched kernel (I guess fanoush is the go-to guy for that), but I hope that a maemo version of VLC has some kind of workaround, since most people won't have a custom kernel.

Well, if you want, I could compile the stock nokia kernel with that patch applied?

lokidor 2008-05-24 20:01

Re: Here is a working VLC Media Player!!
 
Yes I think that would be very useful to test this patch.

Thank you qwerty12

qwerty12 2008-05-24 20:12

Re: Here is a working VLC Media Player!!
 
Sure, I'm away from computer now but I'll do it 1st thing in the morning if someone doesn't beat me overnight :)

qwerty12 2008-05-25 08:15

Re: Here is a working VLC Media Player!!
 
What did I tell you ;) :)

This is the stock kernel with the patch applied:
http://www.mediafire.com/?mabwyzytjuo

lokidor 2008-05-25 13:06

Re: Here is a working VLC Media Player!!
 
Thanks qwerty12

I tested your stock kernel, as expected the patch solve the VIDIOC_DQBUF error.

Lokidor

qole 2008-05-26 18:34

Re: Here is a working VLC Media Player!!
 
I've been meaning to get around to putting a new kernel on my tablet for a while, but I would like one with all the bells and whistles; is there any way to get that patch integrated into the "fancy" kernel with rotation support, etc?

qwerty12 2008-05-26 18:47

Re: Here is a working VLC Media Player!!
 
I've got an experimental one if you want to try it...

(kernelpanic's b_idle usb fix, fanoush's stuff, rotation, full sd speed, the v4l patch, ipv6, luks, lardman's fb dsp fix thing, case copy symbol for unionfs & pH5's unfinished powervr driver (don't get excited, it only powers up the chip, not let you use it)

qole 2008-05-27 00:14

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qwerty12 (Post 185995)
I've got an experimental one if you want to try it...

(kernelpanic's b_idle usb fix, fanoush's stuff, rotation, full sd speed, the v4l patch, ipv6, luks, lardman's fb dsp fix thing, case copy symbol for unionfs & pH5's unfinished powervr driver (don't get excited, it only powers up the chip, not let you use it)

Wow, that's way more than I even knew existed. The word "unfinished" worries me, since I don't want to sacrifice stability...

Do you have a page like fanoush? Or do you have to upload it to one of those file hosting places?

qwerty12 2008-05-27 01:28

Re: Here is a working VLC Media Player!!
 
Well, I can take out the powervr driver. I don't think it does much atm :/
So far, I haven't noticed any problems but I class it as experimental to cover my *** :p.


I have to upload to a free hoster.

sondjata 2008-05-27 14:13

Re: Here is a working VLC Media Player!!
 
Well this is all well and good but the link doesn't work.

qwerty12 2008-05-27 15:08

Re: Here is a working VLC Media Player!!
 
Try actually reading the thread. 10 seconds later and I've found a link.

I'll be a prick and not give the link.

sondjata 2008-05-27 17:54

Re: Here is a working VLC Media Player!!
 
Well a prick you are then. Since there are two links on the first page that go to a 404 page, I'll just add this app. to the list of apps I wont' be installing. My loss I'm sure.:rolleyes:

qole 2008-05-27 18:10

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by sondjata (Post 186267)
Well a prick you are then. Since there are two links on the first page that go to a 404 page, I'll just add this app. to the list of apps I wont' be installing. My loss I'm sure.:rolleyes:

Um, we're talking about lokidor's version, found in a post on page 7.

http://manupap1.free.fr/maemo/chinook/

Seriously though, I gave links to that post a couple of pages back.

qwerty12 2008-05-27 18:11

Re: Here is a working VLC Media Player!!
 
The reason I'm being a prick is because I found a link on the page before this in 10 seconds.

qole 2008-05-27 18:12

Re: Here is a working VLC Media Player!!
 
qwerty12, could you please post your "experimental" kernel for me?

I can see it being useful to others, too, so maybe start a new thread.

If you have already started that thread, please point me to it.

BoxOfSnoo 2008-05-27 18:39

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qwerty12 (Post 185995)
I've got an experimental one if you want to try it...

(kernelpanic's b_idle usb fix, fanoush's stuff, rotation, full sd speed, the v4l patch, ipv6, luks, lardman's fb dsp fix thing, case copy symbol for unionfs & pH5's unfinished powervr driver (don't get excited, it only powers up the chip, not let you use it)

Whoa. I missed most of this stuff. Is there more info somewhere especially about "Full SD Speed"?

qole 2008-05-27 18:49

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by BoxOfSnoo (Post 186285)
Whoa. I missed most of this stuff. Is there more info somewhere especially about "Full SD Speed"?

Yeah, I know what you mean. This qwerty12 kid talks offhandedly about these things like we all should know about them. ;) I read the forums almost daily and I had the same response.

qwerty12 2008-05-27 18:55

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qole (Post 186279)
qwerty12, could you please post your "experimental" kernel for me?

I can see it being useful to others, too, so maybe start a new thread.

If you have already started that thread, please point me to it.

http://www.sendspace.com/file/iq9paf

I don't want to start a new thread because it's only bits I've found and compiled them together.

@BoxOfSnoo

There is a higher unsupported speed mode. Some cards dont agree with it though. If you have fanoush's kernel, it's already enabled.

I'm gonna recompile this tommorow to remove the powervr driver and make it a module and post up all the kernel modules that were compiled with this kernel.

qole 2008-05-27 19:44

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qwerty12 (Post 186290)
I don't want to start a new thread because it's only bits I've found and compiled them together.

But that's just it. It can get really hard to find stuff when they're scattered all over the forums in separate threads. It would be nice for you to post your kernel to a new thread and people can post to that thread with stuff like, "wouldn't it be cool to have feature X in that kernel, too?"

Quote:

Originally Posted by qwerty12 (Post 186290)
I'm gonna recompile this tommorow to remove the powervr driver and make it a module and post up all the kernel modules that were compiled with this kernel.

Ok, I'll wait for your tomorrow-version, instead of flashing this one and then flashing the new one tomorrow :)

qwerty12 2008-05-28 08:40

Re: Here is a working VLC Media Player!!
 
Ok, heres the new one :)

PowerVR driver now turned into a module.

http://www.mediafire.com/?mamtgvjmpmr

Modules (powervr and unionfs module in there :/):
http://www.mediafire.com/?fmpddjibjry

(sorry for hijacking this thread btw)

joepagiii 2008-05-28 10:02

Re: Here is a working VLC Media Player!!
 
i gotta say the work here is impressive....not ready for the masses YET.......i have fait that you guys will get it...

qole 2008-05-28 17:22

Re: Here is a working VLC Media Player!!
 
querty12, if your kernel gets the camera on the N800 working, you are contributing hugely. Off to try flashing this beast.

qwerty12 2008-05-28 17:25

Re: Here is a working VLC Media Player!!
 
It's just patches I found on the maemo sites :)

I also forgot to add that I enabled v4l1 iirc but I'm not sure it will do anything great

qole 2008-05-28 17:28

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qwerty12 (Post 186642)
I also forgot to add that I enabled v4l1 iirc but I'm not sure it will do anything great

You mentioned that. It's one of the two important camera-related things that I'm excited about.

<dreaming>If only someone could figure out a way to get the mic working as a standard piece of ALSA hardware.</dreaming>

qwerty12 2008-05-28 17:33

Re: Here is a working VLC Media Player!!
 
I didn't mention that ;). I said v4l patch which is wrong term to use as I mean the patch lokidor linked to. I said nothing about v4l1.

lokidor 2008-05-28 19:11

Re: Here is a working VLC Media Player!!
 
Maybe I'm wrong but for the microphone I tried the osso-dsp-plugin-alsa package after reading this http://hg-mirror.alsa-project.org/al...c/README-maemo

As mentionned :

"ALSA native applications can run over DSP Gateway and use DSP PCM task nodes"

I tried this :

cvlc
Code:

v4l2:///dev/video0:chroma="UYVY":width=320:height=240:adev=default
But vlc crash with a dbus error when opening audio device :

Code:

[00000645] v4l2 demux debug: added new video es UYVY 320x240
[00000644] main input debug: selecting program id=0
[00000645] v4l2 demux debug: opening 'default' as audio
process 1742: Applications must not close shared connections - see dbus_connection_close() docs. This is a bug in the application.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted

I don't know if it's a vlc or an alsa issue but to be sure that this plugin works I built and tried the aplay/arecord commands and I can heard my voice with :

Code:

arecord -Ddefault --format=S16_LE foo.wav
aplay -Ddefault foo.wav

But I noted that sometimes the arecord command fails also with a dbus error.

Maybe some dbus guru could help.

Lokidor

qole 2008-05-28 23:56

Re: Here is a working VLC Media Player!!
 
Here's an interesting update to the audio problem. I read this in another thread:

Quote:

Originally Posted by tz1 (Post 186624)
Actually there is an ALSA device (libaudio to be more specific) mapped as arecord (and aplay) will work, but it seems that nothing else can use the DSP, and you have to ask it nicely (a DSP supported format, rate, etc.) which gstreamer does...

So I tried to get VLC to ask more "nicely":

Code:

cvlc v4l2:///dev/video0:chroma="UYVY":width=320:height=240:adev=default:audio-method=2:samplerate=8000
There are absolutely no errors (even using -vvv), VLC runs fine, it thinks it's got audio coming in, I can wave at myself on the screen... but no audio comes out. When I try streaming and then use mplayer http://localhost:7070 in another terminal, mplayer says there's no audio being streamed.

By the way, I've installed the full VLC package. It's annoying not having video out.

EDIT: I wonder if we need to ask even more nicely. How do we get VLC to use the S16_LE audio format?

lokidor 2008-05-29 07:50

Re: Here is a working VLC Media Player!!
 
I will check the audio format in the vlc code

Lokidor

tigerszheng 2008-05-29 10:28

Re: Here is a working VLC Media Player!!
 
hi,there:

Now, can't download the file from "http://www.filecrunch.com/file/~euhmyn".

Could you upload it again?

Thx

qwerty12 2008-05-29 10:30

Re: Here is a working VLC Media Player!!
 
Read down from #95.

qole 2008-05-29 16:41

Re: Here is a working VLC Media Player!!
 
So, qwerty12, I've tried out your kernel. I've had lots of fun with the rotation, and it seems to me that my tablet boots a bit faster with the high speed SD, but I could be imagining it.

The "EIO not returned in VIDIOC_DQBUF" patch certainly stops the errors, but I'm not sure it is a good solution. A/V sync in Videocamera (look in the Garage) and with a standard GStreamer pipeline is pretty dismal; I think it has actually gotten worse with this patch. I don't know what a better solution would be here, though... I'll keep playing around; I still think there's hope.

As for the V4L1 patch: how do I use it? There's no v4l1 device created (usually /dev/video) and /dev/video0 is not recognized as a v4l device by VLC 0.8.6...

Sigh. Thanks for the kernel anyway!

qwerty12 2008-05-29 16:50

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qole (Post 186925)
So, qwerty12, I've tried out your kernel. I've had lots of fun with the rotation, and it seems to me that my tablet boots a bit faster with the high speed SD, but I could be imagining it.

The "EIO not returned in VIDIOC_DQBUF" patch certainly stops the errors, but I'm not sure it is a good solution. A/V sync in Videocamera (look in the Garage) and with a standard GStreamer pipeline is pretty dismal; I think it has actually gotten worse with this patch. I don't know what a better solution would be here, though... I'll keep playing around; I still think there's hope.

As for the V4L1 patch: how do I use it? There's no v4l1 device created (usually /dev/video) and /dev/video0 is not recognized as a v4l device by VLC 0.8.6...

Sigh. Thanks for the kernel anyway!


Hmm, thanks for the report, I'll have to boot into a kernel with that patch removed and see if it's slower too :/

No idea, sorry, V4l1 is enabled, I think it's up to the driver which V4l it reports itself as.

BTW: If you do end up flashing another kernel to remove the "EIO not returned in VIDIOC_DQBUF" patch, I recommend flashing fanoush's rotation kernel. That has the fixed rotation and the SD high speed without any extreme stuff like my kernel.

qole 2008-05-29 17:02

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qwerty12 (Post 186929)
BTW: If you do end up flashing another kernel to remove the "EIO not returned in VIDIOC_DQBUF" patch, I recommend flashing fanoush's rotation kernel. That has the fixed rotation and the SD high speed without any extreme stuff like my kernel.

Just a question; if I do an on-tablet flash of my kernel from a SD partition cloned system, does that flash the kernel on all the partitions, or just the partition that was running at the time of the flash?

qwerty12 2008-05-29 17:06

Re: Here is a working VLC Media Player!!
 
I'm 95% sure it's on all the partitions (kernel has fixed partition on /dev/mtd2 iirc) , you can verify next time you boot into the flash by running uname -a.

My kernels say BST, fanoush's say CEST and Nokia ones say EEST.

lokidor 2008-05-29 21:23

Re: Here is a working VLC Media Player!!
 
Quote:

Originally Posted by qole (Post 186749)
EDIT: I wonder if we need to ask even more nicely. How do we get VLC to use the S16_LE audio format?

The S16_LE audio format is hard coded in vlc so no problem with it

But looking at the code I found that the audio-method command is broken in vlc-git, if you want to use it you have to omit the "=" character... :confused:.

With this bug vlc doesn't even try to load the alsa stuff and that's why you don't have the dbus error.

However after some code modifications I made a little step forward.

With my test version I have no longer the dbus error but still no sound (error in the alsa dsp plugin at the start of transcoding)... :(

I'll do other tests this weekend.

lokidor


All times are GMT. The time now is 03:12.

vBulletin® Version 3.8.8