0

I used ffmpeg to stream a video file into the virtual video device created with v4l2loopback.

ffmpeg -stream_loop -1 -re -i file.mp4 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0

This works but the app goes into ANR since most frames are not correctly rendered.

It seems like it has something to do with differing formats

But it's confusing that some video frames gets rendered correctly in the emulator while most are not.

Some warnings and errors.

cameraserver              W  createSurfaceFromGbp: Camera 0 with consumer usage flag: 2304: Forcing asynchronous mode forstream
cameraserver              W  createSurfaceFromGbp: Camera 0: Overriding format 0x4 to IMPLEMENTATION_DEFINED
Camera3-Device            E  configureStreams: Stream 1: DataSpace override not allowed for format 0x23
EmulatedCamera_QemuClient    E  queryFrame: Query failed: Unable to obtain video frame from the camera
Camera3-OutputStream         E  returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: Broken pipe (-32)
Camera3-OutputStream         E  getBufferLockedCommon: Stream 0: Can't dequeue next output buffer: Broken pipe (-32)
Amal
  • 328
  • 2
  • 8

0 Answers0