VideoCompressor icon indicating copy to clipboard operation
VideoCompressor copied to clipboard

某些视频压缩不成功

Open XinYiWorld opened this issue 6 years ago • 2 comments

2019-09-16 10:02:02.354 8903-8903/com.mh.webappStart E/ChooseVideoImpl: 选择视频: /storage/emulated/0/com.jiudaifu/cache/videoCache/2019-09-05-135142.mp4 2019-09-16 10:02:02.355 8903-8903/com.mh.webappStart E/czxx: getVideoInfo: /storage/emulated/0/com.jiudaifu/cache/videoCache/2019-09-05-135142.mp4 2019-09-16 10:02:02.369 8903-8903/com.mh.webappStart E/ChooseVideoImpl: 压缩前 videoInfo: VideoInfo{duration=24, size=748252, height=406, width=720} 2019-09-16 10:02:02.371 8903-8903/com.mh.webappStart I/System.out: Failed parserXml +java.io.FileNotFoundException: data/bbkcore/delete_path.xml (No such file or directory) 2019-09-16 10:02:02.372 8903-8903/com.mh.webappStart E/ChooseVideoImpl: compressVideoLow onStart: 2019-09-16 10:02:02.406 8903-8903/com.mh.webappStart E/BackgroundFallback: initVivoBgFallback callstackcom.android.internal.policy.DecorView.:389 com.android.internal.policy.PhoneWindow.generateDecor:2441 com.android.internal.policy.PhoneWindow.installDecor:2820 com.android.internal.policy.PhoneWindow.setContentView:453 com.android.internal.app.AlertController.installContent:292 android.app.AlertDialog.onCreate:454 android.app.ProgressDialog.onCreate:272 android.app.Dialog.dispatchOnCreate:442 android.app.Dialog.show:337 com.mh.webappStart.android_plugin_impl.plugins.plugin_impl.ChooseVideoImpl$5.onStart:236 2019-09-16 10:02:02.458 8903-8903/com.mh.webappStart I/TouchMotionHandler: handler onAttached 2019-09-16 10:02:02.484 8903-9397/com.mh.webappStart E/tmessages: colorFormat = 2130708361 2019-09-16 10:02:02.486 8903-9397/com.mh.webappStart I/MediaCodecList: matching 'OMX.qcom.video.encoder.avc' 2019-09-16 10:02:02.486 8903-9397/com.mh.webappStart I/MediaCodecList: matching 'OMX.google.h264.encoder' 2019-09-16 10:02:02.487 8903-9397/com.mh.webappStart I/MediaCodec: MediaCodec constructor 2019-09-16 10:02:02.487 8903-9397/com.mh.webappStart D/MediaCodec: MediaCodec::CreateByType avc encoder client pid 8903 process name com.mh.webappStart 2019-09-16 10:02:02.487 8903-9397/com.mh.webappStart I/VideoBlackWhiteList: getVideoBWList from mediaserver 2019-09-16 10:02:02.487 8903-9397/com.mh.webappStart E/VideoBlackWhiteList: getVideoBWList OK 2019-09-16 10:02:02.487 8903-9397/com.mh.webappStart I/ACodec: mIsVivoLogEnable = 0 2019-09-16 10:02:02.489 8903-9667/com.mh.webappStart I/OMXClient: IOmx service obtained 2019-09-16 10:02:02.499 8903-9667/com.mh.webappStart I/ACodec: [OMX.qcom.video.encoder.avc]configureCodec AMessage(what = 'conf', target = 1) = { int32_t color-format = 2130708361 int32_t i-frame-interval = 10 string mime = "video/avc" int32_t width = 360 int32_t bitrate = 181800 int32_t frame-rate = 25 int32_t height = 203 int32_t encoder = 1 } 2019-09-16 10:02:02.499 8903-9667/com.mh.webappStart I/ExtendedACodec: setupVideoEncoder() 2019-09-16 10:02:02.499 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7fa30c06 = 2141391878 2019-09-16 10:02:02.499 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7fa30c04 = 2141391876 2019-09-16 10:02:02.499 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7fa30c00 = 2141391872 2019-09-16 10:02:02.500 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7fa30c09 = 2141391881 2019-09-16 10:02:02.500 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7fa30c0a = 2141391882 2019-09-16 10:02:02.500 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7fa30c08 = 2141391880 2019-09-16 10:02:02.500 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7fa30c07 = 2141391879 2019-09-16 10:02:02.500 8903-9667/com.mh.webappStart W/OMXUtils: do not know color format 0x7f000789 = 2130708361 2019-09-16 10:02:02.501 8903-9667/com.mh.webappStart E/ACodec: [OMX.qcom.video.encoder.avc] failed to set input port definition parameters. 2019-09-16 10:02:02.501 8903-9667/com.mh.webappStart E/ExtendedACodec: [OMX.qcom.video.encoder.avc] configureCodec returning error -1010 2019-09-16 10:02:02.501 8903-9667/com.mh.webappStart E/ACodec: signalError(omxError 0x80001001, internalError -1010) 2019-09-16 10:02:02.501 8903-9667/com.mh.webappStart E/ACodec: [OMX.qcom.video.encoder.avc] configureCodec returning error -1010 2019-09-16 10:02:02.501 8903-9667/com.mh.webappStart E/ACodec: signalError(omxError 0x80001001, internalError -1010) 2019-09-16 10:02:02.501 8903-9666/com.mh.webappStart E/MediaCodec: Codec reported err 0xfffffc0e, actionCode 0, while in state 3 2019-09-16 10:02:02.503 8903-9666/com.mh.webappStart E/MediaCodec: Codec reported err 0xfffffc0e, actionCode 0, while in state 0 2019-09-16 10:02:02.503 8903-9397/com.mh.webappStart E/MediaCodec: configure failed with err 0xfffffc0e, resetting... 2019-09-16 10:02:02.503 8903-9397/com.mh.webappStart I/MediaCodec: reset 2019-09-16 10:02:02.503 8903-9397/com.mh.webappStart I/MediaCodec: release 2019-09-16 10:02:02.503 8903-9666/com.mh.webappStart I/MediaCodec: kWhatStop or kWhatRelease 2019-09-16 10:02:02.503 8903-9666/com.mh.webappStart I/ACodec: initiateShutdown kWhatReleaseCodecInstance 2019-09-16 10:02:02.511 8903-9397/com.mh.webappStart I/ACodec: mIsVivoLogEnable = 0 2019-09-16 10:02:02.515 8903-9667/com.mh.webappStart I/OMXClient: IOmx service obtained 2019-09-16 10:02:02.522 8903-9397/com.mh.webappStart E/tmessages: Error 0xfffffc0e 2019-09-16 10:02:02.522 8903-9666/com.mh.webappStart I/MediaCodec: kWhatStop or kWhatRelease 2019-09-16 10:02:02.522 8903-9397/com.mh.webappStart I/MediaCodec: release 2019-09-16 10:02:02.522 8903-9666/com.mh.webappStart I/MediaCodec: kWhatStop or kWhatRelease 2019-09-16 10:02:02.522 8903-9666/com.mh.webappStart I/ACodec: initiateShutdown kWhatReleaseCodecInstance 2019-09-16 10:02:02.526 8903-9397/com.mh.webappStart I/MediaCodec: ~MediaCodec 2019-09-16 10:02:02.528 8903-9344/com.mh.webappStart D/OpenGLRenderer: endAllActiveAnimators on 0xd0f08b00 (AppCompatTextView) with handle 0xd0cfed70 2019-09-16 10:02:02.531 8903-9397/com.mh.webappStart E/tmessages: time = 64 2019-09-16 10:02:02.531 8903-9397/com.mh.webappStart E/ViratPath: /storage/emulated/0/com.jiudaifu/cache/videoCache/2019-09-05-135142.mp4 2019-09-16 10:02:02.531 8903-9397/com.mh.webappStart E/ViratPath: /storage/emulated/0/test/2019-09-05-135142.mp4 2019-09-16 10:02:02.531 8903-9397/com.mh.webappStart E/ViratPath: /storage/emulated/0/com.jiudaifu/cache/videoCache/2019-09-05-135142.mp4 2019-09-16 10:02:02.533 8903-8903/com.mh.webappStart E/ChooseVideoImpl: compressVideoLow onSuccess: 2019-09-16 10:02:02.535 8903-8903/com.mh.webappStart I/TouchMotionHandler: handler onDetached 2019-09-16 10:02:02.553 8903-8903/com.mh.webappStart E/czxx: getVideoInfo: /storage/emulated/0/test/2019-09-05-135142.mp4 2019-09-16 10:02:02.568 8903-8903/com.mh.webappStart W/System.err: java.lang.RuntimeException: setDataSource failed: status = 0x80000000 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.media.MediaMetadataRetriever.setDataSource(Native Method) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:74) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at com.vincent.videocompressor.util.VideoUtil.getVideoInfo(VideoUtil.java:14) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at com.mh.webappStart.android_plugin_impl.plugins.plugin_impl.ChooseVideoImpl$5.onSuccess(ChooseVideoImpl.java:245) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at com.vincent.videocompressor.VideoCompress$VideoCompressTask.onPostExecute(VideoCompress.java:72) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at com.vincent.videocompressor.VideoCompress$VideoCompressTask.onPostExecute(VideoCompress.java:32) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.os.AsyncTask.finish(AsyncTask.java:695) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.os.AsyncTask.access$600(AsyncTask.java:180) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.os.Looper.loop(Looper.java:224) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7076) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at java.lang.reflect.Method.invoke(Native Method) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) 2019-09-16 10:02:02.569 8903-8903/com.mh.webappStart W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878) 2019-09-16 10:02:02.577 8903-8903/com.mh.webappStart I/chromium: [INFO:CONSOLE(129)] "Fail !", source: http://localhost:9092/part2.html (129) 2019-09-16 10:02:02.816 8903-8903/com.mh.webappStart I/TouchMotionHandler: handler onDetached

XinYiWorld avatar Sep 16 '19 02:09 XinYiWorld

2019-09-16 10:02:02.503 8903-9397/com.mh.webappStart E/MediaCodec: configure failed with err 0xfffffc0e, resetting..

看下是不是你的视频width,height属性,是不是有问题? MediaFormat里面的width,height属性,只接受2的倍数的。不然就会报Android android.media.MediaCodec$CodecException: Error 0xfffffc0e 错误

解决方法: 在MediaFormat outputFormat = MediaFormat.createVideoFormat(MIME_TYPE, resultWidth, resultHeight);之前做判断,宽高改为2的倍数。 改为 if ((resultWidth & 1) == 1) { resultWidth--; } if ((resultHeight & 1) == 1) { resultHeight--; } MediaFormat outputFormat = MediaFormat.createVideoFormat(MIME_TYPE, resultWidth, resultHeight);

biansemao avatar Mar 07 '20 11:03 biansemao

如果没有疫情,您是不是得下辈子才会回复啊。不过我已经解决了问题,多谢了!

------------------ 原始邮件 ------------------ 发件人: "biansemao"<[email protected]>; 发送时间: 2020年3月7日(星期六) 晚上7:57 收件人: "fishwjy/VideoCompressor"<[email protected]>; 抄送: "1349308479"<[email protected]>; "Author"<[email protected]>; 主题: Re: [fishwjy/VideoCompressor] 某些视频压缩不成功 (#37)

2019-09-16 10:02:02.503 8903-9397/com.mh.webappStart E/MediaCodec: configure failed with err 0xfffffc0e, resetting..

看下是不是你的视频width,height属性,是不是有问题? MediaFormat里面的width,height属性,只接受2的倍数的。不然就会报Android android.media.MediaCodec$CodecException: Error 0xfffffc0e 错误

解决方法: 在MediaFormat outputFormat = MediaFormat.createVideoFormat(MIME_TYPE, resultWidth, resultHeight);之前做判断,宽高改为2的倍数。 改为 if ((resultWidth & 1) == 1) { resultWidth--; } if ((resultHeight & 1) == 1) { resultHeight--; } MediaFormat outputFormat = MediaFormat.createVideoFormat(MIME_TYPE, resultWidth, resultHeight);

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

XinYiWorld avatar Mar 07 '20 11:03 XinYiWorld