Play video file with broken AVI index on iOS using MobileVLCKit
Posted: 05 Mar 2015 23:19
Hello guys, I'm working on a video streaming app for iOS, and I faced up with a problem - the app should be able to play partially downloaded videos. I can't stream video directly from a server because there is no server, videos are downloaded using P2P network. Download starts from the beginning of the file and after about 20% I want to be able to play the file.
Currently I'm trying to use MobileVLCKit. When I try to play a partially downloaded file (about 30%) using VLC player on my Mac, VLC tells me: "Broken or missing AVI Index" and offers to "Play as is" or "Build index and than play", when I choose "Play as is" video starts playing, but on iOS when I try to play the same video I get BAD_ACCESS when MobileVLCKit invoke AVI_IndexCreate. Is there a way to force MobileVLCKit to play video "as is" with a broken index, or maybe there are some other options how I can to this? Thanks a lot.
Here are console output and backtrace:
Currently I'm trying to use MobileVLCKit. When I try to play a partially downloaded file (about 30%) using VLC player on my Mac, VLC tells me: "Broken or missing AVI Index" and offers to "Play as is" or "Build index and than play", when I choose "Play as is" video starts playing, but on iOS when I try to play the same video I get BAD_ACCESS when MobileVLCKit invoke AVI_IndexCreate. Is there a way to force MobileVLCKit to play video "as is" with a broken index, or maybe there are some other options how I can to this? Thanks a lot.
Here are console output and backtrace:
Code: Select all
[1389:617849] creating player instance using shared library
[1759f504] core generic error: option marq-color does not exist
[1759f504] core generic error: option marq-opacity does not exist
[1759f504] core generic error: option marq-position does not exist
[1759f504] core generic error: option marq-refresh does not exist
[1759f504] core generic error: option marq-size does not exist
[1759f504] core generic error: option marq-timeout does not exist
[1759f504] core generic error: option marq-x does not exist
[1759f504] core generic error: option marq-y does not exist
[176f8264] avi demux error: no key frame set for track 0
[176f8264] avi demux error: no key frame set for track 1
Code: Select all
(lldb) bt
* thread #8: tid = 0x976f9, 0x20000000, stop reason = EXC_BAD_ACCESS (code=1, address=0x20000000)
frame #0: 0x20000000
* frame #1: 0x00675d72 testApp'Open [inlined] AVI_IndexCreate + 542 at avi.c:2407
frame #2: 0x00675b54 testApp'Open(p_this=<unavailable>) + 5228 at avi.c:631
frame #3: 0x0065111e testApp'vlc_module_load [inlined] module_load(obj=<unavailable>, init=<unavailable>, args=0x04d29d94, args=0x04d29d94, args=<unavailable>) + 814 at modules.c:185
frame #4: 0x00651100 testApp'vlc_module_load(obj=0x155f7654, capability=0x008fdd2e, name=<unavailable>, strict=false, probe=<unavailable>) + 784 at modules.c:277
frame #5: 0x0065129a testApp'module_need(obj=<unavailable>, cap=<unavailable>, name=<unavailable>, strict=<unavailable>) + 30 at modules.c:366
frame #6: 0x0062ae9a testApp'demux_New + 734
frame #7: 0x00634a4c testApp'InputSourceInit + 2624
frame #8: 0x00631e74 testApp'Init + 580
frame #9: 0x00633c7a testApp'Run + 18
frame #10: 0x35542e92 libsystem_pthread.dylib'_pthread_body + 138
frame #11: 0x35542e06 libsystem_pthread.dylib'_pthread_start + 118