bytedeco/javacv

Could not grab frame from http mp4 url InputStream

Open

#714 建立於 2017年6月7日

在 GitHub 查看
 (12 留言) (0 反應) (0 負責人)Java (1,583 fork)batch import
bughelp wanted

倉庫指標

Star
 (6,985 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Code:

url = new URL("http://dev.exiv2.org/attachments/372/3D_L0064.MP4");
//
              urlConnection = (HttpURLConnection) url.openConnection();
              InputStream inputStream = urlConnection.getInputStream();

              FFmpegFrameGrabber grabber= new FFmpegFrameGrabber(inputStream);
              grabber.setFormat("mp4");
              grabber.start();
              grabber.setFrameNumber(100000);

              Frame frame = grabber.grab();

              frameBitmap = new AndroidFrameConverter().convert(frame);

              grabber.stop();

Error:

/data/app/com.citrusbits.javacvapp-2/lib/arm/libjniavdevice.so: unused DT entry: type 0xf arg 0x47e3
06-07 17:39:39.987 5473-5527/com.citrusbits.javacvapp V/RenderScript: 0xb3704000 Launching thread(s), CPUs 4
06-07 17:39:40.003 5473-5526/com.citrusbits.javacvapp W/System.err: org.bytedeco.javacv.FrameGrabber$Exception: Error on InputStream.close(): 
06-07 17:39:40.004 5473-5526/com.citrusbits.javacvapp W/System.err:     at org.bytedeco.javacv.FFmpegFrameGrabber.releaseUnsafe(FFmpegFrameGrabber.java:206)
06-07 17:39:40.004 5473-5526/com.citrusbits.javacvapp W/System.err:     at org.bytedeco.javacv.FFmpegFrameGrabber.release(FFmpegFrameGrabber.java:133)
06-07 17:39:40.004 5473-5526/com.citrusbits.javacvapp W/System.err:     at com.citrusbits.javacvapp.MainActivity$SavingThread.run(MainActivity.java:97)
06-07 17:39:40.004 5473-5526/com.citrusbits.javacvapp W/System.err: Caused by: java.io.IOException: Mark has been invalidated.
06-07 17:39:40.004 5473-5526/com.citrusbits.javacvapp W/System.err:     at java.io.BufferedInputStream.reset(BufferedInputStream.java:336)
06-07 17:39:40.004 5473-5526/com.citrusbits.javacvapp W/System.err:     at org.bytedeco.javacv.FFmpegFrameGrabber.releaseUnsafe(FFmpegFrameGrabber.java:203)

貢獻者指南