android - Extract a specific portion of video using MediaExtractor -


i trying use portion of pre-recorded video file processing on android. working mediacodec library on android. using mediaextractor extract data video file. idea extract required gata stream processing. code looks like:

    extractor = new mediaextractor();      file file = new file(minputfile);      fileinputstream inputstream = new fileinputstream(file);      long len = file.length();     long start = 200l;     extractor.setdatasource(inputstream.getfd(),start,len);     inputstream.close();  

logcat is:

java.io.ioexception: failed instantiate extractor. @ android.media.mediaextractor.setdatasource(native method).

it works if set starting bytes 0. doing wrong ? can not extract portion of videos using mediaextractor ?


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -