bytedeco/javacv

How to add Thumbnail into mp4 file created with FFmpegFrameRecorder?

Open

#2,008 建立於 2023年4月5日

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

倉庫指標

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

描述

The mp4 files created with FFmpegFrameRecorder has no thumbnails. I tried many libraries to create thumbnail and add into file but couldn't manage due to not supported codec error. The initializing code :

        Loader.load(ffmpeg.class);
        recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);
        recorder.setFormat("mp4");
        recorder.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4);
        recorder.setSampleRate(sampleAudioRateInHz);
        recorder.setFrameRate(frameRate);

What should be the solution for Android environment?

貢獻者指南