0

I am using Google Grafika examples to display video on TextureView. "Double decode" to be more specific . Code work most of the time but for some mp4 files it crash giving only :

libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 7998

Same code works for webM files and most mp4 files. Place where I expect it to fail is :

extractor = new MediaExtractor();
extractor.setDataSource(sourceFile);

in MoviePlayer [L:113]

Any hint how to walk around or what might be the problem?

fadden
  • 51,356
  • 5
  • 116
  • 166
wonglik
  • 1,043
  • 4
  • 18
  • 36
  • There's no native code in Grafika, so a native crash indicates a problem in the platform or with that specific device. You did tag both "libc" and "ffmpeg" though... are you using ffmpeg in your project? – fadden Oct 25 '15 at 15:59
  • libc tag is because error mention it. ffmpeg was auto suggested by SO. I am not using it in the project though. – wonglik Oct 26 '15 at 08:36
  • @wonglik I have the similar issue. I want to paly four same videos in different angles. It works for some videos but for some videos lags, and for some videos it just won't play. Did you get any solution for it? – SkyWalker Nov 08 '15 at 08:47
  • @SkyWalker : With MoviePlayer yes. But not simultaneously. If video lags check other formats. I had a lot of issues with webM for instance. MP4 worked fine , except some format crush the app. So if you control source of the videos play with encodings and formats and you might achieve desired result. – wonglik Nov 08 '15 at 10:01
  • @wonglik I want to play 4 videos simultaneously in different angles. I have issues with large resolution mostly .mp4 videos only. I have checked Double decode code from Google grafika but it's too complex for me to implement it. – SkyWalker Nov 08 '15 at 10:34
  • @SkyWalker Grafika Double Decode example is pretty self containing. Just copy few necessary classes and with just a few modification you can almost reuse their code entirely. – wonglik Nov 08 '15 at 15:13
  • @wonglik I tied that but I cannot find a way to play video from SD card in that code. – SkyWalker Nov 08 '15 at 15:18
  • @wonglik There are so many dependencies plus it required min sdk 18. Do you know any other way of achieving it? – SkyWalker Nov 09 '15 at 07:04
  • @wonglik I'm able to play video but it does not have sound. Do you know code to play sound ? – SkyWalker Nov 09 '15 at 08:46

1 Answers1

-1

This is an error related to OpenGL-ES Apps

try adding this to your manifest:

  <uses-feature android:glEsVersion="0x00020000" android:required="true" />
  • Open AndroidManifest.xml, add android:allowClearUserData="true" tag to the application node.

    <application android:allowClearUserData="true"
    ....
    >
    

    This might help you

Vishavjeet Singh
  • 1,385
  • 11
  • 13
  • unfortunately it did not help – wonglik Nov 06 '15 at 08:17
  • you can do one more thing download grafika sample app from github compile it and test it to see if the issue is in that sample or not. It not then you might be doing something wrong in your code. – Vishavjeet Singh Nov 06 '15 at 08:19
  • I basically did that. Just cherry picked some of the classes and compiled them into the project. It works for some videos for some it does not. I thin @fadden might be right. It might be device specific problem. – wonglik Nov 06 '15 at 09:40
  • yes the error is CPU specific.. try another device to see what happens then. – Vishavjeet Singh Nov 06 '15 at 12:08