LiTr icon indicating copy to clipboard operation
LiTr copied to clipboard

4K video 60 frame video compression exception

Open gaoyouhuang opened this issue 3 years ago • 6 comments

Hi, thanks for this great library!

Device: HUAWEI MAte 30 Pro 5G

4K video recorded with this phone

21603840,60 frames----> 7201280,30 frames,72012805 bit rate, 5 keyframes is fail but 21603840,30 frames----> 7201280,30 frames,72012805 bit rate, 5 keyframes is success

VideoTrackTranscoder#resizeDecodedInputFrame() methos In the decoding process, this method decoder.dequeueOutputFrame is greater than 0 for a total of 8 times

The device is OK. It supports 4K decoding and encoding because I can use other libraries https://github.com/MasayukiSuda/Mp4Composer-android

But I still don't know what's wrong. I hope I can get your help. thank you

gaoyouhuang avatar Jan 12 '22 17:01 gaoyouhuang

Glad to hear you are enjoying LiTr! I will take a look at this. So is LiTr dropping frames and producing corrupt video? Or does transcoding fail and stop?

izzytwosheds avatar Jan 13 '22 01:01 izzytwosheds

Glad to hear you are enjoying LiTr! I will take a look at this. So is LiTr dropping frames and producing corrupt video? Or does transcoding fail and stop?

Yes, litr will compress successfully in the end, but the video is not complete

A 1-minute video during decoding decoder. Dequeueoutputframe > = 0 7 times Obviously, the video generated in this way is abnormal in the end

gaoyouhuang avatar Jan 13 '22 02:01 gaoyouhuang

Glad to hear you are enjoying LiTr! I will take a look at this. So is LiTr dropping frames and producing corrupt video? Or does transcoding fail and stop?

MediaCodecDecoder @Override public int dequeueOutputFrame(long timeout) { return mediaCodec.dequeueOutputBuffer(outputBufferInfo, timeout); } I see outputbufferinfo Size has always been 1, which is obviously not a normal data

Sorry, I can't analyze why at present

gaoyouhuang avatar Jan 13 '22 02:01 gaoyouhuang

Hi, brother, Did you find out why?

gaoyouhuang avatar Jan 21 '22 07:01 gaoyouhuang

Hi. Didn't get a chance yet, working on some new audio features. Will look into this next.

izzytwosheds avatar Jan 21 '22 19:01 izzytwosheds

I am trying to reproduce it on Samsung Note 10 and 60 fps 4K video transcodes file for me. Can you send me a sample video that is failing for you? I am trying to see if there is a problem with video or a phone. What are your target parameters? Are you applying any filters?

izzytwosheds avatar Mar 25 '22 18:03 izzytwosheds