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

有没有将H264的视频流转成图片数据例子, #4

Open
858020330 opened this issue May 8, 2023 · 5 comments
Open

有没有将H264的视频流转成图片数据例子, #4

858020330 opened this issue May 8, 2023 · 5 comments

Comments

@858020330
Copy link

大神帮写个例子,实在搞不来

@moonfdd
Copy link
Owner

moonfdd commented May 9, 2023

https://github.com/moonfdd/ffmpeg-go/blob/main/examples/a06video_decode_frame_save/main.go

这个示例就是转图片的,不过图片数据是yuv数据,不是jpg的数据

@858020330
Copy link
Author

https://github.com/moonfdd/ffmpeg-go/blob/main/examples/a06video_decode_frame_save/main.go

这个示例就是转图片的,不过图片数据是yuv数据,不是jpg的数据

libavformat.AvformatOpenInput(&fmtCtx, filePath, nil, nil) 这个方法是读本地文件方式,我的直接是TCP发的数据流,不是读本地文件,有例子吗

@moonfdd
Copy link
Owner

moonfdd commented May 9, 2023

用的什么协议?rtsp还是rtmp还是其他?

@858020330
Copy link
Author

不是读本

我的项目开源的scrcpy,数据流是TCP实时发出来的H264,你提供的例子是读取本地文件实现不可行

@moonfdd
Copy link
Owner

moonfdd commented May 10, 2023

内存读取,我尝试过,但程序崩溃,实现不了

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