Nexus 4 Compatibility

Ask questions about the Android SDK here

Nexus 4 Compatibility

Postby jhuson » Mon Dec 03, 2012 3:03 pm

The github states the Android SDK is compatible with Nexus 4. I'm using a Nexus 7 and Nexus 4. The Nexus 7 connects to the Session, and the Publisher starts streaming. On Nexus 4 I receive this error and crash:

12-03 16:58:00.531: E/AndroidRuntime(5264): FATAL EXCEPTION: main
12-03 16:58:00.531: E/AndroidRuntime(5264): java.lang.RuntimeException: no encoder available for video/avc
12-03 16:58:00.531: E/AndroidRuntime(5264): at com.opentok.media.avc.AndroidAvcEncoder.<init>(AndroidAvcEncoder.java:43)

Same code is running on both devices.

Thanks, Jamie
Was this post helpful? (0)
jhuson
 
Posts: 15
Joined: Mon Dec 03, 2012 2:56 pm
Thumbs Up: 0

Re: Nexus 4 Compatibility

Postby charley » Mon Dec 03, 2012 3:10 pm

Curses! Our 4 hasn't shown up yet. Can you extract your media_codecs.xml from the device (/system/etc/media_codecs.xml) and gist/pastebin it for me?
Was this post helpful? (1)
charley
 
Posts: 363
Joined: Fri May 06, 2011 7:41 pm
Thumbs Up: 28

Re: Nexus 4 Compatibility

Postby jhuson » Mon Dec 03, 2012 3:20 pm

charley wrote:Curses! Our 4 hasn't shown up yet. Can you extract your media_codecs.xml from the device (/system/etc/media_codecs.xml) and gist/pastebin it for me?


http://pastebin.com/5Q05HWRE :D
Was this post helpful? (0)
jhuson
 
Posts: 15
Joined: Mon Dec 03, 2012 2:56 pm
Thumbs Up: 0

Re: Nexus 4 Compatibility

Postby charley » Mon Dec 03, 2012 3:48 pm

Well there's definitely an avc encoder there; this looks like my fault. I created a test branch (and sample app, re: your other thread) that you should have better luck with, please let me know if this works better for you:
https://github.com/opentok/opentok-andr ... /nexus-fix
https://github.com/opentok/Android-Hell ... /nexus-fix
Was this post helpful? (1)
charley
 
Posts: 363
Joined: Fri May 06, 2011 7:41 pm
Thumbs Up: 28

Re: Nexus 4 Compatibility

Postby jhuson » Tue Dec 04, 2012 9:35 am

charley wrote:Well there's definitely an avc encoder there; this looks like my fault. I created a test branch (and sample app, re: your other thread) that you should have better luck with, please let me know if this works better for you:
https://github.com/opentok/opentok-andr ... /nexus-fix
https://github.com/opentok/Android-Hell ... /nexus-fix


Using the provided projects I was able to get a video chat going between the Nexus 7 and the Nexus 4. I had to modify the project because it was set to only use the Publisher stream for both SurfaceViews. Also, I was unable to get the video from the Nexus 4 to show on the Nexus 7, but the video from the Nexus 7 did show on the Nexus 4. I'm unsure why this occurred.
Was this post helpful? (0)
jhuson
 
Posts: 15
Joined: Mon Dec 03, 2012 2:56 pm
Thumbs Up: 0

Re: Nexus 4 Compatibility

Postby charley » Tue Dec 04, 2012 10:14 am

Did the 7 at least seem to be receiving the stream created notification for the peer? You can also load up a javascript application to view streams (our tutorials are useful here: http://tokbox.com/opentok/api/tools/js/ ... s/overview), this will help us isolate the misbehaving component (eg. publisher vs. subscriber)
Was this post helpful? (0)
charley
 
Posts: 363
Joined: Fri May 06, 2011 7:41 pm
Thumbs Up: 28

Re: Nexus 4 Compatibility

Postby jhuson » Tue Dec 04, 2012 2:18 pm

charley wrote:Did the 7 at least seem to be receiving the stream created notification for the peer? You can also load up a javascript application to view streams (our tutorials are useful here: http://tokbox.com/opentok/api/tools/js/ ... s/overview), this will help us isolate the misbehaving component (eg. publisher vs. subscriber)


On Nexus 7 the callback for Subscriber.Listener.onSubscriberDidConnect(Stream stream) is never called for the Nexus 4 subscriber stream. On Nexus 4 I get the callback when the Nexus 7 Subscriber streams connects and begins to play. I noticed the Nexus 4 is throwing a lot of System.err level LogCat messages. I can post a full PasteBin if needed but here is something I thought might be relevant:

12-04 16:14:12.505: I/OMXClient(20893): Using client-side OMX mux.
12-04 16:14:12.535: I/ACodec(20893): setupVideoEncoder succeeded
12-04 16:14:12.735: W/opentok-avc-enc(20893): input size mismatch expected 118784 got 115200
12-04 16:14:12.735: E/ACodec(20893): [OMX.qcom.video.encoder.avc] ERROR(0x80001009)
12-04 16:14:12.745: E/MediaCodec(20893): Codec reported an error. (omx error 0x80001009, internalError -2147483648)
12-04 16:14:12.745: W/System.err(20893): java.lang.IllegalStateException
12-04 16:14:12.745: W/System.err(20893): at android.media.MediaCodec.dequeueOutputBuffer(Native Method)
12-04 16:14:12.745: W/System.err(20893): at com.opentok.media.avc.AndroidAvcEncoder.offerEncoder(AndroidAvcEncoder.java:165)
12-04 16:14:12.745: W/System.err(20893): at com.opentok.media.avc.AndroidAvcEncoder.offerEncoder(AndroidAvcEncoder.java:1)

Seems like the Nexus 4 stream isnt outputting correctly which explains why the its not coming through on the other end. Let me know if there's additional testing I can perform to help.
Was this post helpful? (0)
jhuson
 
Posts: 15
Joined: Mon Dec 03, 2012 2:56 pm
Thumbs Up: 0

Re: Nexus 4 Compatibility

Postby charley » Tue Dec 04, 2012 2:36 pm

I've seen that bug before, and it can get pretty nasty. There tend to be a lot of device-specific issues with the MediaCodec and Camera APIs. I pushed a potential fix to the nexus-fix branch, give it a whirl and let me know if it breaks differently (or the same, even! :-D )
Was this post helpful? (0)
charley
 
Posts: 363
Joined: Fri May 06, 2011 7:41 pm
Thumbs Up: 28

Re: Nexus 4 Compatibility

Postby jhuson » Wed Dec 05, 2012 8:06 am

charley wrote:I've seen that bug before, and it can get pretty nasty. There tend to be a lot of device-specific issues with the MediaCodec and Camera APIs. I pushed a potential fix to the nexus-fix branch, give it a whirl and let me know if it breaks differently (or the same, even! :-D )


The image is coming through now, but it's incorrect. I attached a screenshot taken from my Nexus 7 showing the Subscriber stream coming from Nexus 4. I'm not seeing anything in LogCat.

Screenshot_2012-12-05-10-00-56.png
Nexus 4 incorrect video output
Was this post helpful? (0)
jhuson
 
Posts: 15
Joined: Mon Dec 03, 2012 2:56 pm
Thumbs Up: 0

Re: Nexus 4 Compatibility

Postby charley » Wed Dec 05, 2012 10:30 am

Delightful! That's a pixel format mismatch. I've pushed a build to nexus-fix that will dump some configuration info that I will need to make a proper patch. Run this build and send me the logcat, I only need it up to the point where the publisher starts streaming.
Was this post helpful? (0)
charley
 
Posts: 363
Joined: Fri May 06, 2011 7:41 pm
Thumbs Up: 28

Next

Return to Android



Who is online

Users browsing this forum: No registered users and 1 guest

cron