Making Youtube work on ICS

1,558 views
Skip to first unread message

StefanS

unread,
Feb 10, 2012, 12:05:37 PM2/10/12
to andro...@googlegroups.com
Dear group,

I had problems when I wanted to include the Google Youtube app in my build. It would crash for every video. The solution is to force libstagefright to use the "chrome" HTTP stack:
==== in frameworks/base:
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index 690deac..34e7a5a 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -102,7 +102,7 @@ ifneq ($(strip $(ARCH_ARM_HAVE_ARMV7A)),true)
 endif
 
 # See if the user has specified a stack they want to use
-HTTP_STACK = $(HTTP)
+HTTP_STACK = chrome
 # We default to the Chrome HTTP stack.
 DEFAULT_HTTP = chrome
 ALT_HTTP = android
====

This is a hack, but it seems to work. Changing the whole HTTP stack to chrome via HTTP:=chrome didn't work, because it needs the v8 Javascript engine, which (apparently) can only be built for ARM, not x86.

The reason can be found in the HTTPBase.cpp which has this fragment of code:
==== in frameworks/base/media/libstagefright/HTTPBase.cpp
sp<HTTPBase> HTTPBase::Create(uint32_t flags) {
#if CHROMIUM_AVAILABLE
        return new ChromiumHTTPDataSource(flags);
#endif
    {
        TRESPASS();

        return NULL;
    }
}
====
So it can never work without the libchromium HTTP stack.

Is this something that I can push to the repo, or could it break anything?

Stefan

leepaul

unread,
Feb 10, 2012, 2:28:23 PM2/10/12
to Android-x86
I'm going to sound like a newbie, but what does that mean in simple
terms? I would like to get YouTube working on my Dell Inspiron Duo for
a long time ...

StefanS

unread,
Feb 10, 2012, 2:32:06 PM2/10/12
to andro...@googlegroups.com
Simply put: it's nothing you can easily change as a user. Basically,
the builtin libraries as they are now don't work for video/audio
streaming and they need to be recompiled with different parameters to
make it work. But I hope the Inspiron Duo has an active developer who
can do that for you :)

Stefan

> --
> You received this message because you are subscribed to the Google Groups "Android-x86" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-x86...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.
>

Chih-Wei Huang

unread,
Feb 11, 2012, 1:23:07 PM2/11/12
to andro...@googlegroups.com

No. We didn't need the hack.

I've fixed the youtube issue.
Will push it when I have time to clean it up.

Swifty

unread,
Feb 13, 2012, 8:37:07 AM2/13/12
to Android-x86
Chih-Wei, is the solution you have found specifically for Youtube? -
Or will this allow a/v streaming for all applications on ICS?

I made a post a while back about bubbleupnp not working (couldn't be
streamed in the browser either) and you mentioned it was probably the
same issue that affected Youtube... would be great if you fix works
for this too.

Is it possible to swap-out some pre-built lib's to test? (I don't have
access to the full source used to make ICS work on my device)

Cheers!

On Feb 11, 6:23 pm, Chih-Wei Huang <cwhu...@android-x86.org> wrote:
> 2012-2-11 上午1:05 於 "StefanS" <andr...@stefanseidel.info> 寫道:
>
>
>
>
>
> > Dear group,
>
> > I had problems when I wanted to include the Google Youtube app in my build. It would crash for every video. The solution is to force libstagefright to use the "chrome" HTTP stack:
> > ==== in frameworks/base:
> > diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
> > index 690deac..34e7a5a 100644
> > --- a/media/libstagefright/Android.mk
> > +++ b/media/libstagefright/Android.mk
> > @@ -102,7 +102,7 @@ ifneq ($(strip $(ARCH_ARM_HAVE_ARMV7A)),true)
> > endif
>
> > # See if the user has specified a stack they want to use
> > -HTTP_STACK = $(HTTP)
> > +HTTP_STACK =chrome
> > # We default to theChromeHTTP stack.
> > DEFAULT_HTTP =chrome
> > ALT_HTTP = android
> > ====
>
> > This is a hack, but it seems to work. Changing the whole HTTP stack tochromevia HTTP:=chromedidn't work, because it needs the v8 Javascript engine, which (apparently) can only be built for ARM, not x86.
>
> > The reason can be found in the HTTPBase.cpp which has this fragment of code:
> > ==== in frameworks/base/media/libstagefright/HTTPBase.cpp
> > sp<HTTPBase> HTTPBase::Create(uint32_t flags) {
> > #if CHROMIUM_AVAILABLE
> > return new ChromiumHTTPDataSource(flags);
> > #endif
> > {
> > TRESPASS();
>
> > return NULL;
> > }
> > }
> > ====
> > So it can never work without the libchromium HTTP stack.
>
> > Is this something that I can push to the repo, or could it break anything?
>
> No. We didn't need the hack.
>
> I've fixed the youtube issue.
> Will push it when I have time to clean it up.- Hide quoted text -
>
> - Show quoted text -

Kay Rozen

unread,
Feb 21, 2012, 10:25:35 AM2/21/12
to andro...@googlegroups.com
Any news on that ? I would like to have youtube work, it's the only thing i need on my install

StefanS

unread,
Feb 21, 2012, 10:45:33 AM2/21/12
to andro...@googlegroups.com

What I wrote works, so why don't you do that?

Stefan

On Feb 21, 2012 4:25 PM, "Kay Rozen" <kay....@gmail.com> wrote:
Any news on that ? I would like to have youtube work, it's the only thing i need on my install

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-x86/-/b0_i8Q6U0tkJ.

Ooop Yooo

unread,
Feb 22, 2012, 9:20:32 PM2/22/12
to andro...@googlegroups.com
That doesn't work with every YouTube versions.

Got one "old" version working (even without your change), but forgot where I got it from...

As soon as I make an update from the Market, it doesn't work anymore.

Tried versions different from different sources, but none of them are working, except the one I have... ^^


2012/2/21 StefanS <and...@stefanseidel.info>

StefanS

unread,
Feb 23, 2012, 2:52:02 AM2/23/12
to andro...@googlegroups.com
Somewhere here in the group I posted which gapps I used and it works
with this Youtube.

Stefan

Ooop Yooo

unread,
Feb 23, 2012, 4:41:04 AM2/23/12
to andro...@googlegroups.com
Not sure if the one you posted works in the group works with every configurations or other specific settings than the change you published, but it didn't work with mine as this was the same  gapps pack I also found out on XDA, and was not working for me.

I don't say it may not work with other devices or with different settings. But again as I said, it was not working for me...

The one I use is working with 2 completely different laptop/Tablet PC, different settings as they have different hardwares.


2012/2/23 StefanS <and...@stefanseidel.info>

StefanS

unread,
Feb 23, 2012, 9:13:27 AM2/23/12
to andro...@googlegroups.com
Hi,

the version gapps-ICS which I use doesn't start up on its own, but it
plays videos when started from a link or from the home screen applet.
Someone suggested it's because libcarousel is missing, I'll look into
it.

Stefan

Chih-Wei Huang

unread,
Feb 23, 2012, 10:25:11 AM2/23/12
to andro...@googlegroups.com
That's because it uses renderscript.
Don't worry. That has been fixed as well.

2012/2/23 StefanS <and...@stefanseidel.info>:


> Hi,
> the version gapps-ICS which I use doesn't start up on its own, but it
> plays videos when started from a link or from the home screen applet.
> Someone suggested it's because libcarousel is missing, I'll look into
> it.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Ooop Yooo

unread,
Feb 23, 2012, 9:36:41 PM2/23/12
to Android-x86
Ohhh ok, I see.

The YouTube version I used was working on its own and I was not using
libcarousel.

Even though, could be worth to investigate on it.


On 23 fév, 15:13, StefanS <andr...@stefanseidel.info> wrote:
> Hi,
>
> the version gapps-ICS which I use doesn't start up on its own, but it
> plays videos when started from a link or from the home screen applet.
> Someone suggested it's because libcarousel is missing, I'll look into
> it.
>
> Stefan
>
>
>
>
>
>
>
> On Thu, Feb 23, 2012 at 10:41, Ooop Yooo <ooop4...@gmail.com> wrote:
> > Not sure if the one you posted works in the group works with every
> > configurations or other specific settings than the change you published, but
> > it didn't work with mine as this was the same  gapps pack I also found out
> > on XDA, and was not working for me.
>
> > I don't say it may not work with other devices or with different settings.
> > But again as I said, it was not working for me...
>
> > The one I use is working with 2 completely different laptop/Tablet PC,
> > different settings as they have different hardwares.
>
> > 2012/2/23 StefanS <andr...@stefanseidel.info>
>
> >> Somewhere here in the group I posted which gapps I used and it works
> >> with this Youtube.
>
> >> Stefan
>
> >> On Thu, Feb 23, 2012 at 03:20, Ooop Yooo <ooop4...@gmail.com> wrote:
> >> > That doesn't work with every YouTube versions.
>
> >> > Got one "old" version working (even without your change), but forgot
> >> > where I
> >> > got it from...
>
> >> > As soon as I make an update from the Market, it doesn't work anymore.
>
> >> > Tried versions different from different sources, but none of them are
> >> > working, except the one I have... ^^
>
> >> > 2012/2/21 StefanS <andr...@stefanseidel.info>
>
> >> >> What I wrote works, so why don't you do that?
>
> >> >> Stefan
>

StefanS

unread,
Feb 24, 2012, 4:26:04 PM2/24/12
to andro...@googlegroups.com
Yes, looks good. Youtube is now fully working for me. Thanks!

Stefan
P.S.: I saw that Live Wallpapers also use renderscript, and most are working fine, but some crash in libRS with SIGSEGV.

Chih-Wei Huang

unread,
Feb 25, 2012, 1:05:37 PM2/25/12
to andro...@googlegroups.com
2012/2/25 StefanS <and...@stefanseidel.info>:

> P.S.: I saw that Live Wallpapers also use renderscript, and most are working
> fine, but some crash in libRS with SIGSEGV.

Yes, no time to investigate it yet.

Ron M

unread,
Mar 10, 2012, 12:46:49 PM3/10/12
to andro...@googlegroups.com
Hi guys,

Is there any update w.r.t youtube status on ics-x86?
I understand from this thread that Chih-Wei has pushed some fixes to
the ics-x86 tree, however I am not able to play any youtube video when
going to www.youtube.com (I am not talking about the youtube App itself).

Is it known to not be working at the moment?
Do you know if there is any difference between support to youtube on
browser and support for youtube app?

Thanks,
Ron


On Sat, Feb 25, 2012 at 8:05 PM, Chih-Wei Huang <cwh...@android-x86.org> wrote:
> 2012/2/25 StefanS <and...@stefanseidel.info>:

>> P.S.: I saw that LAve Wallpapers also use renderscript, and most are working


>> fine, but some crash in libRS with SIGSEGV.
>
> Yes, no time to investigate it yet.
>
> --
> Chih-Wei
> Android-x86 project
> http://www.android-x86.org
>

Ron M

unread,
Mar 11, 2012, 11:24:42 AM3/11/12
to andro...@googlegroups.com
Just to give a more complete picture:
I am also able to use the youtube app, and it will not play HD/HQ .

I understand from other posts in this group that youtube app not
playing HD/HQ is a known issue, but can anyone tell the root cause
for it?

Thanks,
Ron

uragonako

unread,
Mar 18, 2012, 2:02:19 AM3/18/12
to Android-x86
I 'repo sync' last March 12., You tube doesn't work on my browswer
either.

it seems it's playing since the indicator on the player is moving..
but does not show any video...

:)

On Mar 11, 1:46 am, Ron M <ron...@gmail.com> wrote:
> Hi guys,
>
> Is there any update w.r.tyoutubestatus on ics-x86?
> I understand from this thread that Chih-Wei has pushed some fixes to
> the ics-x86 tree, however I am not able to play anyyoutubevideo when
> going towww.youtube.com (I am not talking about theyoutubeApp itself).
>
> Is it known to not be working at the moment?
> Do you know if there is any difference between support toyoutubeon
> browser and  support foryoutubeapp?
>
> Thanks,
> Ron
>
>
>
>
>
>
>
> On Sat, Feb 25, 2012 at 8:05 PM, Chih-Wei Huang <cwhu...@android-x86.org> wrote:
> > 2012/2/25 StefanS <andr...@stefanseidel.info>:

StefanS

unread,
Mar 18, 2012, 3:06:01 AM3/18/12
to andro...@googlegroups.com

It works if you switch HD  off and switch to fullscreen mode. We would be happy if anyone can provide a fix.

Stefan

Reply all
Reply to author
Forward
0 new messages