Giter Site home page Giter Site logo

hls录制时间戳问题 about lal HOT 3 OPEN

yh4922 avatar yh4922 commented on June 27, 2024
hls录制时间戳问题

from lal.

Comments (3)

q191201771 avatar q191201771 commented on June 27, 2024

fragment_duration_ms设置的间隔,是数据内时间戳的时间间隔,
文件名中的字段,是现实时间,
如果数据的发送速度快,远大于数据内时间戳的时间间隔,那么可能会出现这种情况。

from lal.

yh4922 avatar yh4922 commented on June 27, 2024

想请教一个问题 我因为业务上的需求需要把m3u8格式化成下面的格式

我现在的方式是开启LAL的 cleanup_mode = 2 的录制模式 然后我实时读取playlist.m3u8文件解析最新的片段信息

#EXTINF:3.597,
rtsp_192_168_18_103_live_fall1-1698910754482-2.ts

因为业务的需求需要把m3u8文件格式化成下面这种格式

#${片段时间}.ts,${开始时间},${结束时间}
2023-11-02-12.04.03.ts,0.000000,10.790000
2023-11-02-12.04.14.ts,10.790000,21.578999
.....
2023-11-02-13.38.01.ts,5638.600586,5649.390625
2023-11-02-13.38.12.ts,5649.390625,5660.179688
# 如果中途录像有中断会重新开始计时
2023-11-02-13.36.07.ts,0.000000,10.790000  
2023-11-02-13.36.18.ts,10.790000,21.578999

新生成的片段时间我是用上一个片段的时间累加上片段的duration得到的

这种方式有个问题 我录制了一天之后 我累加的时间会比当前时间慢5个小时左右

from lal.

yh4922 avatar yh4922 commented on June 27, 2024

想请教一个问题 我因为业务上的需求需要把m3u8格式化成下面的格式

我现在的方式是开启LAL的 cleanup_mode = 2 的录制模式 然后我实时读取playlist.m3u8文件解析最新的片段信息

#EXTINF:3.597,
rtsp_192_168_18_103_live_fall1-1698910754482-2.ts

因为业务的需求需要把m3u8文件格式化成下面这种格式

#${片段时间}.ts,${开始时间},${结束时间}
2023-11-02-12.04.03.ts,0.000000,10.790000
2023-11-02-12.04.14.ts,10.790000,21.578999
.....
2023-11-02-13.38.01.ts,5638.600586,5649.390625
2023-11-02-13.38.12.ts,5649.390625,5660.179688
# 如果中途录像有中断会重新开始计时
2023-11-02-13.36.07.ts,0.000000,10.790000  
2023-11-02-13.36.18.ts,10.790000,21.578999

新生成的片段时间我是用上一个片段的时间累加上片段的duration得到的

这种方式有个问题 我录制了一天之后 我累加的时间会比当前时间慢5个小时左右

我在pkg/hls/muxer.go调试发现,会同时创建3个片段 3个片段的生成时间是一样的 不知道是不是这个原因

from lal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.