M-JPEG、MPEG4、H.264都有何区别

本文介绍了视频压缩技术在视频服务器及摄像机中的应用,对比分析了JPEG/M-JPEG、H.261/H.263、MPEG及H.264等主流压缩标准的特点与适用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

压缩方式是网络视频服务器和网络摄像机的核心技术,压缩方式很大程度上决定着图像的质量、压缩比、传输效率、传输速度等性能,它是评价网络视频服务器和网络摄像机性能优劣的重要一环。
随着多媒体技术的发展,相继推出了许多压缩编码标准,目前主要有JPEG/M-JPEGH.261/H.263MPEG等标准。
1JPEG/M-JPEG
  ①、JPEG是一种静止图像的压缩标准,它是一种标准的帧内压缩编码方式。
                当硬件处理速度足够快时,JPEG能用于实时动图像的视频压缩。
                在画面变动较小的情况下能提供相当不错的图像质量,传输速度快,缺点是数据量较大。
  ②、M-JPEG源于JPEG压缩技术,是一种简单的帧内JPEG压缩,压缩图像质量较好,在画面变动情况下无马赛克,但是由于这种压缩本身技术限制,无法做到大比例压缩,录像时每小时约1-2GB空间,网络传输时需要2M带宽,所以无论录像或网络发送传输,都将耗费大量的硬盘容量和带宽,不适合长时间连续录像的需求,不大实用于视频图像的网络传输。
2H.261/H.263
  ①、H.261标准通常称为 P*64H.261对全色彩、实时传输动图像可以达到较高的压缩比,算法由帧内压缩加前后帧间压缩编码组合而成,以提供视频压缩和解压缩的快速处理。
                由于在帧间压缩算法中只预测到后1帧,所以在延续时间上比较有优势,但图像质量难以做到很高的清晰度,无法实现大压缩比和变速率录像等。
  ②、 H.263的基本编码方法与H.261是相同的,均为混合编码方法,但H.263为适应极低码率的传输,在编码的各个环节上作了改进,如以省码字来提高编码图像的质量,此外,H.263还吸取了MPEG的双向运动预测等措施,进一步提高帧间编码的预测精度,一般说,在低码率时,采用H.263只要一半的速率可获得和H.261相当的图像质量。
3MPEG
        MPEG是压缩运动图像及其伴音的视音频编码标准,它采用了帧间压缩,仅存储连续帧之间有差别的地方 ,从而达到较大的压缩比。
        MPEG现有MPEG-1MPEG-2MPEG-4三个版本,以适应于不同带宽和图像质量的要求。
  ①、MPEG-1的视频压缩算法依赖于两个基本技术,一是基于16*16(像素*行)块的运动补偿,二是基于变换域的压缩技术来减少空域冗余度,,压缩比相比M-JPEG要高,对运动不激烈的视频信号可获得较好的图像质量,但当运动激烈时,图像会产生马赛克现象。
                 MPEG-11.5Mbps的数据率传输视音频信号,MPEG-1在视频图像质量方面相当于VHS录像机的图像质量,视频录像的清晰度的彩色模式 ≥240TVL,两路立体声伴音的质量接近CD的声音质量。
                 MPEG-1是前后帧多帧预测的压缩算法,具有很大的压缩灵活性,能变速率压缩视频,可视不同的录像环境,设置不同的压缩质量,从每小时80MB至 400MB不等,但数据量和带宽还是比较大。
  ②、MPEG-2它是获得更高分辨率(720*572)提供广播级的视音频编码标准。
                MPEG-2作为MPEG-1的兼容扩展,它支持隔行扫描的视频格式和许多高级性能包括支持多层次的可调视频编码,适合多种质量如多种速率和多种分辨率的场合。
                它适用于运动变化较大,要求图像质量很高的实时图像。
                对每秒30帧、720*572分辨率的视频信号进行压缩,数据率可达3-10Mbps
                由于数据量太大,不适合长时间连续录像的需求。
  ③、MPEG-4是为移动通信设备在Internet网实时传输视音频信号而制定的低速率、高压缩比的视音频编码标准。
                MPEG-4标准是面向对象的压缩方式,不是像MPEG-1MPEG-2那样简单地将图像分为一些像块,而是根据图像的内容,其中的对象(物体、人物、背景)分离出来,分别进行帧内、帧间编码,并允许在不同的对象之间灵活分配码率,对重要的对象分配较多的字节,对次要的对象分配较少的字节,从而大大提高了压缩比,在较低的码率下获得较好的效果, MPEG-4支持MPEG-1MPEG-2中大多数功能,提供不同的视频标准源格式、码率、帧频下矩形图形图像的有效编码。
总之,MPEG-4有三个方面的优势:
  ①、具有很好的兼容性;
  ②、MPEG-4比其他算法提供更好的压缩比,最高达 2001
  ③、MPEG-4在提供高压缩比的同时,对数据的损失很小。
所以,MPEG-4的应用能大幅度的降低录像存储容量,获得较高的录像清晰度,特别适用于长时间实时录像的需求,同时具备在低带宽上优良的网络传输能力。

4H.264是 ITU-TVCEG(视频编码专家组)和ISO/IECMPEG(活动图像编码专家组)的联合视频组(JVTjoint video team)开发的一个新的数字视频编码标准,它既是ITU-TH.264,又是ISO/IECMPEG-4的第10 部分。
        19981月份开始草案征集,19999月,完成第一个草案, 20015月制定了其测试模式TML-820026月的 JVT5次会议通过了H.264FCD板。
        目前该标准还在开发之中,预计明年上半年可正式通过。
  H.264和以前的标准一样,也是 DPCM加变换编码的混合编码模式。

        但它采用“回归基本”的简洁设计,不用众多的选项,获得比H.263好得多的压缩性能;加强了对各种信道的适应能力,采用“网络友好”的结构和语法,有利于对误码和丢包的处理;应用目标范围较宽,以满足不同速率、不同解析度以及不同传输(存储)场合的需求;它的基本系统是开放的,使用无需版权。

        在技术上,H.264标准中有多个闪光之处,如统一的VLC符号编码,高精度、多模式的位移估计,基于4×块的整数变换、分层的编码语法等。
        这些措施使得H.264算法具有很的高编码效率,在相同的重建图像质量下,能够比H.263节约50%左右的码率。
         H.264的码流结构网络适应性强,增加了差错恢复能力,能够很好地适应IP和无线网络的应用。
        其实现在多数的H.264都是 H.263通过改进后的算法,是压缩率变的小了点!如果是从单个画面清晰度比较,MPEG4有优势;从动作连贯性上的清晰度,H.264有优势!

sunkaijie@sunkaijie-virtual-machine:~/nfs/hongjing-gti/hj_media/ext_src/ffmpeg/libs/glibc_11.1.0-lib$ sunkaijie@sunkaijie-virtual-machine:~/nfs/hongjing-gti/hj_media/ext_src/ffmpeg/libs/glibc_11.1.0-lib$ readelf -h libavcodec.a | grep Machine sunkaijie@sunkaijie-virtual-machine:~/nfs/hongjing-gti/hj_media/ext_src/ffmpeg/libs/glibc_11.1.0-lib$ sunkaijie@sunkaijie-virtual-machine:~/nfs/hongjing-gti/hj_media/ext_src/ffmpeg/libs/glibc_11.1.0-lib$ sunkaijie@sunkaijie-virtual-machine:~/nfs/hongjing-gti/hj_media/ext_src/ffmpeg/libs/glibc_11.1.0-lib$ file -b libavcodec.a current ar archive sunkaijie@sunkaijie-virtual-machine:~/nfs/hongjing-gti/hj_media/ext_src/ffmpeg/libs/glibc_11.1.0-lib$ arm-linux-gnueabihf-nm libavformat.a | grep avpriv_h264_has_num_reorder_frames arm-linux-gnueabihf-nm: 3dostr.o: file format not recognized arm-linux-gnueabihf-nm: 4xm.o: file format not recognized arm-linux-gnueabihf-nm: a64.o: file format not recognized arm-linux-gnueabihf-nm: aacdec.o: file format not recognized arm-linux-gnueabihf-nm: aadec.o: file format not recognized arm-linux-gnueabihf-nm: aaxdec.o: file format not recognized arm-linux-gnueabihf-nm: ac3dec.o: file format not recognized arm-linux-gnueabihf-nm: ac4dec.o: file format not recognized arm-linux-gnueabihf-nm: ac4enc.o: file format not recognized arm-linux-gnueabihf-nm: acedec.o: file format not recognized arm-linux-gnueabihf-nm: acm.o: file format not recognized arm-linux-gnueabihf-nm: act.o: file format not recognized arm-linux-gnueabihf-nm: adp.o: file format not recognized arm-linux-gnueabihf-nm: ads.o: file format not recognized arm-linux-gnueabihf-nm: adtsenc.o: file format not recognized arm-linux-gnueabihf-nm: adxdec.o: file format not recognized arm-linux-gnueabihf-nm: aea.o: file format not recognized arm-linux-gnueabihf-nm: afc.o: file format not recognized arm-linux-gnueabihf-nm: aiff.o: file format not recognized arm-linux-gnueabihf-nm: aiffdec.o: file format not recognized arm-linux-gnueabihf-nm: aiffenc.o: file format not recognized arm-linux-gnueabihf-nm: aixdec.o: file format not recognized arm-linux-gnueabihf-nm: allformats.o: file format not recognized arm-linux-gnueabihf-nm: alp.o: file format not recognized arm-linux-gnueabihf-nm: amr.o: file format not recognized arm-linux-gnueabihf-nm: amvenc.o: file format not recognized arm-linux-gnueabihf-nm: anm.o: file format not recognized arm-linux-gnueabihf-nm: apac.o: file format not recognized arm-linux-gnueabihf-nm: apc.o: file format not recognized arm-linux-gnueabihf-nm: ape.o: file format not recognized arm-linux-gnueabihf-nm: apetag.o: file format not recognized arm-linux-gnueabihf-nm: apm.o: file format not recognized arm-linux-gnueabihf-nm: apngdec.o: file format not recognized arm-linux-gnueabihf-nm: apngenc.o: file format not recognized arm-linux-gnueabihf-nm: aptxdec.o: file format not recognized arm-linux-gnueabihf-nm: aqtitledec.o: file format not recognized arm-linux-gnueabihf-nm: argo_asf.o: file format not recognized arm-linux-gnueabihf-nm: argo_brp.o: file format not recognized arm-linux-gnueabihf-nm: argo_cvg.o: file format not recognized arm-linux-gnueabihf-nm: asf.o: file format not recognized arm-linux-gnueabihf-nm: asf_tags.o: file format not recognized arm-linux-gnueabihf-nm: asfcrypt.o: file format not recognized arm-linux-gnueabihf-nm: asfdec_f.o: file format not recognized arm-linux-gnueabihf-nm: asfdec_o.o: file format not recognized arm-linux-gnueabihf-nm: asfenc.o: file format not recognized arm-linux-gnueabihf-nm: assdec.o: file format not recognized arm-linux-gnueabihf-nm: assenc.o: file format not recognized arm-linux-gnueabihf-nm: ast.o: file format not recognized arm-linux-gnueabihf-nm: astdec.o: file format not recognized arm-linux-gnueabihf-nm: astenc.o: file format not recognized arm-linux-gnueabihf-nm: async.o: file format not recognized arm-linux-gnueabihf-nm: au.o: file format not recognized arm-linux-gnueabihf-nm: av1.o: file format not recognized arm-linux-gnueabihf-nm: av1dec.o: file format not recognized arm-linux-gnueabihf-nm: avc.o: file format not recognized arm-linux-gnueabihf-nm: avformat.o: file format not recognized arm-linux-gnueabihf-nm: avidec.o: file format not recognized arm-linux-gnueabihf-nm: avienc.o: file format not recognized arm-linux-gnueabihf-nm: avio.o: file format not recognized arm-linux-gnueabihf-nm: aviobuf.o: file format not recognized arm-linux-gnueabihf-nm: avlanguage.o: file format not recognized arm-linux-gnueabihf-nm: avr.o: file format not recognized arm-linux-gnueabihf-nm: avs.o: file format not recognized arm-linux-gnueabihf-nm: avs2dec.o: file format not recognized arm-linux-gnueabihf-nm: avs3dec.o: file format not recognized arm-linux-gnueabihf-nm: bethsoftvid.o: file format not recognized arm-linux-gnueabihf-nm: bfi.o: file format not recognized arm-linux-gnueabihf-nm: bink.o: file format not recognized arm-linux-gnueabihf-nm: binka.o: file format not recognized arm-linux-gnueabihf-nm: bintext.o: file format not recognized arm-linux-gnueabihf-nm: bit.o: file format not recognized arm-linux-gnueabihf-nm: bmv.o: file format not recognized arm-linux-gnueabihf-nm: boadec.o: file format not recognized arm-linux-gnueabihf-nm: bonk.o: file format not recognized arm-linux-gnueabihf-nm: brstm.o: file format not recognized arm-linux-gnueabihf-nm: c93.o: file format not recognized arm-linux-gnueabihf-nm: cache.o: file format not recognized arm-linux-gnueabihf-nm: caf.o: file format not recognized arm-linux-gnueabihf-nm: cafdec.o: file format not recognized arm-linux-gnueabihf-nm: cafenc.o: file format not recognized arm-linux-gnueabihf-nm: cavsvideodec.o: file format not recognized arm-linux-gnueabihf-nm: cdg.o: file format not recognized arm-linux-gnueabihf-nm: cdxl.o: file format not recognized arm-linux-gnueabihf-nm: cinedec.o: file format not recognized arm-linux-gnueabihf-nm: codec2.o: file format not recognized arm-linux-gnueabihf-nm: concat.o: file format not recognized arm-linux-gnueabihf-nm: concatdec.o: file format not recognized arm-linux-gnueabihf-nm: crcenc.o: file format not recognized arm-linux-gnueabihf-nm: crypto.o: file format not recognized arm-linux-gnueabihf-nm: dash.o: file format not recognized arm-linux-gnueabihf-nm: dashenc.o: file format not recognized arm-linux-gnueabihf-nm: data_uri.o: file format not recognized arm-linux-gnueabihf-nm: dauddec.o: file format not recognized arm-linux-gnueabihf-nm: daudenc.o: file format not recognized arm-linux-gnueabihf-nm: dcstr.o: file format not recognized arm-linux-gnueabihf-nm: demux.o: file format not recognized arm-linux-gnueabihf-nm: demux_utils.o: file format not recognized arm-linux-gnueabihf-nm: derf.o: file format not recognized arm-linux-gnueabihf-nm: dfa.o: file format not recognized arm-linux-gnueabihf-nm: dfpwmdec.o: file format not recognized arm-linux-gnueabihf-nm: dhav.o: file format not recognized arm-linux-gnueabihf-nm: diracdec.o: file format not recognized arm-linux-gnueabihf-nm: dnxhddec.o: file format not recognized arm-linux-gnueabihf-nm: dovi_isom.o: file format not recognized arm-linux-gnueabihf-nm: dsfdec.o: file format not recognized arm-linux-gnueabihf-nm: dsicin.o: file format not recognized arm-linux-gnueabihf-nm: dss.o: file format not recognized arm-linux-gnueabihf-nm: dtsdec.o: file format not recognized arm-linux-gnueabihf-nm: dtshddec.o: file format not recognized arm-linux-gnueabihf-nm: dump.o: file format not recognized arm-linux-gnueabihf-nm: dv.o: file format not recognized arm-linux-gnueabihf-nm: dvbsub.o: file format not recognized arm-linux-gnueabihf-nm: dvbtxt.o: file format not recognized arm-linux-gnueabihf-nm: dvenc.o: file format not recognized arm-linux-gnueabihf-nm: dxa.o: file format not recognized arm-linux-gnueabihf-nm: eacdata.o: file format not recognized arm-linux-gnueabihf-nm: electronicarts.o: file format not recognized arm-linux-gnueabihf-nm: epafdec.o: file format not recognized arm-linux-gnueabihf-nm: evc.o: file format not recognized arm-linux-gnueabihf-nm: evcdec.o: file format not recognized arm-linux-gnueabihf-nm: ffmetadec.o: file format not recognized arm-linux-gnueabihf-nm: ffmetaenc.o: file format not recognized arm-linux-gnueabihf-nm: fifo.o: file format not recognized arm-linux-gnueabihf-nm: fifo_test.o: file format not recognized arm-linux-gnueabihf-nm: file.o: file format not recognized arm-linux-gnueabihf-nm: filmstripdec.o: file format not recognized arm-linux-gnueabihf-nm: filmstripenc.o: file format not recognized arm-linux-gnueabihf-nm: fitsdec.o: file format not recognized arm-linux-gnueabihf-nm: fitsenc.o: file format not recognized arm-linux-gnueabihf-nm: flac_picture.o: file format not recognized arm-linux-gnueabihf-nm: flacdec.o: file format not recognized arm-linux-gnueabihf-nm: flacenc.o: file format not recognized arm-linux-gnueabihf-nm: flacenc_header.o: file format not recognized arm-linux-gnueabihf-nm: flic.o: file format not recognized arm-linux-gnueabihf-nm: flvdec.o: file format not recognized arm-linux-gnueabihf-nm: flvenc.o: file format not recognized arm-linux-gnueabihf-nm: format.o: file format not recognized arm-linux-gnueabihf-nm: framecrcenc.o: file format not recognized arm-linux-gnueabihf-nm: framehash.o: file format not recognized arm-linux-gnueabihf-nm: frmdec.o: file format not recognized arm-linux-gnueabihf-nm: fsb.o: file format not recognized arm-linux-gnueabihf-nm: ftp.o: file format not recognized arm-linux-gnueabihf-nm: fwse.o: file format not recognized arm-linux-gnueabihf-nm: g722.o: file format not recognized arm-linux-gnueabihf-nm: g723_1.o: file format not recognized arm-linux-gnueabihf-nm: g726.o: file format not recognized arm-linux-gnueabihf-nm: g729dec.o: file format not recognized arm-linux-gnueabihf-nm: gdv.o: file format not recognized arm-linux-gnueabihf-nm: genh.o: file format not recognized arm-linux-gnueabihf-nm: gif.o: file format not recognized arm-linux-gnueabihf-nm: gifdec.o: file format not recognized arm-linux-gnueabihf-nm: gopher.o: file format not recognized arm-linux-gnueabihf-nm: gsmdec.o: file format not recognized arm-linux-gnueabihf-nm: gxf.o: file format not recognized arm-linux-gnueabihf-nm: gxfenc.o: file format not recognized arm-linux-gnueabihf-nm: h261dec.o: file format not recognized arm-linux-gnueabihf-nm: h263dec.o: file format not recognized arm-linux-gnueabihf-nm: h264dec.o: file format not recognized arm-linux-gnueabihf-nm: hashenc.o: file format not recognized arm-linux-gnueabihf-nm: hca.o: file format not recognized arm-linux-gnueabihf-nm: hcom.o: file format not recognized arm-linux-gnueabihf-nm: hdsenc.o: file format not recognized arm-linux-gnueabihf-nm: hevc.o: file format not recognized arm-linux-gnueabihf-nm: hevcdec.o: file format not recognized arm-linux-gnueabihf-nm: hls.o: file format not recognized arm-linux-gnueabihf-nm: hls_sample_encryption.o: file format not recognized arm-linux-gnueabihf-nm: hlsenc.o: file format not recognized arm-linux-gnueabihf-nm: hlsplaylist.o: file format not recognized arm-linux-gnueabihf-nm: hlsproto.o: file format not recognized arm-linux-gnueabihf-nm: hnm.o: file format not recognized arm-linux-gnueabihf-nm: http.o: file format not recognized arm-linux-gnueabihf-nm: httpauth.o: file format not recognized arm-linux-gnueabihf-nm: icecast.o: file format not recognized arm-linux-gnueabihf-nm: icodec.o: file format not recognized arm-linux-gnueabihf-nm: icoenc.o: file format not recognized arm-linux-gnueabihf-nm: id3v1.o: file format not recognized arm-linux-gnueabihf-nm: id3v2.o: file format not recognized arm-linux-gnueabihf-nm: id3v2enc.o: file format not recognized arm-linux-gnueabihf-nm: idcin.o: file format not recognized arm-linux-gnueabihf-nm: idroqdec.o: file format not recognized arm-linux-gnueabihf-nm: idroqenc.o: file format not recognized arm-linux-gnueabihf-nm: iff.o: file format not recognized arm-linux-gnueabihf-nm: ifv.o: file format not recognized arm-linux-gnueabihf-nm: ilbc.o: file format not recognized arm-linux-gnueabihf-nm: img2.o: file format not recognized arm-linux-gnueabihf-nm: img2_alias_pix.o: file format not recognized arm-linux-gnueabihf-nm: img2_brender_pix.o: file format not recognized arm-linux-gnueabihf-nm: img2dec.o: file format not recognized arm-linux-gnueabihf-nm: img2enc.o: file format not recognized arm-linux-gnueabihf-nm: imx.o: file format not recognized arm-linux-gnueabihf-nm: ingenientdec.o: file format not recognized arm-linux-gnueabihf-nm: ip.o: file format not recognized arm-linux-gnueabihf-nm: ipmovie.o: file format not recognized arm-linux-gnueabihf-nm: ipudec.o: file format not recognized arm-linux-gnueabihf-nm: ircam.o: file format not recognized arm-linux-gnueabihf-nm: ircamdec.o: file format not recognized arm-linux-gnueabihf-nm: ircamenc.o: file format not recognized arm-linux-gnueabihf-nm: isom.o: file format not recognized arm-linux-gnueabihf-nm: isom_tags.o: file format not recognized arm-linux-gnueabihf-nm: iss.o: file format not recognized arm-linux-gnueabihf-nm: iv8.o: file format not recognized arm-linux-gnueabihf-nm: ivfdec.o: file format not recognized arm-linux-gnueabihf-nm: ivfenc.o: file format not recognized arm-linux-gnueabihf-nm: jacosubdec.o: file format not recognized arm-linux-gnueabihf-nm: jacosubenc.o: file format not recognized arm-linux-gnueabihf-nm: jpegxl_anim_dec.o: file format not recognized arm-linux-gnueabihf-nm: jvdec.o: file format not recognized arm-linux-gnueabihf-nm: kvag.o: file format not recognized arm-linux-gnueabihf-nm: lafdec.o: file format not recognized arm-linux-gnueabihf-nm: latmenc.o: file format not recognized arm-linux-gnueabihf-nm: lmlm4.o: file format not recognized arm-linux-gnueabihf-nm: loasdec.o: file format not recognized arm-linux-gnueabihf-nm: lrc.o: file format not recognized arm-linux-gnueabihf-nm: lrcdec.o: file format not recognized arm-linux-gnueabihf-nm: lrcenc.o: file format not recognized arm-linux-gnueabihf-nm: luodatdec.o: file format not recognized arm-linux-gnueabihf-nm: lvfdec.o: file format not recognized arm-linux-gnueabihf-nm: lxfdec.o: file format not recognized arm-linux-gnueabihf-nm: m4vdec.o: file format not recognized arm-linux-gnueabihf-nm: matroska.o: file format not recognized arm-linux-gnueabihf-nm: matroskadec.o: file format not recognized arm-linux-gnueabihf-nm: matroskaenc.o: file format not recognized arm-linux-gnueabihf-nm: mca.o: file format not recognized arm-linux-gnueabihf-nm: mccdec.o: file format not recognized arm-linux-gnueabihf-nm: md5proto.o: file format not recognized arm-linux-gnueabihf-nm: metadata.o: file format not recognized arm-linux-gnueabihf-nm: mgsts.o: file format not recognized arm-linux-gnueabihf-nm: microdvddec.o: file format not recognized arm-linux-gnueabihf-nm: microdvdenc.o: file format not recognized arm-linux-gnueabihf-nm: mj2kdec.o: file format not recognized arm-linux-gnueabihf-nm: mkvtimestamp_v2.o: file format not recognized arm-linux-gnueabihf-nm: mlpdec.o: file format not recognized arm-linux-gnueabihf-nm: mlvdec.o: file format not recognized arm-linux-gnueabihf-nm: mm.o: file format not recognized arm-linux-gnueabihf-nm: mmf.o: file format not recognized arm-linux-gnueabihf-nm: mms.o: file format not recognized arm-linux-gnueabihf-nm: mmsh.o: file format not recognized arm-linux-gnueabihf-nm: mmst.o: file format not recognized arm-linux-gnueabihf-nm: mods.o: file format not recognized arm-linux-gnueabihf-nm: moflex.o: file format not recognized arm-linux-gnueabihf-nm: mov.o: file format not recognized arm-linux-gnueabihf-nm: mov_chan.o: file format not recognized arm-linux-gnueabihf-nm: mov_esds.o: file format not recognized arm-linux-gnueabihf-nm: movenc.o: file format not recognized arm-linux-gnueabihf-nm: movenc_ttml.o: file format not recognized arm-linux-gnueabihf-nm: movenccenc.o: file format not recognized arm-linux-gnueabihf-nm: movenchint.o: file format not recognized arm-linux-gnueabihf-nm: mp3dec.o: file format not recognized arm-linux-gnueabihf-nm: mp3enc.o: file format not recognized arm-linux-gnueabihf-nm: mpc.o: file format not recognized arm-linux-gnueabihf-nm: mpc8.o: file format not recognized arm-linux-gnueabihf-nm: mpeg.o: file format not recognized arm-linux-gnueabihf-nm: mpegenc.o: file format not recognized arm-linux-gnueabihf-nm: mpegts.o: file format not recognized arm-linux-gnueabihf-nm: mpegtsenc.o: file format not recognized arm-linux-gnueabihf-nm: mpegvideodec.o: file format not recognized arm-linux-gnueabihf-nm: mpjpeg.o: file format not recognized arm-linux-gnueabihf-nm: mpjpegdec.o: file format not recognized arm-linux-gnueabihf-nm: mpl2dec.o: file format not recognized arm-linux-gnueabihf-nm: mpsubdec.o: file format not recognized arm-linux-gnueabihf-nm: msf.o: file format not recognized arm-linux-gnueabihf-nm: msnwc_tcp.o: file format not recognized arm-linux-gnueabihf-nm: mspdec.o: file format not recognized arm-linux-gnueabihf-nm: mtaf.o: file format not recognized arm-linux-gnueabihf-nm: mtv.o: file format not recognized arm-linux-gnueabihf-nm: musx.o: file format not recognized arm-linux-gnueabihf-nm: mux.o: file format not recognized arm-linux-gnueabihf-nm: mux_utils.o: file format not recognized arm-linux-gnueabihf-nm: mvdec.o: file format not recognized arm-linux-gnueabihf-nm: mvi.o: file format not recognized arm-linux-gnueabihf-nm: mxf.o: file format not recognized arm-linux-gnueabihf-nm: mxfdec.o: file format not recognized arm-linux-gnueabihf-nm: mxfenc.o: file format not recognized arm-linux-gnueabihf-nm: mxg.o: file format not recognized arm-linux-gnueabihf-nm: ncdec.o: file format not recognized arm-linux-gnueabihf-nm: network.o: file format not recognized arm-linux-gnueabihf-nm: nistspheredec.o: file format not recognized arm-linux-gnueabihf-nm: nspdec.o: file format not recognized arm-linux-gnueabihf-nm: nsvdec.o: file format not recognized arm-linux-gnueabihf-nm: nullenc.o: file format not recognized arm-linux-gnueabihf-nm: nut.o: file format not recognized arm-linux-gnueabihf-nm: nutdec.o: file format not recognized arm-linux-gnueabihf-nm: nutenc.o: file format not recognized arm-linux-gnueabihf-nm: nuv.o: file format not recognized arm-linux-gnueabihf-nm: oggdec.o: file format not recognized arm-linux-gnueabihf-nm: oggenc.o: file format not recognized arm-linux-gnueabihf-nm: oggparsecelt.o: file format not recognized arm-linux-gnueabihf-nm: oggparsedirac.o: file format not recognized arm-linux-gnueabihf-nm: oggparseflac.o: file format not recognized arm-linux-gnueabihf-nm: oggparseogm.o: file format not recognized arm-linux-gnueabihf-nm: oggparseopus.o: file format not recognized arm-linux-gnueabihf-nm: oggparseskeleton.o: file format not recognized arm-linux-gnueabihf-nm: oggparsespeex.o: file format not recognized arm-linux-gnueabihf-nm: oggparsetheora.o: file format not recognized arm-linux-gnueabihf-nm: oggparsevorbis.o: file format not recognized arm-linux-gnueabihf-nm: oggparsevp8.o: file format not recognized arm-linux-gnueabihf-nm: oma.o: file format not recognized arm-linux-gnueabihf-nm: omadec.o: file format not recognized arm-linux-gnueabihf-nm: omaenc.o: file format not recognized arm-linux-gnueabihf-nm: options.o: file format not recognized arm-linux-gnueabihf-nm: os_support.o: file format not recognized arm-linux-gnueabihf-nm: osq.o: file format not recognized arm-linux-gnueabihf-nm: paf.o: file format not recognized arm-linux-gnueabihf-nm: pcm.o: file format not recognized arm-linux-gnueabihf-nm: pcmdec.o: file format not recognized arm-linux-gnueabihf-nm: pcmenc.o: file format not recognized arm-linux-gnueabihf-nm: pdvdec.o: file format not recognized arm-linux-gnueabihf-nm: pjsdec.o: file format not recognized arm-linux-gnueabihf-nm: pmpdec.o: file format not recognized arm-linux-gnueabihf-nm: pp_bnk.o: file format not recognized arm-linux-gnueabihf-nm: prompeg.o: file format not recognized arm-linux-gnueabihf-nm: protocols.o: file format not recognized arm-linux-gnueabihf-nm: psxstr.o: file format not recognized arm-linux-gnueabihf-nm: pva.o: file format not recognized arm-linux-gnueabihf-nm: pvfdec.o: file format not recognized arm-linux-gnueabihf-nm: qcp.o: file format not recognized arm-linux-gnueabihf-nm: qtpalette.o: file format not recognized arm-linux-gnueabihf-nm: r3d.o: file format not recognized arm-linux-gnueabihf-nm: rawdec.o: file format not recognized arm-linux-gnueabihf-nm: rawenc.o: file format not recognized arm-linux-gnueabihf-nm: rawutils.o: file format not recognized arm-linux-gnueabihf-nm: rawvideodec.o: file format not recognized arm-linux-gnueabihf-nm: rdt.o: file format not recognized arm-linux-gnueabihf-nm: realtextdec.o: file format not recognized arm-linux-gnueabihf-nm: redspark.o: file format not recognized arm-linux-gnueabihf-nm: replaygain.o: file format not recognized arm-linux-gnueabihf-nm: riff.o: file format not recognized arm-linux-gnueabihf-nm: riffdec.o: file format not recognized arm-linux-gnueabihf-nm: riffenc.o: file format not recognized arm-linux-gnueabihf-nm: rka.o: file format not recognized arm-linux-gnueabihf-nm: rl2.o: file format not recognized arm-linux-gnueabihf-nm: rm.o: file format not recognized arm-linux-gnueabihf-nm: rmdec.o: file format not recognized arm-linux-gnueabihf-nm: rmenc.o: file format not recognized arm-linux-gnueabihf-nm: rmsipr.o: file format not recognized arm-linux-gnueabihf-nm: rpl.o: file format not recognized arm-linux-gnueabihf-nm: rsd.o: file format not recognized arm-linux-gnueabihf-nm: rso.o: file format not recognized arm-linux-gnueabihf-nm: rsodec.o: file format not recognized arm-linux-gnueabihf-nm: rsoenc.o: file format not recognized arm-linux-gnueabihf-nm: rtmpdigest.o: file format not recognized arm-linux-gnueabihf-nm: rtmphttp.o: file format not recognized arm-linux-gnueabihf-nm: rtmppkt.o: file format not recognized arm-linux-gnueabihf-nm: rtmpproto.o: file format not recognized arm-linux-gnueabihf-nm: rtp.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_ac3.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_amr.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_asf.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_dv.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_g726.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_h261.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_h263.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_h263_rfc2190.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_h264.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_hevc.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_ilbc.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_jpeg.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_latm.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_mpa_robust.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_mpeg12.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_mpeg4.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_mpegts.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_qcelp.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_qdm2.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_qt.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_rfc4175.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_svq3.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_vc2hq.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_vp8.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_vp9.o: file format not recognized arm-linux-gnueabihf-nm: rtpdec_xiph.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_aac.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_amr.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_chain.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_h261.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_h263.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_h263_rfc2190.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_h264_hevc.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_jpeg.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_latm.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_mpegts.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_mpv.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_rfc4175.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_vc2hq.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_vp8.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_vp9.o: file format not recognized arm-linux-gnueabihf-nm: rtpenc_xiph.o: file format not recognized arm-linux-gnueabihf-nm: rtpproto.o: file format not recognized arm-linux-gnueabihf-nm: rtsp.o: file format not recognized arm-linux-gnueabihf-nm: rtspdec.o: file format not recognized arm-linux-gnueabihf-nm: rtspenc.o: file format not recognized arm-linux-gnueabihf-nm: s337m.o: file format not recognized arm-linux-gnueabihf-nm: samidec.o: file format not recognized arm-linux-gnueabihf-nm: sapdec.o: file format not recognized arm-linux-gnueabihf-nm: sapenc.o: file format not recognized arm-linux-gnueabihf-nm: sauce.o: file format not recognized arm-linux-gnueabihf-nm: sbcdec.o: file format not recognized arm-linux-gnueabihf-nm: sbgdec.o: file format not recognized arm-linux-gnueabihf-nm: sccdec.o: file format not recognized arm-linux-gnueabihf-nm: sccenc.o: file format not recognized arm-linux-gnueabihf-nm: scd.o: file format not recognized arm-linux-gnueabihf-nm: sdns.o: file format not recognized arm-linux-gnueabihf-nm: sdp.o: file format not recognized arm-linux-gnueabihf-nm: sdr2.o: file format not recognized arm-linux-gnueabihf-nm: sdsdec.o: file format not recognized arm-linux-gnueabihf-nm: sdxdec.o: file format not recognized arm-linux-gnueabihf-nm: seek.o: file format not recognized arm-linux-gnueabihf-nm: segafilm.o: file format not recognized arm-linux-gnueabihf-nm: segafilmenc.o: file format not recognized arm-linux-gnueabihf-nm: segment.o: file format not recognized arm-linux-gnueabihf-nm: serdec.o: file format not recognized arm-linux-gnueabihf-nm: sga.o: file format not recognized arm-linux-gnueabihf-nm: shortendec.o: file format not recognized arm-linux-gnueabihf-nm: sierravmd.o: file format not recognized arm-linux-gnueabihf-nm: siff.o: file format not recognized arm-linux-gnueabihf-nm: smacker.o: file format not recognized arm-linux-gnueabihf-nm: smjpeg.o: file format not recognized arm-linux-gnueabihf-nm: smjpegdec.o: file format not recognized arm-linux-gnueabihf-nm: smjpegenc.o: file format not recognized arm-linux-gnueabihf-nm: smoothstreamingenc.o: file format not recognized arm-linux-gnueabihf-nm: smush.o: file format not recognized arm-linux-gnueabihf-nm: sol.o: file format not recognized arm-linux-gnueabihf-nm: soxdec.o: file format not recognized arm-linux-gnueabihf-nm: soxenc.o: file format not recognized arm-linux-gnueabihf-nm: spdif.o: file format not recognized arm-linux-gnueabihf-nm: spdifdec.o: file format not recognized arm-linux-gnueabihf-nm: spdifenc.o: file format not recognized arm-linux-gnueabihf-nm: srtdec.o: file format not recognized arm-linux-gnueabihf-nm: srtenc.o: file format not recognized arm-linux-gnueabihf-nm: srtp.o: file format not recognized arm-linux-gnueabihf-nm: srtpproto.o: file format not recognized arm-linux-gnueabihf-nm: stldec.o: file format not recognized arm-linux-gnueabihf-nm: subfile.o: file format not recognized arm-linux-gnueabihf-nm: subtitles.o: file format not recognized arm-linux-gnueabihf-nm: subviewer1dec.o: file format not recognized arm-linux-gnueabihf-nm: subviewerdec.o: file format not recognized arm-linux-gnueabihf-nm: supdec.o: file format not recognized arm-linux-gnueabihf-nm: supenc.o: file format not recognized arm-linux-gnueabihf-nm: svag.o: file format not recognized arm-linux-gnueabihf-nm: svs.o: file format not recognized arm-linux-gnueabihf-nm: swf.o: file format not recognized arm-linux-gnueabihf-nm: swfdec.o: file format not recognized arm-linux-gnueabihf-nm: swfenc.o: file format not recognized arm-linux-gnueabihf-nm: takdec.o: file format not recognized arm-linux-gnueabihf-nm: tcp.o: file format not recognized arm-linux-gnueabihf-nm: tedcaptionsdec.o: file format not recognized arm-linux-gnueabihf-nm: tee.o: file format not recognized arm-linux-gnueabihf-nm: tee_common.o: file format not recognized arm-linux-gnueabihf-nm: teeproto.o: file format not recognized arm-linux-gnueabihf-nm: thp.o: file format not recognized arm-linux-gnueabihf-nm: tiertexseq.o: file format not recognized arm-linux-gnueabihf-nm: tmv.o: file format not recognized arm-linux-gnueabihf-nm: tta.o: file format not recognized arm-linux-gnueabihf-nm: ttaenc.o: file format not recognized arm-linux-gnueabihf-nm: ttmlenc.o: file format not recognized arm-linux-gnueabihf-nm: tty.o: file format not recognized arm-linux-gnueabihf-nm: txd.o: file format not recognized arm-linux-gnueabihf-nm: ty.o: file format not recognized arm-linux-gnueabihf-nm: udp.o: file format not recognized arm-linux-gnueabihf-nm: uncodedframecrcenc.o: file format not recognized arm-linux-gnueabihf-nm: unix.o: file format not recognized arm-linux-gnueabihf-nm: url.o: file format not recognized arm-linux-gnueabihf-nm: urldecode.o: file format not recognized arm-linux-gnueabihf-nm: usmdec.o: file format not recognized arm-linux-gnueabihf-nm: utils.o: file format not recognized arm-linux-gnueabihf-nm: vag.o: file format not recognized arm-linux-gnueabihf-nm: vc1dec.o: file format not recognized arm-linux-gnueabihf-nm: vc1test.o: file format not recognized arm-linux-gnueabihf-nm: vc1testenc.o: file format not recognized arm-linux-gnueabihf-nm: version.o: file format not recognized arm-linux-gnueabihf-nm: vividas.o: file format not recognized arm-linux-gnueabihf-nm: vivo.o: file format not recognized arm-linux-gnueabihf-nm: voc.o: file format not recognized arm-linux-gnueabihf-nm: voc_packet.o: file format not recognized arm-linux-gnueabihf-nm: vocdec.o: file format not recognized arm-linux-gnueabihf-nm: vocenc.o: file format not recognized arm-linux-gnueabihf-nm: vorbiscomment.o: file format not recognized arm-linux-gnueabihf-nm: vpcc.o: file format not recognized arm-linux-gnueabihf-nm: vpk.o: file format not recognized arm-linux-gnueabihf-nm: vplayerdec.o: file format not recognized arm-linux-gnueabihf-nm: vqf.o: file format not recognized arm-linux-gnueabihf-nm: vvcdec.o: file format not recognized arm-linux-gnueabihf-nm: w64.o: file format not recognized arm-linux-gnueabihf-nm: wady.o: file format not recognized arm-linux-gnueabihf-nm: wavarc.o: file format not recognized arm-linux-gnueabihf-nm: wavdec.o: file format not recognized arm-linux-gnueabihf-nm: wavenc.o: file format not recognized arm-linux-gnueabihf-nm: wc3movie.o: file format not recognized arm-linux-gnueabihf-nm: webm_chunk.o: file format not recognized arm-linux-gnueabihf-nm: webmdashenc.o: file format not recognized arm-linux-gnueabihf-nm: webpenc.o: file format not recognized arm-linux-gnueabihf-nm: webvttdec.o: file format not recognized arm-linux-gnueabihf-nm: webvttenc.o: file format not recognized arm-linux-gnueabihf-nm: westwood_aud.o: file format not recognized arm-linux-gnueabihf-nm: westwood_audenc.o: file format not recognized arm-linux-gnueabihf-nm: westwood_vqa.o: file format not recognized arm-linux-gnueabihf-nm: wsddec.o: file format not recognized arm-linux-gnueabihf-nm: wtv_common.o: file format not recognized arm-linux-gnueabihf-nm: wtvdec.o: file format not recognized arm-linux-gnueabihf-nm: wtvenc.o: file format not recognized arm-linux-gnueabihf-nm: wv.o: file format not recognized arm-linux-gnueabihf-nm: wvdec.o: file format not recognized arm-linux-gnueabihf-nm: wvedec.o: file format not recognized arm-linux-gnueabihf-nm: wvenc.o: file format not recognized arm-linux-gnueabihf-nm: xa.o: file format not recognized arm-linux-gnueabihf-nm: xmd.o: file format not recognized arm-linux-gnueabihf-nm: xmv.o: file format not recognized arm-linux-gnueabihf-nm: xvag.o: file format not recognized arm-linux-gnueabihf-nm: xwma.o: file format not recognized arm-linux-gnueabihf-nm: yop.o: file format not recognized arm-linux-gnueabihf-nm: yuv4mpegdec.o: file format not recognized arm-linux-gnueabihf-nm: yuv4mpegenc.o: file format not recognized arm-linux-gnueabihf-nm: ac3_channel_layout_tab.o: file format not recognized arm-linux-gnueabihf-nm: dca_sample_rate_tab.o: file format not recognized arm-linux-gnueabihf-nm: golomb_tab.o: file format not recognized arm-linux-gnueabihf-nm: jpegtables.o: file format not recognized arm-linux-gnueabihf-nm: jpegxl_parse.o: file format not recognized arm-linux-gnueabihf-nm: log2_tab.o: file format not recognized arm-linux-gnueabihf-nm: mpeg4audio_sample_rates.o: file format not recognized arm-linux-gnueabihf-nm: mpegaudiotabs.o: file format not recognized arm-linux-gnueabihf-nm: rangecoder_dec.o: file format not recognized arm-linux-gnueabihf-nm: to_upper4.o: file format not recognized sunkaijie@sunkaijie-virtual-machine:~/nfs/hongjing-gti/hj_media/ext_src/ffmpeg/libs/glibc_11.1.0-lib$
最新发布
06-24
根据提供的引用内容,您可以使用FFmpeg API在C#中编写程序,以实现将H264关键帧转换为BMP的功能。以下是大致的流程原理: 1.使用FFmpeg API解复用mp4文件,得到一个视频流。 2.将视频流解码为yuv序列。 3.将yuv序列中指定的一帧图片内容转换为rgb。 4.将rgb数据存储为bmp位图。 以下是一个C#的示例代码: ```csharp using System; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; namespace H264ToBmp { class Program { static void Main(string[] args) { // 初始化FFmpeg FFmpeg.av_register_all(); FFmpeg.avcodec_register_all(); // 打开输入文件 string inputFileName = "input.mp4"; AVFormatContext* inputFormatContext = null; if (FFmpeg.avformat_open_input(&inputFormatContext, inputFileName, null, null) != 0) { Console.WriteLine("无法打开输入文件"); return; } // 查找视频流 int videoStreamIndex = -1; for (int i = 0; i < inputFormatContext->nb_streams; i++) { if (inputFormatContext->streams[i]->codecpar->codec_type == AVMediaType.AVMEDIA_TYPE_VIDEO) { videoStreamIndex = i; break; } } if (videoStreamIndex == -1) { Console.WriteLine("无法找到视频流"); return; } // 打开视频解码器 AVCodec* videoCodec = FFmpeg.avcodec_find_decoder(inputFormatContext->streams[videoStreamIndex]->codecpar->codec_id); if (videoCodec == null) { Console.WriteLine("无法找到视频解码器"); return; } AVCodecContext* videoCodecContext = FFmpeg.avcodec_alloc_context3(videoCodec); if (FFmpeg.avcodec_parameters_to_context(videoCodecContext, inputFormatContext->streams[videoStreamIndex]->codecpar) < 0) { Console.WriteLine("无法初始化视频解码器上下文"); return; } if (FFmpeg.avcodec_open2(videoCodecContext, videoCodec, null) < 0) { Console.WriteLine("无法打开视频解码器"); return; } // 查找关键帧 AVPacket packet = new AVPacket(); AVFrame* frame = FFmpeg.av_frame_alloc(); int gotPicture = 0; while (FFmpeg.av_read_frame(inputFormatContext, &packet) >= 0) { if (packet.stream_index == videoStreamIndex) { if (FFmpeg.avcodec_decode_video2(videoCodecContext, frame, &gotPicture, &packet) < 0) { Console.WriteLine("无法解码视频帧"); return; } if (gotPicture != 0 && (frame->key_frame != 0 || frame->pict_type == AVPictureType.AV_PICTURE_TYPE_I)) { break; } } FFmpeg.av_packet_unref(&packet); } // 将yuv序列转换为rgb SwsContext* swsContext = FFmpeg.sws_getContext(videoCodecContext->width, videoCodecContext->height, videoCodecContext->pix_fmt, videoCodecContext->width, videoCodecContext->height, AVPixelFormat.AV_PIX_FMT_RGB24, 0, null, null, null); AVFrame* rgbFrame = FFmpeg.av_frame_alloc(); byte_ptrArray4 rgbData = new byte_ptrArray4(); int rgbDataSize = FFmpeg.av_image_alloc(rgbData, null, videoCodecContext->width, videoCodecContext->height, AVPixelFormat.AV_PIX_FMT_RGB24, 1); FFmpeg.sws_scale(swsContext, frame->data, frame->linesize, 0, videoCodecContext->height, rgbData, rgbFrame->linesize); // 将rgb数据存储为bmp位图 Bitmap bmp = new Bitmap(videoCodecContext->width, videoCodecContext->height, videoCodecContext->width * 3, PixelFormat.Format24bppRgb, new IntPtr(rgbData[0])); bmp.Save("output.bmp", ImageFormat.Bmp); // 释放资源 FFmpeg.avformat_close_input(&inputFormatContext); FFmpeg.avcodec_free_context(&videoCodecContext); FFmpeg.av_frame_free(&frame); FFmpeg.sws_freeContext(swsContext); FFmpeg.av_frame_free(&rgbFrame); FFmpeg.av_freep(&rgbData[0]); } } public unsafe static class FFmpeg { private const string DllName = "ffmpeg.dll"; [DllImport(DllName)] public static extern void av_register_all(); [DllImport(DllName)] public static extern void avcodec_register_all(); [DllImport(DllName)] public static extern int avformat_open_input(AVFormatContext** ps, string url, AVInputFormat* fmt, AVDictionary** options); [DllImport(DllName)] public static extern int avcodec_decode_video2(AVCodecContext* avctx, AVFrame* picture, int* got_picture_ptr, AVPacket* avpkt); [DllImport(DllName)] public static extern AVCodec* avcodec_find_decoder(AVCodecID id); [DllImport(DllName)] public static extern AVCodecContext* avcodec_alloc_context3(AVCodec* codec); [DllImport(DllName)] public static extern int avcodec_parameters_to_context(AVCodecContext* codec, AVCodecParameters* par); [DllImport(DllName)] public static extern int avcodec_open2(AVCodecContext* avctx, AVCodec* codec, AVDictionary** options); [DllImport(DllName)] public static extern int av_read_frame(AVFormatContext* s, AVPacket* pkt); [DllImport(DllName)] public static extern void av_packet_unref(AVPacket* pkt); [DllImport(DllName)] public static extern AVFrame* av_frame_alloc(); [DllImport(DllName)] public static extern SwsContext* sws_getContext(int srcW, int srcH, AVPixelFormat srcFormat, int dstW, int dstH, AVPixelFormat dstFormat, int flags, SwsFilter* srcFilter, SwsFilter* dstFilter, double* param); [DllImport(DllName)] public static extern int av_image_alloc(byte_ptrArray4 pointers, int_array4 linesizes, int w, int h, AVPixelFormat pix_fmt, int align); [DllImport(DllName)] public static extern void sws_scale(SwsContext* c, byte_ptrArray4 srcSlice, int_array4 srcStride, int srcSliceY, int srcSliceH, byte_ptrArray4 dst, int_array4 dstStride); [DllImport(DllName)] public static extern void sws_freeContext(SwsContext* swsContext); [DllImport(DllName)] public static extern void av_frame_free(AVFrame** frame); [DllImport(DllName)] public static extern void avcodec_free_context(AVCodecContext** avctx); [DllImport(DllName)] public static extern void avformat_close_input(AVFormatContext** s); [DllImport(DllName)] public static extern void av_freep(void* ptr); } public enum AVMediaType { AVMEDIA_TYPE_UNKNOWN = -1, AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_DATA, AVMEDIA_TYPE_SUBTITLE, AVMEDIA_TYPE_ATTACHMENT, AVMEDIA_TYPE_NB } public enum AVCodecID { AV_CODEC_ID_NONE, /* video codecs */ AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding AV_CODEC_ID_H261, AV_CODEC_ID_H263, AV_CODEC_ID_RV10, AV_CODEC_ID_RV20, AV_CODEC_ID_MJPEG, AV_CODEC_ID_MJPEGB, AV_CODEC_ID_LJPEG, AV_CODEC_ID_SP5X, AV_CODEC_ID_JPEGLS, AV_CODEC_ID_MPEG4, AV_CODEC_ID_RAWVIDEO, AV_CODEC_ID_MSMPEG4V1, AV_CODEC_ID_MSMPEG4V2, AV_CODEC_ID_MSMPEG4V3, AV_CODEC_ID_WMV1, AV_CODEC_ID_WMV2, AV_CODEC_ID_H263P, AV_CODEC_ID_H263I, AV_CODEC_ID_FLV1, AV_CODEC_ID_SVQ1, AV_CODEC_ID_SVQ3, AV_CODEC_ID_DVVIDEO, AV_CODEC_ID_HUFFYUV, AV_CODEC_ID_CYUV, AV_CODEC_ID_H264, AV_CODEC_ID_INDEO3, AV_CODEC_ID_VP3, AV_CODEC_ID_THEORA, AV_CODEC_ID_ASV1, AV_CODEC_ID_ASV2, AV_CODEC_ID_FFV1, AV_CODEC_ID_4XM, AV_CODEC_ID_VCR1, AV_CODEC_ID_CLJR, AV_CODEC_ID_MDEC, AV_CODEC_ID_ROQ, AV_CODEC_ID_INTERPLAY_VIDEO, AV_CODEC_ID_XAN_WC3, AV_CODEC_ID_XAN_WC4, AV_CODEC_ID_RPZA, AV_CODEC_ID_CINEPAK, AV_CODEC_ID_WS_VQA, AV_CODEC_ID_MSRLE, AV_CODEC_ID_MSVIDEO1, AV_CODEC_ID_IDCIN, AV_CODEC_ID_8BPS, AV_CODEC_ID_SMC, AV_CODEC_ID_FLIC, AV_CODEC_ID_TRUEMOTION1, AV_CODEC_ID_VMDVIDEO, AV_CODEC_ID_MSZH, AV_CODEC_ID_ZLIB, AV_CODEC_ID_QTRLE, AV_CODEC_ID_TSCC, AV_CODEC_ID_ULTI, AV_CODEC_ID_QDRAW, AV_CODEC_ID_VIXL, AV_CODEC_ID_QPEG, AV_CODEC_ID_PNG, AV_CODEC_ID_PPM, AV_CODEC_ID_PBM, AV_CODEC_ID_PGM, AV_CODEC_ID_PGMYUV, AV_CODEC_ID_PAM, AV_CODEC_ID_FFVHUFF, AV_CODEC_ID_RV30, AV_CODEC_ID_RV40, AV_CODEC_ID_VC1, AV_CODEC_ID_WMV3, AV_CODEC_ID_LOCO, AV_CODEC_ID_WNV1, AV_CODEC_ID_AASC, AV_CODEC_ID_INDEO2, AV_CODEC_ID_FRAPS, AV_CODEC_ID_TRUEMOTION2, AV_CODEC_ID_BMP, AV_CODEC_ID_CSCD, AV_CODEC_ID_MMVIDEO, AV_CODEC_ID_ZMBV, AV_CODEC_ID_AVS, AV_CODEC_ID_SMACKVIDEO, AV_CODEC_ID_NUV, AV_CODEC_ID_KMVC, AV_CODEC_ID_FLASHSV, AV_CODEC_ID_CAVS, AV_CODEC_ID_JPEG2000, AV_CODEC_ID_VMNC, AV_CODEC_ID_VP5, AV_CODEC_ID_VP6, AV_CODEC_ID_VP6F, AV_CODEC_ID_TARGA, AV_CODEC_ID_DSICINVIDEO, AV_CODEC_ID_TIERTEXSEQVIDEO, AV_CODEC_ID_TIFF, AV_CODEC_ID_GIF, AV_CODEC_ID_DXA, AV_CODEC_ID_DNXHD, AV_CODEC_ID_THP, AV_CODEC_ID_SGI, AV_CODEC_ID_C93, AV_CODEC_ID_BETHSOFTVID, AV_CODEC_ID_PTX, AV_CODEC_ID_TXD, AV_CODEC_ID_VP6A, AV_CODEC_ID_AMV, AV_CODEC_ID_VB, AV_CODEC_ID_PCX, AV_CODEC_ID_SUNRAST, AV_CODEC_ID_INDEO4, AV_CODEC_ID_INDEO5, AV_CODEC_ID_MIMIC, AV_CODEC_ID_RL2, AV_CODEC_ID_ESCAPE124, AV_CODEC_ID_DIRAC, AV_CODEC_ID_BFI, AV_CODEC_ID_CMV, AV_CODEC_ID_MOTIONPIXELS, AV_CODEC_ID_TGV, AV_CODEC_ID_TGQ, AV_CODEC_ID_TQI, AV_CODEC_ID_AURA, AV_CODEC_ID_AURA2, AV_CODEC_ID_V210X, AV_CODEC_ID_TMV, AV_CODEC_ID_V210, AV_CODEC_ID_DPX, AV_CODEC_ID_MAD, AV_CODEC_ID_FRWU, AV_CODEC_ID_FLASHSV2, AV_CODEC_ID_CDGRAPHICS, AV_CODEC_ID_R210, AV_CODEC_ID_ANM, AV_CODEC_ID_BINKVIDEO, AV_CODEC_ID_IFF_ILBM, AV_CODEC_ID_IFF_BYTERUN1, AV_CODEC_ID_KGV1, AV_CODEC_ID_YOP, AV_CODEC_ID_VP8, AV_CODEC_ID_PICTOR, AV_CODEC_ID_ANSI, AV_CODEC_ID_A64_MULTI, AV_CODEC_ID_A64_MULTI5, AV_CODEC_ID_R10K, AV_CODEC_ID_MXPEG, AV_CODEC_ID_LAGARITH, AV_CODEC_ID_PRORES, AV_CODEC_ID_JV, AV_CODEC_ID_DFA, AV_CODEC_ID_WMV3IMAGE, AV_CODEC_ID_VC1IMAGE, AV_CODEC_ID_UTVIDEO, AV_CODEC_ID_BMV_VIDEO, AV_CODEC_ID_VBLE, AV_CODEC_ID_DXTORY, AV_CODEC_ID_V410, AV_CODEC_ID_XWD, AV_CODEC_ID_CDXL, AV_CODEC_ID_XBM, AV_CODEC_ID_ZEROCODEC,
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值