当前位置: 首页 > news >正文

南翔镇网站建设公司内容营销包括哪些内容

南翔镇网站建设公司,内容营销包括哪些内容,多个wordpress站点互相,做pc端的网站首页尺寸是多少雷神博客地址#xff1a;https://blog.csdn.net/leixiaohua1020/article/details/39767055 本程序可以将封装格式中的视频码流数据和音频码流数据分离出来。 在该例子中#xff0c; 将FLV的文件分离得到H.264视频码流文件和MP3 音频码流文件。 注意#xff1a; 这个是简化版… 雷神博客地址https://blog.csdn.net/leixiaohua1020/article/details/39767055 本程序可以将封装格式中的视频码流数据和音频码流数据分离出来。 在该例子中 将FLV的文件分离得到H.264视频码流文件和MP3 音频码流文件。 注意 这个是简化版的视音频分离器。与原版的不同在于没有初始化输出视频流和音频流的AVFormatContext。而是直接将解码后的得到的AVPacket中的的数据通过fwrite()写入文件。这样做的好处是流程比 较简单。坏处是对一些格式的视音频码流是不适用的比如说FLV/MP4/MKV等格式中的AAC码流上述封装格式中的AAC的AVPacket中的数据缺失了7字节的ADTS文件头。 视频源码 /*** 最简单的基于FFmpeg的视音频分离器简化版* Simplest FFmpeg Demuxer Simple** 雷霄骅 Lei Xiaohua* leixiaohua1020126.com* 中国传媒大学/数字电视技术* Communication University of China / Digital TV Technology* http://blog.csdn.net/leixiaohua1020** 本程序可以将封装格式中的视频码流数据和音频码流数据分离出来。* 在该例子中 将FLV的文件分离得到H.264视频码流文件和MP3* 音频码流文件。** 注意* 这个是简化版的视音频分离器。与原版的不同在于没有初始化输出* 视频流和音频流的AVFormatContext。而是直接将解码后的得到的* AVPacket中的的数据通过fwrite()写入文件。这样做的好处是流程比* 较简单。坏处是对一些格式的视音频码流是不适用的比如说* FLV/MP4/MKV等格式中的AAC码流上述封装格式中的AAC的AVPacket中* 的数据缺失了7字节的ADTS文件头。* ** This software split a media file (in Container such as * MKV, FLV, AVI...) to video and audio bitstream.* In this example, it demux a FLV file to H.264 bitstream* and MP3 bitstream.* Note:* This is a simple version of Simplest FFmpeg Demuxer. It is * more simple because it doesnt init Output Video/Audio streams* AVFormatContext. It write AVPackets data to files directly.* The advantages of this method is simple. The disadvantages of* this method is its not suitable for some kind of bitstreams. For* example, AAC bitstream in FLV/MP4/MKV Container Format(data in* AVPacket lack of 7 bytes of ADTS header).**/#include stdio.h#define __STDC_CONSTANT_MACROS#ifdef _WIN32 //Windows extern C { #include libavformat/avformat.h }; #else //Linux... #ifdef __cplusplus extern C { #endif #include libavformat/avformat.h #ifdef __cplusplus }; #endif #endif//1: Use H.264 Bitstream Filter #define USE_H264BSF 1int main(int argc, char* argv[]) {AVFormatContext *ifmt_ctx NULL;AVPacket pkt;int ret, i;int videoindex-1,audioindex-1;const char *in_filename cuc_ieschool.flv;//Input file URLconst char *out_filename_v cuc_ieschool.h264;//Output file URLconst char *out_filename_a cuc_ieschool.mp3;av_register_all();//Inputif ((ret avformat_open_input(ifmt_ctx, in_filename, 0, 0)) 0) {printf( Could not open input file.);return -1;}if ((ret avformat_find_stream_info(ifmt_ctx, 0)) 0) {printf( Failed to retrieve input stream information);return -1;}videoindex-1;for(i0; iifmt_ctx-nb_streams; i) {if(ifmt_ctx-streams[i]-codec-codec_typeAVMEDIA_TYPE_VIDEO){videoindexi;}else if(ifmt_ctx-streams[i]-codec-codec_typeAVMEDIA_TYPE_AUDIO){audioindexi;}}//Dump Format------------------printf(\nInput Video\n);av_dump_format(ifmt_ctx, 0, in_filename, 0);printf(\n\n);FILE *fp_audiofopen(out_filename_a,wb); FILE *fp_videofopen(out_filename_v,wb); /*FIX: H.264 in some container format (FLV, MP4, MKV etc.) need h264_mp4toannexb bitstream filter (BSF)*Add SPS,PPS in front of IDR frame*Add start code (0,0,0,1) in front of NALUH.264 in some container (MPEG2TS) dont need this BSF.*/ #if USE_H264BSFAVBitStreamFilterContext* h264bsfc av_bitstream_filter_init(h264_mp4toannexb); #endifwhile(av_read_frame(ifmt_ctx, pkt)0){if(pkt.stream_indexvideoindex){ #if USE_H264BSFav_bitstream_filter_filter(h264bsfc, ifmt_ctx-streams[videoindex]-codec, NULL, pkt.data, pkt.size, pkt.data, pkt.size, 0); #endifprintf(Write Video Packet. size:%d\tpts:%lld\n,pkt.size,pkt.pts);fwrite(pkt.data,1,pkt.size,fp_video);}else if(pkt.stream_indexaudioindex){/*AAC in some container format (FLV, MP4, MKV etc.) need to add 7 BytesADTS Header in front of AVPacket data manually.Other Audio Codec (MP3...) works well.*/printf(Write Audio Packet. size:%d\tpts:%lld\n,pkt.size,pkt.pts);fwrite(pkt.data,1,pkt.size,fp_audio);}av_free_packet(pkt);}#if USE_H264BSFav_bitstream_filter_close(h264bsfc); #endiffclose(fp_video);fclose(fp_audio);avformat_close_input(ifmt_ctx);if (ret 0 ret ! AVERROR_EOF) {printf( Error occurred.\n);return -1;}return 0; } SourceForgehttps://sourceforge.net/projects/simplestffmpegformat/ 上面链接下载后解压缩在visual Studio直接打开.sln文件直接可以运行 向雷神学习
http://www.dnsts.com.cn/news/129110.html

相关文章:

  • 在线设计签名免费网站建设部证书查询官方网站
  • 建设网站管理规定网站主机是什么
  • 佛山品牌网站建设湖南seo推广公司
  • 公司网站建设模块龙岗网站优化公司案例
  • 电子商务网站前台设计湖南建设工程网
  • 个人网站设计界面织梦怎么修改网站模板
  • 中小型企业网站优化价格陆家网站建设
  • 建设人行官方网站网站建设与维护 技能
  • wordpress搬家安装教程正规网站优化推广
  • 制作公众号网站开发北京seo百科
  • 茂名建站公司tk后缀网站是什么网站
  • 今科云平台网站建设地推拉新app推广怎么做
  • 辛集做网站备案系统新增网站
  • 淮南建网站公司描述网站开发的广告词
  • 千博企业网站管理系统2013wordpress模板不一样
  • 购物网站的搜索功能是怎么做的wordpress的文章写好后无法访问
  • 有个性的个人网站国内十大mcn公司
  • 嘉兴网站建设公司电话网站建设作业素材
  • 保定市建网站的公司东营做网站建设的公司
  • 做网站模板的海报尺寸多少百度网站公司信息推广怎么做的
  • 织梦系统网站首页空白网站是如何设计配置方案的
  • 开发网站的基本流程五个阶段网站服务器迁移
  • 青岛做网络推广的公司有哪些广州seo外包
  • 网站访客qq获取系统 报价用rp怎么做网站按钮下拉框
  • 怎么能看出别人的网站是哪一家做个人网页设计总结
  • 黑彩网站怎么建设云虚拟主机和网站建设
  • 找工程项目信息网站俄罗斯网站域名
  • 出口贸易公司网站怎么做wordpress有赞收款插件
  • 南沙高端网站建设怎么在ps做网站首页
  • 零代码自助建站平台全国分站seo