如何将TextureView保存为视频文件或Mp4文件?

时间:2019-12-24 07:23:46

标签: android record textureview

我已经成功加载了在纹理视图上纹理的视频。并成功地在texttureview上播放了这些帧,现在我正在寻找记录该textureview的记录。我不知道如何将其记录为视频文件。我在网上搜索时,发现只有一个有关grafika视频播放器的参考链接,但我无法使用grafika录制视频,在这一主题上任何人都可以帮助我。

我尝试过

https://stackoverflow.com/a/42538679/12589339

我遇到了这个错误

2019-12-24 15:02:40.675 22942-24463/com.example.texture E/TextureRender: glCreateShader type=35633: glError 1281
2019-12-24 15:02:40.722 22942-24463/com.example.texture W/MediaAnalyticsItem: Unable to record: (codec:0:-1:-11:0:7:android.media.mediacodec.codec=OMX.qcom.video.encoder.avc:android.media.mediacodec.mode=video:android.media.mediacodec.secure=0:android.media.mediacodec.width=394:android.media.mediacodec.height=702:android.media.mediacodec.rotation-degrees=0:android.media.mediacodec.mime=video/avc:) [forcenew=0]
2019-12-24 15:02:40.768 22942-24461/com.example.texture W/System.err: java.lang.RuntimeException: glCreateShader type=35633: glError 1281
2019-12-24 15:02:40.770 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.TextureRender.checkGlError(TextureRender.java:219)
2019-12-24 15:02:40.770 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.TextureRender.loadShader(TextureRender.java:170)
2019-12-24 15:02:40.770 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.TextureRender.createProgram(TextureRender.java:185)
2019-12-24 15:02:40.770 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.TextureRender.surfaceCreated(TextureRender.java:111)
2019-12-24 15:02:40.771 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.OutputSurfaceNew.setup(OutputSurfaceNew.java:106)
2019-12-24 15:02:40.771 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.OutputSurfaceNew.<init>(OutputSurfaceNew.java:97)
2019-12-24 15:02:40.771 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.ExtractDecodeEditEncodeMuxTest.extractDecodeEditEncodeMux(ExtractDecodeEditEncodeMuxTest.java:369)
2019-12-24 15:02:40.771 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.ExtractDecodeEditEncodeMuxTest.access$000(ExtractDecodeEditEncodeMuxTest.java:55)
2019-12-24 15:02:40.771 22942-24461/com.example.texture W/System.err:     at com.example.texture.recording.ExtractDecodeEditEncodeMuxTest$TestWrapper.run(ExtractDecodeEditEncodeMuxTest.java:205)
2019-12-24 15:02:40.771 22942-24461/com.example.texture W/System.err:     at java.lang.Thread.run(Thread.java:764)
2019-12-24 15:02:40.789 22942-23097/com.example.texture W/Adreno-ES20: <core_glFinish:34>: glFinish skipped: 0
2019-12-24 15:02:40.791 22942-23097/com.example.texture W/Adreno-ES20: <core_glFinish:34>: glFinish skipped: 0

0 个答案:

没有答案