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

../format_go112.go:287:26: ctx.avCtx.filename undefined (type *_Ctype_struct_AVFormatContext has no field or method filename) #143

Open
liangshuguang opened this issue Oct 22, 2021 · 4 comments

Comments

@liangshuguang
Copy link

liangshuguang commented Oct 22, 2021

Hello, why can't I find this method when I compile and install ffmpeg? Is there something wrong with my practice? I follow readme.md step by step.

1634883378047

root@fb0f71201404:/data/gmf/examples# pkg-config --libs libavformat libavdevice libavfilter
-L/usr/local/ffmpeg/lib -lavformat -lavdevice -lavfilter

../format_go112.go:287:26: ctx.avCtx.filename undefined (type *_Ctype_struct_AVFormatContext has no field or method filename)
../format_go112.go:333:45: ctx.avCtx.filename undefined (type *_Ctype_struct_AVFormatContext has no field or method filename)
../format_go112.go:335:45: ctx.avCtx.filename undefined (type *_Ctype_struct_AVFormatContext has no field or method filename)
../frame_go112.go:114:24: f.avFrame.pkt_pts undefined (type *_Ctype_struct_AVFrame has no field or method pkt_pts)
../frame_go112.go:122:11: f.avFrame.pkt_pts undefined (type *_Ctype_struct_AVFrame has no field or method pkt_pts)
../stream.go:48:12: s.avStream.codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
../stream.go:60:38: s.avStream.codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
../stream.go:78:40: s.avStream.codec undefined (type *_Ctype_struct_AVStream has no field or method codec)

@3d0c
Copy link
Owner

3d0c commented Oct 22, 2021

Hello.

Well, filename field has been removed from AVFormatContext in latest version of FFmpeg. GMF doesn't have support for new "url's" for now.
As a workaround You can build older version of FFmpeg, e.g. try to checkout fc3f5cd149326b0a478c9a4a34acc22cf757ef02 commit. It works on my system.

@liangshuguang
Copy link
Author

Thank you very much for your answer. What version of ffmpeg do you use? What version should I use?

@3d0c
Copy link
Owner

3d0c commented Oct 22, 2021

This change was introduced at Feb 26 11:33:09 2021, so everything before n4.3.2 will work.

@liangshuguang
Copy link
Author

liangshuguang commented Oct 22, 2021

Thank you very much for your answer. I already know how to do it. I'm glad to receive your reply. Thank you for helping me solve my problem.

Can you help me solve a problem, that is, the time when I transcode with mp4s-to-flv.go in the lower version of ffmpeg is wrong. bbb.mp4 is 00:01:00, and the flv I transcode is 55 seconds. I think it should be the problem of time base. How can I set it correctly?

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