http://blog.csdn.net/wfqxx/article/details/5497138

1. 视频时间戳
    pts = inc++ *(1000/fps);  其中inc是一个静态的,初始值为0,每次打完时间戳inc加1.
    在ffmpeg,中的代码为
    pkt.pts= m_nVideoTimeStamp++ * (m_VCtx->time_base.num * 1000 / m_VCtx->time_base.den);

2. 音频时间戳
   pts = inc++ * (frame_size * 1000 / sample_rate)
   在ffmpeg中的代码为
   pkt.pts= m_nAudioTimeStamp++ * (m_ACtx->frame_size * 1000 / m_ACtx->sample_rate);

相关文章:

  • 2021-12-10
  • 2022-01-04
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
相关资源
相似解决方案