-
Notifications
You must be signed in to change notification settings - Fork 132
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
error: ‘CODEC_TYPE_AUDIO’ undeclared #19
Comments
Same problem here. Running: gcc 4.6.1-9ubuntu3 on Ubuntu 11.10, Kernel 3.0.0-17-server X86_64
|
Fixed it. Error is a result of the script failing the include file "libavformat/avformat.h". I fixed it by copying /usr/include/libavformat to the compile root. I also had to compile executing gcc this way
|
I am having the same problem, could you give a little more detail on how you solved it ? What did you do when you say "by copying /usr/include/libavformat to the compile root" ? thanks for sharing ! |
not sure which version of libavformat I used because at first I used the version that is included with debian build of ffmpeg. Even tough my build was successful the binary gave me segmentation faults left and right. With the need to work with h264 codecs, I tried using the libavformat version that is included with the ffmpeg source downloaded when following this tutorial, http://pasindudps.blogspot.com/2011/10/compiling-installing-ffmpeg-in-ubuntu.html. I ended up with many more errors because it turns out that in latest version of libavformat they replaced CODEC_TYPE_AUDIO (On Line 55) and CODEC_TYPE_VIDEO (On Line 67) with AVMEDIA_TYPE_AUDIO and AVMEDIA_TYPE_VIDEO. Also the avcodec_open function (On Line 218) was changed to require one additional argument but you can just add NULL as the third argument. Once I updated the outdated code I was able to build a success build without the previous segmentation fault. I still have a lot to diagnose but I hope to have a working HLS soon. I'm no C programmer but my ability to diagnose the error comes from being a excellent PHP programmer. The syntax is not that much different. |
I got so fed up with trouble I was getting from ffmpeg and live_segmenter that I decided to take a more conventional route and use the HLS on Wowza but that is even proving to be like pulling teeth. I have tried other encoded media with the same result. If you notice at the end of live_segmenter is the argument encoding_profile but I do not get the reason for this argument because no parameters exist for encoding profiles other then what is located in the config file that you use with the ruby script like so
|
live_segmenter.c:41:3: warning: ‘av_new_stream’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1541) [-Wdeprecated-declarations] open the file /usr/local/include/libavformat/avformat.h then correct it like this : #if FF_API_NEW_STREAM |
When I run make:
The text was updated successfully, but these errors were encountered: