Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android 硬件加速 mpeg4 格式,播放无图像,有声音 #2541

Closed
peterhuang007 opened this issue Jan 5, 2017 · 14 comments
Closed

android 硬件加速 mpeg4 格式,播放无图像,有声音 #2541

peterhuang007 opened this issue Jan 5, 2017 · 14 comments

Comments

@peterhuang007
Copy link

在 ff_ffplay_options.h 开启 { "mediacodec-mpeg4", "MediaCodec: enable MPEG4",
OPTION_OFFSET(mediacodec_mpeg4), OPTION_INT(1, 0, 1) },使用ijkplay-example 用例播放mpeg4 格式的视频,无图像,有声音,
1.使用的版本 git checkout -B latest k0.7.5

@xinzhengzhang
Copy link
Member

ffprobe your video stream and paste the output

@peterhuang007
Copy link
Author

peterhuang007 commented Jan 5, 2017

@xinzhengzhang
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'A1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf57.40.101
Duration: 00:00:02.84, start: 0.000000, bitrate: 724 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 480x640 [SAR 1:1 DAR 3:4], 601 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(zho): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
Metadata:
handler_name : SoundHandler

@xinzhengzhang
Copy link
Member

add -enable-decoder=mpeg4

@peterhuang007
Copy link
Author

@xinzhengzhang
编译已经配置 --enable-decoders(这个是软件解码的应该和硬件解码没关系吧) 已经开启所有的解码器了,在编译日志里也出现了 Enabled decoders: mpeg4

@peterhuang007
Copy link
Author

@xinzhengzhang
A1.mp4.zip

@raymond1012
Copy link
Member

不是所有的机器都支持mpeg4的硬解,请直接使用软解。

@yuazhen
Copy link
Contributor

yuazhen commented Jan 6, 2017

not all mpeg4 is supported by MediaCodec. please see #1875

@bruceshu
Copy link

bruceshu commented Apr 9, 2018

@peterhuang007 你好,我这边也遇到相同问题,mpeg4编码的视频硬解,画面花屏,软解正常。但是在相同的机器上,用系统自带的mediaplayer硬解,就能正常播放。请问这个问题你解决了吗?

@yuazhen
Copy link
Contributor

yuazhen commented Apr 10, 2018

@bruceshu, you can try this patch #3805

@Lee-Jian
Copy link

Lee-Jian commented May 7, 2018

@bruceshu 你好 mpeg4编码的视频硬解,画面花屏,软解正常 这个问题解决了吗

@JohnDwang
Copy link

只有声音没有画面 如何处理

@JohnDwang
Copy link

mp4格式的

@bruceshu
Copy link

@Lee-Jian 我的问题解决了,mpeg4硬解跟芯片有关,建议你用软解

@linjiansheng
Copy link
Contributor

amlogic 芯片 低版本基本不支持 mpeg4 硬解码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants