码迷,mamicode.com
首页 > 其他好文 > 详细

ffmpeg函数03__av_seek_frame()

时间:2019-09-05 23:30:37      阅读:94      评论:0      收藏:0      [点我收藏+]

标签:video   backward   timestamp   ros   ping   mil   soft   not   add   

当需要把视频跳转到N秒的时候可以使用下面的方法:
int64_t timestamp = N * AV_TIME_BASE; 
av_seek_frame(fmtctx, index_of_video, timestamp, AVSEEK_FLAG_BACKWARD);

 

 

av_get_channel_layout_nb_channels()和av_get_default_channel_layout()

这些函数可以得到channels和channellayout的转换。
libavutil中的audioconvert.c定义channellayout和channels的相关map:
channel_layout_map[]
{ "mono", 

 

     1,  AV_CH_LAYOUT_MONO},
    { "stereo",    2,  AV_CH_LAYOUT_STEREO},
    { "2.1",      3,  AV_CH_LAYOUT_2POINT1},
    { "3.0",      3,  AV_CH_LAYOUT_SURROUND},
  ...

 

ffmpeg函数03__av_seek_frame()

标签:video   backward   timestamp   ros   ping   mil   soft   not   add   

原文地址:https://www.cnblogs.com/xpylovely/p/11470279.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!