首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏EasyNVR

    编译企业视频通话EasyRTC报You must install libavformat错误解决方案

    近期,我们在编译EasyRTC-Freeswitch时,出现You must install libavformat-dev to build mod_av. 编译freeswitch mod_av 模块的时候,需要libavformat库支持。 默认freeswitch是不支持libavformat的,需要下载第三方库libav进行编译,下面就是编译的过程,大家可以参考一下: libav 编译 1)下载libav http://libav.org

    1.3K30发布于 2020-07-13
  • 来自专栏韩曙亮的移动开发专栏

    【Android FFMPEG 开发】Android Studio 中配置 FFMPEG 库注意事项 ( 静态库 链接 libz.so 库 | 导入 FFMPEG 函数库顺序 )

    导入 FFMPEG 静态库 会报以下错误 : libavformat/id3v2.c:1021: error: undefined reference to 'uncompress' libavformat ' libavformat/http.c:1646: error: undefined reference to 'inflateEnd' libavformat/http.c:680: error _' libavformat/http.c:686: error: undefined reference to 'zlibCompileFlags' libavformat/http.c:1437 to 'inflateInit_' libavformat/matroskadec.c:1410: error: undefined reference to 'inflateEnd' libavformat ' libavformat/codec2.c:76: error: undefined reference to 'avpriv_codec2_mode_block_align' libavformat

    1.5K20编辑于 2023-03-27
  • 来自专栏hank

    【分享】FFMpeg checkout 版本n4.2.5,得到master版本, 导致后续OpenCV 4.5.4编译错误; 切换到指定远程分支,解决问题。

    CC libavformat/jacosubenc.o CC libavformat/jvdec.o CC libavformat/latmenc.o CC libavformat /lrc.o CC libavformat/loasdec.o CC libavformat/lmlm4.o CC libavformat/log2_tab.o libavformat libavformat/mkvtimestamp_v2.o CC libavformat/mlpdec.o CC libavformat/mlvdec.o CC libavformat libavformat/movenchint.o CC libavformat/mov_esds.o CC libavformat/mp3dec.o CC libavformat /libavformat.a INSTALL libavformat/libavformat.so STRIP install-libavformat-shared INSTALL libavcodec

    1.4K40编辑于 2022-03-23
  • 来自专栏福大大架构师每日一题

    2023-03-27:avio_list_dir.c 是 FFmpeg 库自带的一个示例程序,它提供了列出目录中所有文件和子目录

    () ret = list_op(os.Args[1]) libavformat.AvformatNetworkDeinit() if ret < 0 { ret = 1 : return "<DIR>" case libavformat.AVIO_ENTRY_FILE: return "<FILE>" case libavformat.AVIO_ENTRY_BLOCK_DEVICE DEVICE>" case libavformat.AVIO_ENTRY_NAMED_PIPE: return "<PIPE>" case libavformat.AVIO_ENTRY_SYMBOLIC_LINK : return "<LINK>" case libavformat.AVIO_ENTRY_SOCKET: return "<SOCKET>" case libavformat.AVIO_ENTRY_SERVER : return "<SERVER>" case libavformat.AVIO_ENTRY_SHARE: return "<SHARE>" case libavformat.AVIO_ENTRY_WORKGROUP

    49420编辑于 2023-06-08
  • 来自专栏福大大架构师每日一题

    2023-03-21:音视频解混合(demuxer)为MP3和H264,用go语言编写。答案2023-03-21:# 步骤1:安

    这些库包括fmt、os、exec以及FFmpeg库中的libavcodec、libavdevice、libavformat和libavutil。 您可以使用libavformat.AvformatWriteHeader函数来写入文件头。 您可以使用libavformat.AvWriteTrailer函数来写入文件尾。 == 0 { if libavformat.AvioOpen(&ofmtCtxVideo.Pb, outFilenameVideo, libavformat.AVIO_FLAG_WRITE == 0 { if libavformat.AvioOpen(&ofmtCtxAudio.Pb, outFilenameAudio, libavformat.AVIO_FLAG_WRITE

    45420编辑于 2023-06-08
  • 来自专栏福大大架构师每日一题

    2023-03-05:ffmpeg推送本地视频至lal流媒体服务器(以RTMP为例),请用go语言编写。

    moonfdd/ffmpeg-go/ffcommon" "github.com/moonfdd/ffmpeg-go/libavcodec" "github.com/moonfdd/ffmpeg-go/libavformat //Input AVFormatContext and Output AVFormatContext var ifmt_ctx, ofmt_ctx *libavformat.AVFormatContext () //Network libavformat.AvformatNetworkInit() //Input ret = libavformat.AvformatOpenInput(&ifmt_ctx == 0 { ret = libavformat.AvioOpen(&ofmt_ctx.Pb, out_filename, libavformat.AVIO_FLAG_WRITE) if ret = nil && ofmt.Flags&libavformat.AVFMT_NOFILE == 0 { ofmt_ctx.Pb.AvioClose() } ofmt_ctx.AvformatFreeContext

    72100编辑于 2023-03-05
  • 来自专栏福大大架构师每日一题

    2023-03-27:avio_list_dir.c 是 FFmpeg 库自带的一个示例程序,它提供了列出目录中所有文件和子目录的功能,请用go语言改写。

    return "<DIR>" case libavformat.AVIO_ENTRY_FILE: return "<FILE>" case libavformat.AVIO_ENTRY_BLOCK_DEVICE >" case libavformat.AVIO_ENTRY_NAMED_PIPE: return "<PIPE>" case libavformat.AVIO_ENTRY_SYMBOLIC_LINK : return "<LINK>" case libavformat.AVIO_ENTRY_SOCKET: return "<SOCKET>" case libavformat.AVIO_ENTRY_SERVER : return "<SERVER>" case libavformat.AVIO_ENTRY_SHARE: return "<SHARE>" case libavformat.AVIO_ENTRY_WORKGROUP >" } func list_op(input_dir string) (ret int32) { var entry *libavformat.AVIODirEntry var ctx *libavformat.AVIODirContext

    80520编辑于 2023-03-27
  • 来自专栏福大大架构师每日一题

    2023-03-21:音视频解混合(demuxer)为MP3和H264,用go语言编写。

    这些库包括fmt、os、exec以及FFmpeg库中的libavcodec、libavdevice、libavformat和libavutil。 您可以使用libavformat.AvformatWriteHeader函数来写入文件头。 您可以使用libavformat.AvWriteTrailer函数来写入文件尾。 == 0 {if libavformat.AvioOpen(&ofmtCtxVideo.Pb, outFilenameVideo, libavformat.AVIO_FLAG_WRITE) < 0 { == 0 {if libavformat.AvioOpen(&ofmtCtxAudio.Pb, outFilenameAudio, libavformat.AVIO_FLAG_WRITE) < 0 {

    63310编辑于 2023-03-21
  • 来自专栏福大大架构师每日一题

    2023-03-24:音视频mp3和h264混合(muxer)编码为mp4,用go语言编写。

    moonfdd/ffmpeg-go/ffcommon" "github.com/moonfdd/ffmpeg-go/libavcodec" "github.com/moonfdd/ffmpeg-go/libavformat == 0 { if libavformat.AvioOpen(&ofmtCtx.Pb, outFilename, libavformat.AVIO_FLAG_WRITE) < 0 { var inStream, outStream *libavformat.AVStream var streamIndex ffcommon.FInt = 0 if libavutil.AvCompareTs = 0 { aacbsfc.AvBitstreamFilterClose() } end: libavformat.AvformatCloseInput(&ifmtCtxVideo) libavformat.AvformatCloseInput(&ifmtCtxAudio) if ofmtCtx !

    40710编辑于 2023-06-08
  • 来自专栏福大大架构师每日一题

    2023-03-09:用golang调用ffmpeg,将流媒体数据(以RTMP为例)保存成本地文件(以flv为例)。

    github.com/moonfdd/ffmpeg-go/ffcommon""github.com/moonfdd/ffmpeg-go/libavcodec""github.com/moonfdd/ffmpeg-go/libavformat //Input AVFormatContext and Output AVFormatContextvar ifmt_ctx, ofmt_ctx *libavformat.AVFormatContextvar /out/receive.flv"libavformat.AvRegisterAll()//Networklibavformat.AvformatNetworkInit()//Inputret = libavformat.AvformatOpenInput == 0 {ret = libavformat.AvioOpen(&ofmt_ctx.Pb, out_filename, libavformat.AVIO_FLAG_WRITE)if ret < 0 = nil && ofmt.Flags&libavformat.AVFMT_NOFILE == 0 {ofmt_ctx.Pb.AvioClose()}ofmt_ctx.AvformatFreeContext

    1.5K00编辑于 2023-03-09
  • 来自专栏福大大架构师每日一题

    2023-03-14:读取摄像头,并且显示视频。代码用go语言编写。

    moonfdd/ffmpeg-go/libavcodec""github.com/moonfdd/ffmpeg-go/libavdevice""github.com/moonfdd/ffmpeg-go/libavformat var options *libavutil.AVDictionarylibavutil.AvDictSet(&options, "list_devices", "true", 0)iformat := libavformat.AvFindInputFormat ("dshow")fmt.Printf("========Device Info=============\n")libavformat.AvformatOpenInput(&pFormatCtx, " ("avfoundation")fmt.Printf("==AVFoundation Device Info===\n")libavformat.AvformatOpenInput(&pFormatCtx ()libavformat.AvformatNetworkInit()pFormatCtx = libavformat.AvformatAllocContext()//Open File//char filepath

    1.2K10编辑于 2023-03-14
  • 来自专栏福大大架构师每日一题

    2023-03-01:用moonfdd/ffmpeg-go库,将h264文件编码为mp4文件。

    moonfdd/ffmpeg-go/ffcommon" "github.com/moonfdd/ffmpeg-go/libavcodec" "github.com/moonfdd/ffmpeg-go/libavformat var outFmtCtx *libavformat.AVFormatContext var codecPara *libavcodec.AVCodecParameters var outVStream *libavformat.AVStream var outCodec *libavcodec.AVCodec var outCodecCtx *libavcodec.AVCodecContext var outCodecPara *libavcodec.AVCodecParameters var inVStream *libavformat.AVStream pkt := libavcodec.AvPacketAlloc \n") break } //打开输出文件并填充数据 if libavformat.AvioOpen(&outFmtCtx.Pb, outFileName, libavformat.AVIO_FLAG_READ_WRITE

    80700编辑于 2023-03-01
  • 来自专栏福大大架构师每日一题

    2023-02-19:请用go语言调用ffmepg,输出视频文件信息。

    "fmt" "os" "os/exec" "github.com/moonfdd/ffmpeg-go/ffcommon" "github.com/moonfdd/ffmpeg-go/libavformat /lib/avformat-58.dll") fmt_ctx := libavformat.AvformatAllocContext() //创建对象并初始化 ret := int32(0) /resources/big_buck_bunny.mp4" //文件地址 for { //打开文件 ret = libavformat.AvformatOpenInput(&fmt_ctx information\n") break } fmt_ctx.AvDumpFormat(0, fileName, 0) //输出视频信息 break } libavformat.AvformatCloseInput

    31510编辑于 2023-06-08
  • 来自专栏音视频处理

    ffmpeg4.x为什么不再需要调用av_register_all呢

    位于 libavformat\format.c, 如下: libavformat\format.c: static const AVOutputFormat * const muxer_list[ ff_adx_muxer, &ff_aiff_muxer, &ff_alp_muxer, &ff_amr_muxer, ......, } 有的同学会发现自己的源代码并没有libavformat 新版ffmpeg这个函数也是废弃了, 遍历复用器用 av_muxer_iterate. libavformat\allformats.c: const AVOutputFormat *av_muxer_iterate #include <stdio.h> #include "libavformat/avformat.h" int main() { void *ofmt_opaque = NULL; const libavformat\allformats.c AVOutputFormat *av_oformat_next(const AVOutputFormat *f) { ff_thread_once

    8.1K20编辑于 2021-12-04
  • 来自专栏福大大架构师每日一题

    2023-04-12:使用 Go 重写 FFmpeg 的 extract_mvs.c 工具程序,提取视频中的运动矢量信息。

    github.com/moonfdd/ffmpeg-go/ffcommon""github.com/moonfdd/ffmpeg-go/libavcodec""github.com/moonfdd/ffmpeg-go/libavformat ""github.com/moonfdd/ffmpeg-go/libavutil")func main0() (ret ffcommon.FInt) {var pkt libavformat.AVPacketif (&fmt_ctx)libavutil.AvFrameFree(&frame)if ret < 0 {return 1} else {return 0}}var fmt_ctx *libavformat.AVFormatContextvar video_dec_ctx *libavcodec.AVCodecContextvar video_stream *libavformat.AVStreamvar src_filename stringvar , type0 libavutil.AVMediaType) ffcommon.FInt {var ret ffcommon.FIntvar st *libavformat.AVStreamvar dec_ctx

    74020编辑于 2023-04-12
  • 来自专栏福大大架构师每日一题

    2023-03-15:屏幕录制并且显示视频,不要用命令。代码用go语言编写。

    4.关闭libavformat库中的AVFormatContext。5.关闭libavdevice库中的AVInputFormat。6.释放libavutil库中的内存空间。 ("dshow")fmt.Printf("========Device Info=============\n")libavformat.AvformatOpenInput(&pFormatCtx, " ()libavformat.AvformatNetworkInit()pFormatCtx = libavformat.AvformatAllocContext()//Open File//char filepath ("dshow")if libavformat.AvformatOpenInput(&pFormatCtx, "video=screen-capture-recorder", ifmt, nil) ! ("gdigrab")if libavformat.AvformatOpenInput(&pFormatCtx, "desktop", ifmt, &options) !

    1.5K20编辑于 2023-03-15
  • 来自专栏福大大架构师每日一题

    2023-04-21:用go语言重写ffmpeg的metadata.c示例。

    打开输入文件并查找流信息使用 libavformat.AvformatOpenInput() 函数打开用户指定的输入文件,并将返回的 AVFormatContext 结构体指针赋值给 fmt_ctx 变量 关闭输入文件使用 libavformat.AvformatCloseInput(&fmt_ctx) 函数关闭输入文件并释放内存。使用github/moonfdd/ffmpeg-go库。 代码如下:package mainimport ("fmt""os""github.com/moonfdd/ffmpeg-go/ffcommon""github.com/moonfdd/ffmpeg-go/libavformat = 2 {fmt.Printf("usage: %s <input_file>\nexample program to demonstrate the use of the libavformat metadata \n\n", os.Args[0])return 1}ret = libavformat.AvformatOpenInput(&fmt_ctx, os.Args[1], nil, nil)if ret

    43700编辑于 2023-04-21
  • 来自专栏猿计划

    解决新版本ffmpeg找不到avpriv_io_delete函数等问题

    最初的代码如下: zh@zh-lpc:~/project/ffmpeg$ cat ff.c #include <stdio.h> #include <libavutil/log.h> //#include <libavformat /avio.h> #include <libavformat/avformat.h> int main() { char *fileName=". project/ffmpeg$ zh@zh-lpc:~/project/ffmpeg$ zh@zh-lpc:~/project/ffmpeg$ cat /usr/local/ffmpeg/include/libavformat /avio.h"和"libavformat/avformat.h"都是可以的: 因为avformat.h中包含了avio.h头文件。 #include <stdio.h> #include <libavutil/log.h> //#include <libavformat/avio.h> #include <libavformat/avformat.h

    1.2K40发布于 2021-09-22
  • 来自专栏福大大架构师每日一题

    2023-03-19:使用Go语言和FFmpeg库实现pcm编码为mp3。

    首先需要调用libavformat.AvformatAllocOutputContext2()函数分配AVFormatContext结构体,并调用libavformat.AvioOpen()函数打开输出文件 : var pFormatCtx *libavformat.AVFormatContext libavformat.AvformatAllocOutputContext2(&pFormatCtx, nil , "", outFileName) if libavformat.AvioOpen(&pFormatCtx.Pb, outFileName, libavformat.AVIO_FLAG_READ_WRITE \n") return } ## 2.6.写入文件头 调用libavformat.AvformatWriteHeader()函数写入输出文件的文件头信息: if libavformat.AvformatWriteHeader (&pFormatCtx, nil, "", outFileName) if libavformat.AvioOpen(&pFormatCtx.Pb, outFileName, libavformat.AVIO_FLAG_READ_WRITE

    76930编辑于 2023-06-08
  • 来自专栏福大大架构师每日一题

    2023-04-21:用go语言重写ffmpeg的metadata.c示例。

    打开输入文件并查找流信息 使用 `libavformat.AvformatOpenInput()` 函数打开用户指定的输入文件,并将返回的 `AVFormatContext` 结构体指针赋值给 `fmt_ctx 关闭输入文件 使用 `libavformat.AvformatCloseInput(&fmt_ctx)` 函数关闭输入文件并释放内存。 使用github/moonfdd/ffmpeg-go库。 import ( "fmt" "os" "github.com/moonfdd/ffmpeg-go/ffcommon" "github.com/moonfdd/ffmpeg-go/libavformat = 2 { fmt.Printf("usage: %s <input_file>\nexample program to demonstrate the use of the libavformat \n\n", os.Args[0]) return 1 } ret = libavformat.AvformatOpenInput(&fmt_ctx, os.Args[1], nil,

    36220编辑于 2023-06-09
领券