FFMPEG学习----遍历所支持的封装格式

#include <stdio.h>

extern "C"
{
#include "libavformat/avformat.h"
};



int main(void)
{
	AVFormatContext	*pFormatCtx = NULL;
	AVInputFormat *pInputFormat = NULL;
	AVOutputFormat *pOnputFormat = NULL;
	
	av_register_all();
	
	pInputFormat = av_iformat_next(NULL);
	puts("-------------------------------Input--------------------------------");
	while(pInputFormat != NULL)
	{
		printf("%s ", pInputFormat->name);
		pInputFormat = pInputFormat->next;
	}
	puts("\n--------------------------------------------------------------------");
	
	pOnputFormat = av_oformat_next(NULL);
	puts("-------------------------------Output-------------------------------");
	while(pOnputFormat != NULL)
	{
		printf("%s ", pOnputFormat->name);
		pOnputFormat = pOnputFormat->next;
	}
	puts("\n--------------------------------------------------------------------");
	
	return 0;
}
/**
 * If f is NULL, returns the first registered input format,
 * if f is non-NULL, returns the next registered input format after f
 * or NULL if f is the last one.
 */


输出:

G:\Coding\FFMpeg\Proj\Console>cl /c /Iinclude tutorial.cpp
用于 x86 的 Microsoft (R) C/C++ 优化编译器 18.00.31101 版版权所有(C) Microsoft C
orporation。  保留所有权利。

tutorial.cpp

G:\Coding\FFMpeg\Proj\Console>link tutorial.obj lib\avformat.lib
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation.  All rights reserved.


G:\Coding\FFMpeg\Proj\Console>tutorial
-------------------------------Input--------------------------------
aa aac ac3 acm act adf adp ads adx aea afc aiff aix amr anm apc ape apng aqtitle
 asf asf_o ass ast au avi avisynth avr avs bethsoftvid bfi bin bink bit bmv bfst
m brstm boa c93 caf cavsvideo cdg cdxl cine concat data daud dcstr dfa dirac dnx
hd dsf dsicin dss dts dtshd dv dvbsub dvbtxt dxa ea ea_cdata eac3 epaf ffm ffmet
adata filmstrip flac flic flv live_flv 4xm frm fsb g722 g723_1 g729 genh gif gsm
 gxf h261 h263 h264 hevc hls,applehttp hnm ico idcin idf iff ilbc image2 image2p
ipe alias_pix brender_pix ingenient ipmovie ircam iss iv8 ivf ivr jacosub jv lml
m4 loas lrc lvf lxf m4v matroska,webm mgsts microdvd mjpeg mlp mlv mm mmf mov,mp
4,m4a,3gp,3g2,mj2 mp3 mpc mpc8 mpeg mpegts mpegtsraw mpegvideo mpjpeg mpl2 mpsub
 msf msnwctcp mtv musx mv mvi mxf mxg nc nistsphere nsv nut nuv ogg oma paf alaw
 mulaw f64be f64le f32be f32le s32be s32le s24be s24le s16be s16le s8 u32be u32l
e u24be u24le u16be u16le u8 pjs pmp pva pvf qcp r3d rawvideo realtext redspark
rl2 rm roq rpl rsd rso rtp rtsp sami sap sbg sdp sdr2 film_cpk shn siff sln smk
smjpeg smush sol sox spdif srt psxstr stl subviewer1 subviewer sup svag swf tak
tedcaptions thp 3dostr tiertexseq tmv truehd tta txd tty v210 v210x vag vc1 vc1t
est vivo vmd vobsub voc vpk vplayer vqf w64 wav wc3movie webm_dash_manifest webv
tt wsaud wsvqa wtv wve wv xa xbin xmv xvag xwma yop yuv4mpegpipe bmp_pipe dds_pi
pe dpx_pipe exr_pipe j2k_pipe jpeg_pipe jpegls_pipe pcx_pipe pictor_pipe png_pip
e qdraw_pipe sgi_pipe sunrast_pipe tiff_pipe webp_pipe libgme libmodplug
--------------------------------------------------------------------
-------------------------------Output-------------------------------
a64 ac3 adts adx aiff amr apng asf ass ast asf_stream au avi avm2 bit caf cavsvi
deo crc dash data daud dirac dnxhd dts dv eac3 f4v ffm ffmetadata filmstrip flac
 flv framecrc framehash framemd5 g722 g723_1 gif gsm gxf h261 h263 h264 hash hds
 hevc hls ico ilbc image2 image2pipe ipod ircam ismv ivf jacosub latm lrc m4v md
5 matroska matroska microdvd mjpeg mlp mmf mov mp2 mp3 mp4 mpeg vcd mpeg1video d
vd svcd mpeg2video vob mpegts mpjpeg mxf mxf_d10 mxf_opatom null nut oga ogg oma
 opus alaw mulaw f64be f64le f32be f32le s32be s32le s24be s24le s16be s16le s8
u32be u32le u24be u24le u16be u16le u8 psp rawvideo rm roq rso rtp rtp_mpegts rt
sp sap segment stream_segment,ssegment singlejpeg smjpeg smoothstreaming sox spx
 spdif srt swf tee 3g2 3gp mkvtimestamp_v2 truehd uncodedframecrc vc1 vc1test vo
c w64 wav webm webm_dash_manifest webm_chunk webp webvtt wtv wv yuv4mpegpipe
--------------------------------------------------------------------

G:\Coding\FFMpeg\Proj\Console>


  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

N3verL4nd

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值