Comments (7)
sorry. i can't get the point of ’multiple calls‘, In which scenario, writeMoov is called multiple times?
from gomedia.
in my case i was writing init segment with Movmuxer.WriteInitSegment
function in different file and then Movmuxer.Write
is internally calling Movmuxer.writeMoov
from gomedia.
in your case ,fmp4 is used for hls ? and do you create mov muxer with MP4_FLAG_FRAGMENT ?
if you use MP4_FLAG_FRAGMENT , you should not call the WriteInitSegment function, mp4 library write moov box Automatically
from gomedia.
in your case ,fmp4 is used for hls ?
Yes
do you create mov muxer with MP4_FLAG_FRAGMENT ?
Yes
mp4 library write moov box Automatically
it writes moov box but its only writing in first segment. maybe in this case OnFragment callback will be helpful so on first OnFragment callback we can save it to init fragment and rest is for fmp4
from gomedia.
you should use MP4_FLAG_DASH flag for hls. refer to hls fmp4
for hls,the best way is to save moov box in EXT-X-MAP, write moov into every segment is unnecessary
from gomedia.
gomedia/example/example_convert_flv_to_hls_fmp4.go
Lines 78 to 83 in bc994fe
the example code also calls muxer.WriteInitSegment which may lead to this error too
from gomedia.
muxer, err = mp4.CreateMp4Muxer(mp4file, mp4.WithMp4Flag(mp4.MP4_FLAG_DASH))
if mp4 muxer is created with MP4_FLAG_DASH , the writeMoov
function will not been called in mp4 library.
so writeMoov
is only called when you call WriteInitSegment
,it won't trigger multiple calls
from gomedia.
Related Issues (20)
- Writing H265 stream to MP4 fails (on some RTSP streams) HOT 4
- go-mp4: Movmuxer.Write error
- go-mp4: Movmuxer.Write: flushFragment should be called more often HOT 1
- PIFF encryption HOT 2
- mp4.CreateMp4Demuxer: support io.Reader HOT 2
- mp4: read segment without init HOT 5
- 关于使用go-media实现不间断推流多个视频文件 HOT 6
- fmp4 to mp4 HOT 2
- 新手问题: 我想把视频和声音分开推流, 视频一个文件,声音一个一个文件,整合到一起 请问我该怎么做 HOT 1
- 关于动态加载mp4视频推流到rtmp,切换卡顿的问题 HOT 13
- 可以直接把rtsp拉流并推到rtmp服务吗 HOT 6
- 如何将h264流或者h264文件封装成flv HOT 3
- 网站在正常视频的ts列表中加入了几个ts广告,使用gomedia合并正常视频、广告就会出现最终输出结果无法播放的情况 HOT 9
- Example to convert mp4 to TS HOT 3
- merge two mp4 files into ts. HOT 8
- high ram usage HOT 4
- 怎么将PCM转成AAC?有大佬知道怎么转吗? HOT 1
- 求助大佬,没有psm时默认能接受视频吗?
- Add subtitle support for MP4
- Process of merging mp4 files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gomedia.