1. Download our Official Android App: Forums for Android!

Apps VideoViewer problems playing

Discussion in 'Android Development' started by FritzC, Sep 25, 2011.

  1. FritzC

    FritzC Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    2
    Joined:
    Sep 25, 2011

    Sep 25, 2011
    2
    0
    25
    My VideoViewer will not play any MKV files. I've tested on 3gp and they work fine but MKV won't work. The video never shows up, no buffering or anything.

    The output is:
    Code (Text):
    1. 09-25 07:54:40.767: INFO/ActivityManager(68): Starting: Intent { cmp=com.anime/.VideoPlayer } from pid 336
    2. 09-25 07:54:41.227: DEBUG/MediaPlayer(336): Couldn't open file on client side, trying server side
    3. 09-25 07:54:41.237: INFO/StagefrightPlayer(34): setDataSource('http://pbgl.net/Android/Naruto%20Shippuden/Hun_subtitle_sample1.mkv')
    4. 09-25 07:54:41.237: INFO/NuHTTPDataSource(34): connect to pbgl.net:80/Android/Naruto%20Shippuden/Hun_subtitle_sample1.mkv @0
    5. 09-25 07:54:41.767: INFO/ActivityManager(68): Displayed com.anime/.VideoPlayer: +968ms
    6. 09-25 07:54:43.017: INFO/NuCachedSource2(34): new range: offset= 821676
    7. 09-25 07:54:43.017: INFO/NuHTTPDataSource(34): connect to pbgl.net:80/Android/Naruto%20Shippuden/Hun_subtitle_sample1.mkv @821676
    8. 09-25 07:54:43.954: INFO/NuCachedSource2(34): new range: offset= 959025
    9. 09-25 07:54:43.954: INFO/NuHTTPDataSource(34): connect to pbgl.net:80/Android/Naruto%20Shippuden/Hun_subtitle_sample1.mkv @959025
    10. 09-25 07:54:45.564: INFO/NuCachedSource2(34): new range: offset= 1173410
    11. 09-25 07:54:45.564: INFO/NuHTTPDataSource(34): connect to pbgl.net:80/Android/Naruto%20Shippuden/Hun_subtitle_sample1.mkv @1173410
    12. 09-25 07:54:46.126: INFO/NuCachedSource2(34): ERROR_END_OF_STREAM
    13. 09-25 07:54:46.266: INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    14. 09-25 07:54:46.266: INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic:2.3.3/GRI34/101070:eng/test-keys'
    15. 09-25 07:54:46.266: INFO/DEBUG(31): pid: 34, tid: 345  >>> /system/bin/mediaserver <<<
    16. 09-25 07:54:46.266: INFO/DEBUG(31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000024
    17. 09-25 07:54:46.266: INFO/DEBUG(31):  r0 00000000  r1 00000008  r2 00000003  r3 000151c0
    18. 09-25 07:54:46.266: INFO/DEBUG(31):  r4 0000fac0  r5 00014fb0  r6 00000000  r7 a30638bc
    19. 09-25 07:54:46.266: INFO/DEBUG(31):  r8 a2f60ab1  r9 0000f444  10 00100000  fp 00000001
    20. 09-25 07:54:46.266: INFO/DEBUG(31):  ip afc01100  sp 40606d58  lr a2ff0fd3  pc a2ff2b78  cpsr 40000030
    21. 09-25 07:54:46.426: INFO/DEBUG(31):          #00  pc 000f2b78  /system/lib/libstagefright.so
    22. 09-25 07:54:46.426: INFO/DEBUG(31):          #01  pc 000f0fce  /system/lib/libstagefright.so
    23. 09-25 07:54:46.426: INFO/DEBUG(31):          #02  pc 000f140e  /system/lib/libstagefright.so
    24. 09-25 07:54:46.436: INFO/DEBUG(31):          #03  pc 00054624  /system/lib/libstagefright.so
    25. 09-25 07:54:46.436: INFO/DEBUG(31):          #04  pc 00046290  /system/lib/libstagefright.so
    26. 09-25 07:54:46.436: INFO/DEBUG(31):          #05  pc 00047f08  /system/lib/libstagefright.so
    27. 09-25 07:54:46.436: INFO/DEBUG(31):          #06  pc 00044ea8  /system/lib/libstagefright.so
    28. 09-25 07:54:46.436: INFO/DEBUG(31):          #07  pc 00060a7e  /system/lib/libstagefright.so
    29. 09-25 07:54:46.436: INFO/DEBUG(31):          #08  pc 00060acc  /system/lib/libstagefright.so
    30. 09-25 07:54:46.436: INFO/DEBUG(31):          #09  pc 00011a7c  /system/lib/libc.so
    31. 09-25 07:54:46.446: INFO/DEBUG(31):          #10  pc 00011640  /system/lib/libc.so
    32. 09-25 07:54:46.446: INFO/DEBUG(31): code around pc:
    33. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff2b58 685cd104 d101428c e0031c18 42933318
    34. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff2b68 2000d1f4 46c0bd70 47706a00 47706b00
    35. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff2b78 47706a40 600b6ac3 47706a80 47702001
    36. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff2b88 47702000 47702000 47702000 47702000
    37. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff2b98 6d591c03 47706d00 6dd91c03 47706d80
    38. 09-25 07:54:46.446: INFO/DEBUG(31): code around lr:
    39. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff0fb0 fd4cf001 1c2b4f76 447f3308 90079306
    40. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff0fc0 e0cb2300 98079904 fe26f001 f0011c06
    41. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff0fd0 a909fdd3 1c309003 fdd0f001 201c9005
    42. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff0fe0 ebb0f74d f7631c04 9408ff6f d0032c00
    43. 09-25 07:54:46.446: INFO/DEBUG(31): a2ff0ff0 a9081c20 eba0f74d f0011c30 2801fd97
    44. 09-25 07:54:46.446: INFO/DEBUG(31): stack:
    45. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d18  000154c8  [heap]
    46. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d1c  afc009cf  /system/lib/libstdc++.so
    47. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d20  000154c8  [heap]
    48. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d24  a8114ba7  /system/lib/libutils.so
    49. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d28  0000fac0  [heap]
    50. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d2c  000154c8  [heap]
    51. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d30  a3060eb0  /system/lib/libstagefright.so
    52. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d34  a8114ca9  /system/lib/libutils.so
    53. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d38  00000002  
    54. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d3c  40606d78  
    55. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d40  00014fb0  [heap]
    56. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d44  000154f0  [heap]
    57. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d48  a30638bc  /system/lib/libstagefright.so
    58. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d4c  a2f42a4d  /system/lib/libstagefright.so
    59. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d50  df002777  
    60. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d54  e3a070ad  
    61. 09-25 07:54:46.446: INFO/DEBUG(31): #01 40606d58  00000004  
    62. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d5c  00000000  
    63. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d60  00000004  
    64. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d64  000152b0  [heap]
    65. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d68  00000002  
    66. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d6c  00000000  
    67. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d70  00014fb8  [heap]
    68. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d74  00015198  [heap]
    69. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d78  0000fac0  [heap]
    70. 09-25 07:54:46.446: INFO/DEBUG(31):     40606d7c  00000000  
    71. 09-25 07:54:46.457: INFO/DEBUG(31):     40606d80  000152f0  [heap]
    72. 09-25 07:54:46.457: INFO/DEBUG(31):     40606d84  40606da0  
    73. 09-25 07:54:46.457: INFO/DEBUG(31):     40606d88  00014fb0  [heap]
    74. 09-25 07:54:46.457: INFO/DEBUG(31):     40606d8c  00000000  
    75. 09-25 07:54:46.457: INFO/DEBUG(31):     40606d90  40606e74  
    76. 09-25 07:54:46.457: INFO/DEBUG(31):     40606d94  a2ff1413  /system/lib/libstagefright.so
    77. 09-25 07:54:47.646: WARN/MediaMetadataRetriever(260): MediaMetadataRetriever server died!
    78. 09-25 07:54:47.646: WARN/AudioSystem(124): AudioFlinger server died!
    79. 09-25 07:54:47.646: WARN/AudioSystem(124): AudioPolicyService server died!
    80. 09-25 07:54:47.646: WARN/AudioSystem(336): AudioFlinger server died!
    81. 09-25 07:54:47.646: WARN/IMediaDeathNotifier(336): media server died
    82. 09-25 07:54:47.646: ERROR/MediaPlayer(336): error (100, 0)
    83. 09-25 07:54:47.646: ERROR/MediaPlayer(336): Error (100,0)
    84. 09-25 07:54:47.646: DEBUG/VideoView(336): Error: 100,0
    85. 09-25 07:54:47.666: WARN/AudioSystem(68): AudioFlinger server died!
    86. 09-25 07:54:47.666: WARN/AudioSystem(68): AudioPolicyService server died!
    87. 09-25 07:54:47.666: INFO/ServiceManager(28): service 'media.audio_flinger' died
    88. 09-25 07:54:47.666: INFO/ServiceManager(28): service 'media.audio_policy' died
    89. 09-25 07:54:47.666: INFO/ServiceManager(28): service 'media.player' died
    90. 09-25 07:54:47.666: INFO/ServiceManager(28): service 'media.camera' died
    91. 09-25 07:54:47.666: INFO/BootReceiver(68): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
    92. 09-25 07:54:49.166: ERROR/AudioService(68): Media server died.
    93. 09-25 07:54:49.166: INFO/ServiceManager(68): Waiting for service media.audio_flinger...
    94. 09-25 07:54:49.977: INFO/(348): ServiceManager: 0xad50
    95. 09-25 07:54:49.977: DEBUG/AudioHardwareInterface(348): setMode(NORMAL)
    96. 09-25 07:54:49.977: INFO/CameraService(348): CameraService started (pid=348)
    97. 09-25 07:54:49.977: INFO/AudioFlinger(348): AudioFlinger's thread 0xc658 ready to run
    98. 09-25 07:54:50.198: ERROR/AudioService(68): Media server started.
    99. 09-25 07:54:50.207: DEBUG/AudioHardwareInterface(348): setMode(NORMAL)
    100.  

    My code: (Not the main activity)
    Code (Text):
    1. package com.anime;
    2.  
    3. import java.io.IOException;
    4. import java.net.URI;
    5. import java.net.URL;
    6. import java.util.ArrayList;
    7.  
    8. import android.app.*;
    9. import android.media.MediaPlayer;
    10. import android.net.Uri;
    11. import android.os.*;
    12. import android.text.*;
    13. import android.view.View;
    14. import android.view.View.OnClickListener;
    15. import android.widget.*;
    16. import android.widget.AdapterView.OnItemClickListener;
    17.  
    18. public class VideoPlayer extends Activity implements OnClickListener {
    19.     /** Called when the activity is first created. */
    20.  
    21.     VideoView vv;
    22.     Button close;
    23.     public static String selectedVideo = "";
    24.  
    25.     @Override
    26.     public void onCreate(Bundle savedInstanceState) {
    27.         super.onCreate(savedInstanceState);
    28.         setContentView(R.layout.vidplayer);
    29.         close = (Button) findViewById(R.id.button1);
    30.         vv = (VideoView) findViewById(R.id.videoView1);
    31.         playVideo(selectedVideo);
    32.         View btn1 = findViewById(R.id.button1);
    33.         btn1.setOnClickListener(this);
    34.     }
    35.    
    36.     public void playVideo(String selected) {
    37.         setContentView(R.layout.vidplayer);
    38.         String url = RunApp.videoUrls.get(RunApp.currentShow).get(RunApp.videos.get(RunApp.currentShow).indexOf(selected)).toString(); // your URL here
    39.         vv = (VideoView) findViewById(R.id.videoView1);
    40.         try {
    41.             vv.setVideoURI(Uri.parse(url));//"http://pbgl.net/Android/Soul%20Eater/sample.3gp");
    42.             vv.setMediaController(new MediaController(this));
    43.             vv.requestFocus();
    44.             vv.start();
    45.         } catch (IllegalArgumentException e) {
    46.             e.printStackTrace();
    47.         } catch (IllegalStateException e) {
    48.             e.printStackTrace();
    49.         } catch (Exception e) {
    50.             e.printStackTrace();
    51.         }
    52.     }
    53.  
    54.     @Override
    55.     public void onClick(View v) {
    56.         System.out.println("ID: " + v.getId());
    57.           switch (v.getId()){
    58.           case R.id.button1:
    59.               finish();
    60.               break;
    61.           }
    62.        
    63.     }
    64. }
     

    Advertisement

Share This Page

Loading...