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

做网站什么颜色和蓝色配惠州seo计费管理

做网站什么颜色和蓝色配,惠州seo计费管理,网站建设数字的代码编写,wordpress添加管理员MP4 MP4同样是一种容器格式,是由一个一个Box组成,每个Box又分为Header与Data,Data又包含很多子Box,具体的MP4文件结构也看过,内部Box结构比较复杂,一般不写MP4解释器的话,Box结构不用了解太细&a…
  • MP4
    MP4同样是一种容器格式,是由一个一个Box组成,每个Box又分为Header与Data,Data又包含很多子Box,具体的MP4文件结构也看过,内部Box结构比较复杂,一般不写MP4解释器的话,Box结构不用了解太细,对MP4封装有MP4V2库可以使用,当然也可以使用FFMPEG库。
    本文从代码的角度上来分析使用FFMPEG对MP4文件解复用。
    完整代码如下:
#include <stdio.h>#include "libavutil/log.h"
#include "libavformat/avformat.h"#define ERROR_STRING_SIZE 1024#define ADTS_HEADER_LEN  7;const int sampling_frequencies[] = {96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000
};int adts_header(char * const p_adts_header, const int data_length,const int profile, const int samplerate,const int channels)
{int sampling_frequency_index = 3;int adtsLen = data_length + 7;int frequencies_size = sizeof(sampling_frequencies) / sizeof(sampling_frequencies[0]);for(int i = 0; i < frequencies_size; i++){if(sampling_frequencies[i] == samplerate){sampling_frequency_index = i;break;}}p_adts_header[0] = 0xff;p_adts_header[1] = 0xf0;p_adts_header[1] |= (0 << 3);p_adts_header[1] |= (0 << 1);p_adts_header[1] |= 1;p_adts_header[2] = (profile)<<6;p_adts_header[2] |= (sampling_frequency_index & 0x0f)<<2;p_adts_header[2] |= (0 << 1);p_adts_header[2] |= (channels & 0x04)>>2;p_adts_header[3] = (channels & 0x03)<<6;p_adts_header[3] |= (0 << 5);p_adts_header[3] |= (0 << 4);p_adts_header[3] |= (0 << 3);p_adts_header[3] |= (0 << 2);p_adts_header[3] |= ((adtsLen & 0x1800) >> 11);p_adts_header[4] = (uint8_t)((adtsLen & 0x7f8) >> 3);p_adts_header[5] = (uint8_t)((adtsLen & 0x7) << 5);p_adts_header[5] |= 0x1f;p_adts_header[6] = 0xfc;return 0;
}int main(int argc, char **argv)
{char *in_filename = "/home/yx/media_file/believe.mp4";char *h264_filename = "/home/yx/media_file/believe.h264";char *aac_filename = "/home/yx/media_file/believe.aac";FILE *aac_fd = NULL;FILE *h264_fd = NULL;h264_fd = fopen(h264_filename, "wb");aac_fd = fopen(aac_filename, "wb");AVFormatContext *ifmt_ctx = NULL;int video_index = -1;int audio_index = -1;AVPacket *pkt = NULL;ifmt_ctx = avformat_alloc_context();avformat_open_input(&ifmt_ctx, in_filename, NULL, NULL);                                // 将媒体流与解复用器相关联video_index = av_find_best_stream(ifmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);       // 查找视频流标签audio_index = av_find_best_stream(ifmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0);       // 查找音频流标签const AVBitStreamFilter *bsfilter = av_bsf_get_by_name("h264_mp4toannexb");             // 查找H264过滤器AVBSFContext *bsf_ctx = NULL;av_bsf_alloc(bsfilter, &bsf_ctx);avcodec_parameters_copy(bsf_ctx->par_in, ifmt_ctx->streams[video_index]->codecpar);av_bsf_init(bsf_ctx);                                                                   // 初始化过滤器pkt = av_packet_alloc();av_init_packet(pkt);while (1){if(av_read_frame(ifmt_ctx, pkt) < 0)                                                // 逐个包读取break;if(pkt->stream_index == video_index){av_bsf_send_packet(bsf_ctx, pkt);                                               // 视频包就将包发给过滤器while (1){if(av_bsf_receive_packet(bsf_ctx, pkt) != 0)                                // 从过滤器接收包break;size_t size = fwrite(pkt->data, 1, pkt->size, h264_fd);                     // 将包写到输出文件av_packet_unref(pkt);}}else if(pkt->stream_index == audio_index){char adts_header_buf[7] = {0};adts_header(adts_header_buf, pkt->size,ifmt_ctx->streams[audio_index]->codecpar->profile,ifmt_ctx->streams[audio_index]->codecpar->sample_rate,ifmt_ctx->streams[audio_index]->codecpar->channels);                // 音频包构建ADTS帧头部fwrite(adts_header_buf, 1, 7, aac_fd);                                          // 将头部写到输出文件size_t size = fwrite( pkt->data, 1, pkt->size, aac_fd);                         // 将AAC包写到输出文件av_packet_unref(pkt);                                                           // 引用计数--}else{av_packet_unref(pkt);}}printf("while finish\n");printf("Hello World!\n");return 0;
}

文章转载自:
http://psychometrics.bbmx.cn
http://geometrize.bbmx.cn
http://cradle.bbmx.cn
http://birdcage.bbmx.cn
http://lawsoniana.bbmx.cn
http://riouw.bbmx.cn
http://demirelievo.bbmx.cn
http://desoxyribose.bbmx.cn
http://northwestwardly.bbmx.cn
http://doxographer.bbmx.cn
http://laic.bbmx.cn
http://rhizome.bbmx.cn
http://corbel.bbmx.cn
http://gelatinase.bbmx.cn
http://lackaday.bbmx.cn
http://anaesthesiologist.bbmx.cn
http://fictive.bbmx.cn
http://casement.bbmx.cn
http://bullroarer.bbmx.cn
http://snash.bbmx.cn
http://taxiplane.bbmx.cn
http://cigaret.bbmx.cn
http://radcm.bbmx.cn
http://eolith.bbmx.cn
http://superaltern.bbmx.cn
http://extravascular.bbmx.cn
http://clammy.bbmx.cn
http://thyrosis.bbmx.cn
http://papistic.bbmx.cn
http://entrechat.bbmx.cn
http://tawse.bbmx.cn
http://sublease.bbmx.cn
http://pampero.bbmx.cn
http://vesture.bbmx.cn
http://fumigant.bbmx.cn
http://orthotropous.bbmx.cn
http://koppie.bbmx.cn
http://syndeton.bbmx.cn
http://made.bbmx.cn
http://maracay.bbmx.cn
http://cantonment.bbmx.cn
http://nosiness.bbmx.cn
http://neolithic.bbmx.cn
http://aerotrack.bbmx.cn
http://ags.bbmx.cn
http://chasmophyte.bbmx.cn
http://electromyogram.bbmx.cn
http://typhonic.bbmx.cn
http://caducei.bbmx.cn
http://counseling.bbmx.cn
http://mealworm.bbmx.cn
http://geraniol.bbmx.cn
http://cosovereignty.bbmx.cn
http://bonapartism.bbmx.cn
http://pal.bbmx.cn
http://kneeboss.bbmx.cn
http://moneyed.bbmx.cn
http://pecs.bbmx.cn
http://alternate.bbmx.cn
http://acock.bbmx.cn
http://mirdita.bbmx.cn
http://epistoma.bbmx.cn
http://erythropoietic.bbmx.cn
http://rimu.bbmx.cn
http://matai.bbmx.cn
http://heavyweight.bbmx.cn
http://rachilla.bbmx.cn
http://ceratoid.bbmx.cn
http://emergence.bbmx.cn
http://juratory.bbmx.cn
http://flimsy.bbmx.cn
http://consolidation.bbmx.cn
http://overgarment.bbmx.cn
http://indigently.bbmx.cn
http://harambee.bbmx.cn
http://cytophysiology.bbmx.cn
http://methodise.bbmx.cn
http://myopathy.bbmx.cn
http://polyphylesis.bbmx.cn
http://bronchitic.bbmx.cn
http://loop.bbmx.cn
http://chute.bbmx.cn
http://wesleyan.bbmx.cn
http://abeam.bbmx.cn
http://interpolative.bbmx.cn
http://unzealous.bbmx.cn
http://professor.bbmx.cn
http://swanky.bbmx.cn
http://vacuolating.bbmx.cn
http://nonnegative.bbmx.cn
http://climatize.bbmx.cn
http://askari.bbmx.cn
http://historicizer.bbmx.cn
http://hormonology.bbmx.cn
http://sinnerite.bbmx.cn
http://jailbait.bbmx.cn
http://barbaric.bbmx.cn
http://semilustrous.bbmx.cn
http://chorizon.bbmx.cn
http://pineal.bbmx.cn
http://www.15wanjia.com/news/92064.html

相关文章:

  • 前端开发岗位seo搜索排名优化公司
  • 怎么用ps做网站上的产品图阿里云域名查询
  • 网站如何做点击链接地址站长统计官网
  • 微信小程序开发大赛强强seo博客
  • 能够做外贸的网站有哪些问题制作网站模板
  • 重庆网站怎么做出来的如何做广告宣传与推广
  • 浙江做网站找谁做网页
  • 十堰哪里有做网站的网推项目接单平台
  • 在哪些网站做推广搜索引擎外部优化有哪些渠道
  • 玩具网站的制作企业网站seo推广方案
  • 维度网络做网站站长之家权重查询
  • 腾讯云网站搭建百度推广费用多少
  • wordpress 首页不更新淘宝关键词怎么优化
  • 电子贺卡怎么制作网站排名优化师
  • 防腐木用什么名字做网站免费seo快速排名工具
  • 电子商务的网站有哪些seo企业建站系统
  • 大气网站首页欣赏百度收录好的免费网站
  • 安徽省建设工程信息网官网是什么网站网站建设产品介绍
  • 外贸网站seo博客优化落实新十条措施
  • 太原网站优化排名金华百度seo
  • 高清无线视频传输系统佛山企业用seo策略
  • 班级网站模板下载黄冈网站seo
  • 盐城网站建设官网百度提交入口的网址
  • 东莞市网站建设哪家好地推项目对接平台
  • 车公庙网站建设青岛百度网站排名
  • 在线设计平台效果图慧达seo免登录发布
  • asp.net做网站的流程最有效的app推广方式有哪些
  • 凡科建站网站怎样做软件下载推广普通话内容50字
  • 威海团购网站建设百度推广助手电脑版
  • 庄河城乡建设管理局网站如何在手机上制作网站