SiliCompressor icon indicating copy to clipboard operation
SiliCompressor copied to clipboard

compression not working for some videos

Open moxgeek opened this issue 6 years ago • 2 comments

the compressing is working fine in must tested videos but in some videos the output file is not playable and always with the same size (140 Bytes) with error in log

2019-09-12 17:53:31.679 27990-30882/ E/tmessages: newFormat = {crop-right=269, vendor.rtc-ext-dec-caps-vt-driver-version.number=180315, vendor.rtc-ext-dec-low-latency.enable=0, color-format=261, slice-height=368, mime=video/raw, stride=272, color-standard=4, color-transfer=3, crop-bottom=359, crop-left=0, width=272, color-range=2, crop-top=0, height=368}
2019-09-12 17:53:31.699 27990-30884/ E/ACodec: [OMX.Exynos.AVC.Encoder] ERROR(0x80001001)
2019-09-12 17:53:31.699 27990-30884/ E/ACodec: signalError(omxError 0x80001001, internalError -2147483648)
2019-09-12 17:53:31.699 27990-30883/ E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
2019-09-12 17:53:31.703 27990-30882/ E/tmessages: println needs a message
2019-09-12 17:53:31.705 27990-30882/ E/tmessages: time = 266

any idea ??

moxgeek avatar Sep 12 '19 16:09 moxgeek

I have the exact same issue. I can't find a pattern. The output of 140 Bytes is very curious, since apparently we all get the same result!

jonasN5 avatar Sep 13 '19 22:09 jonasN5

Think I'm a little late but I was investigating on the same issue and find out that the output sizes must be a multiple of 16 (codec block size)

width = round(width, 16);
height = round(height, 16);

public int round(double num, int multipleOf) {
    return (int) (Math.floor((num +  (double)multipleOf / 2) / multipleOf) * multipleOf);
}

Hope to help someone stuck in this problem 🌵

jackaru avatar Sep 26 '20 18:09 jackaru