zakgof / velvet-video

Java library for encoding / decoding / muxing / demuxing video and audio in various formats
Other
48 stars 9 forks source link

Support BufferedImage formats other than TYPE_3BYTE_BGR #23

Open zakgof opened 4 years ago

zakgof commented 4 years ago

Partially fixed by converting other formats into TYPE_3BYTE_BGR using Graphics2d (slow)

craterlake commented 3 years ago

@zakgof just downloaded this repo and ran the test to capture screenshots to mp4. Very nice, appreciate your work.

I have a couple of questions regarding the AVC/h.264 encoder:

  1. Is there support for YUV420 format as raw picture frame?
  2. Is there support for hardware encoder? FFMPEG has following AVC encoders: h264_qsv, h264_nvenc, h264_amf (Intel, nVidia, AMD respectively).
  3. Instead of getting the output as stream, is there a way to get raw h264 data of each encoded frame?

Thanks in advance.

zakgof commented 3 years ago

Answers:

  1. Not at the moment; internally YUV420 can be used for the encoder input, but you can't just supply YUV420 frames to the encoder
  2. You can supply your own build of FFMPEG libs to make sure all the needed features are in
  3. Yes, use "h264" as a container, the output will be raw h264 data