社区
多媒体/流媒体开发
帖子详情
获取执行完av_write_frame之后的AVPacket数据
everything_at_once
2018-06-14 07:51:48
假设程序输入mp4文件,输出ts文件,代码完成封装格式转换,av_write_frame执行后便将转换后的数据写入文件中,这时候写入的已经是ts数据了,请问各位大神如果想将av_write_frame之后的ts数据获取到内存中,改如何操作?
...全文
1456
2
打赏
收藏
获取执行完av_write_frame之后的AVPacket数据
假设程序输入mp4文件,输出ts文件,代码完成封装格式转换,av_write_frame执行后便将转换后的数据写入文件中,这时候写入的已经是ts数据了,请问各位大神如果想将av_write_frame之后的ts数据获取到内存中,改如何操作?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
导弹头
2018-07-02
打赏
举报
回复
这个不需要呀,你可以在avio_alloc_context((unsigned char *) _decoder->ptr_out,OVT_DECODER_IO_TS_BUFFER_SZIE, 1, (void *) _decoder, NULL, _decoder_write, NULL);时,增加_decoder_write接口保存TS数据。
everything_at_once
2018-06-15
打赏
举报
回复
是不是只能更改ffmpeg源码了吧。
FFMpeg_SDK_开发手册.pdf
FFMpeg_SDK_开发手册 1.
数据
结构: (1)
AV
FormatContext (2)
AV
OutputFormat (3)
AV
InputFormat (4)
AV
CodecContext (5)
AV
Codec (6)
AV
Frame
(7)
AV
Packet
(8)
AV
Picture (9)
AV
Stream 2. 初始化函数: (1)
av
_register_all() (2)
av
codec_open() (3)
av
codec_close() (4)
av
_open_input_file() (5)
av
_find_input_format() (6)
av
_find_stream_info() (7)
av
_close_input_file() 3. 音视频编解码函数: (1)
av
codec_find_decoder() (2)
av
codec_alloc_
frame
() (3)
av
picture_get_size() (4)
av
picture_fill() (5) img_convert() (6)
av
codec_alloc_context() (7)
av
codec_decode_video() (8)
av
_free_
packet
() (9)
av
_free() 4. 文件操作: (1)
av
new_steam() (2)
av
_read_
frame
() (3)
av
_
write
_
frame
() (4) dump_format() 5. 其他函数: (1)
av
picture_deinterlace() (2) ImgReSampleContext()
FFMpeg SDK 开发手册
FFMpeg 中比较重要的函数以及
数据
结构如下: 1.
数据
结构: (1)
AV
FormatContext (2)
AV
OutputFormat (3)
AV
InputFormat (4)
AV
CodecContext (5)
AV
Codec (6)
AV
Frame
(7)
AV
Packet
(8)
AV
Picture (9)
AV
Stream 2. 初始化函数: (1)
av
_register_all() (2)
av
codec_open() (3)
av
codec_close() (4)
av
_open_input_file() (5)
av
_find_input_format() (6)
av
_find_stream_info() (7)
av
_close_input_file() 3. 音视频编解码函数: (1)
av
codec_find_decoder() (2)
av
codec_alloc_
frame
() (3)
av
picture_get_size() (4)
av
picture_fill() (5) img_convert() (6)
av
codec_alloc_context() (7)
av
codec_decode_video() (8)
av
_free_
packet
() (9)
av
_free() 4. 文件操作: (1)
av
new_steam() (2)
av
_read_
frame
() (3)
av
_
write
_
frame
() (4) dump_format() 5. 其他函数: (1)
av
picture_deinterlace() (2) ImgReSampleContext()
av
_
write
_
frame
与
av
_interle
av
ed_
write
_
frame
ffmpeg的 Mux 主要分为三步操作:
av
format_
write
_header: 写文件头。
av
_
write
_
frame
/
av
_interle
av
ed_
write
_
frame
: 写
packet
。
av
_
write
_trailer: 写文件尾。
av
_
write
_
frame
()用于输出一帧视音频
数据
,它的声明位于lib
av
format\
av
format.h,直接将包写进Mux,没有缓存和重新排序...
ffmpeg——
av
_
write
_
frame
/
av
_interle
av
ed_
write
_
frame
写文件包
一:介绍 1.1 ffmpeg 的 Mux 主要分为 三步操作:
av
format_
write
_header : 写文件头
av
_
write
_
frame
/
av
_interle
av
ed_
write
_
frame
: 写
packet
av
_
write
_trailer : 写文件尾 本文主要分析
av
_
write
_
frame
/
av
_interle
av
ed_wri
av
_
write
_
frame
与
av
_interle
av
ed_
write
_
frame
https://blog.csdn.net/wishfly/article/details/51783809
av
_
write
_
frame
与
av
_interle
av
ed_
write
_
frame
2016年06月29日 16:14:44 Tianyu-liu 阅读数:2563 1、函数介绍
av
_interle
av
ed_
write
_
frame
函数介绍: [cpp] view pl...
多媒体/流媒体开发
2,543
社区成员
20,281
社区内容
发帖
与我相关
我的任务
多媒体/流媒体开发
专题开发/技术/项目 多媒体/流媒体开发
复制链接
扫一扫
分享
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章