[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

保存为mp4的问题 #351

Open
hh-kai opened this issue Aug 16, 2024 · 1 comment
Open

保存为mp4的问题 #351

hh-kai opened this issue Aug 16, 2024 · 1 comment

Comments

@hh-kai
Copy link
hh-kai commented Aug 16, 2024

_mp4_writer = mp4_writer_create(is_fmp4, mov_file_cache_buffer(), &_wfile, is_fmp4 ? MOV_FLAG_SEGMENT : MOV_FLAG_FASTSTART);
其它代码不变的情况 仅是在这里is_fmp4=false 就会导致录制出来的文件无法播放

以下是录制的大致流程
'''cpp
_mp4_writer = mp4_writer_create(is_fmp4, mov_file_cache_buffer(), &_wfile, is_fmp4 ? MOV_FLAG_SEGMENT : MOV_FLAG_FASTSTART);

void create_v_track(){
if (-1==v_track) {
a_track = xx;
v_track = xx;
mp4_writer_init_segment(_mp4_writer);
}
}

void input_video_frame(){
create_v_track()
mp4_writer_write()
}
void inout_audio_frame(){
mp4_writer_write()
}
'''
可能是哪里的问题 导致录制非fmp4文件 无法播放

@lower-mouse
Copy link

把录制的无法播放的mp4文件用mp4信息查看工具打开看看moov box存在吗?如果是的话排查一下代码有没有正常关闭MP4文件

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

No branches or pull requests

2 participants