Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not append initialization segment to source buffer #173

Open
quanhoang288 opened this issue Dec 18, 2021 · 7 comments
Open

Could not append initialization segment to source buffer #173

quanhoang288 opened this issue Dec 18, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@quanhoang288
Copy link

Bug Description

I'm cloning this project and making use of the streamer class for VOD streaming but could not append initialization segment to source buffer. I think my encoding and generating dash segments has some problems since i was following another tutorial to generate dash segemtns. Could you provide the ffmpeg commands used for segmenting the original video and generate MPD file ?
I've been stuck on this problem for 2 days without any solution. I'd appreciate it if you could share the ffmpeg commands. Thanks in advance!

@quanhoang288 quanhoang288 added the bug Something isn't working label Dec 18, 2021
@derekherman
Copy link
Collaborator

@dero could you please provide Quân with a few examples of the commands you’re using to generate the manifests when you’re back online.

@quanhoang288
Copy link
Author

@derekherman I was following this tutorial to generate 3 different representations. I dont have much experience with video encoding so I just pretty much copied the script

Here's the link to the tutorial:
https://blog.infireal.com/2018/04/mpeg-dash-with-only-ffmpeg/

Here's the generated ffmpeg command for segmenting into chunks and generating manifest file:

ffmpeg -i D:\Hoc Tap\Project III\VideoStreaming\react-node-video-streaming\server\tmp\file_example_MP4_1920_18MG-
1639910101254\file_example_MP4_1920_18MG-1639910101255.mp4 -y -acodec aac -ac 2 -ar 44100 -vcodec libx264 -f dash 
-preset veryfast -keyint_min 60 -g 60 -sc_threshold 0 -profile:v main -use_template 1 -use_timeline 1 -b_strategy 0 -bf 1 -map 
0:a? -b:a 96k -filter_complex [0]format=pix_fmts=yuv420p[temp0];[temp0]scale=-2:240[A0] -map [A0]:v -b:v:0 350k 
-filter_complex [0]format=pix_fmts=yuv420p[temp1];[temp1]scale=-2:480[A1] -map [A1]:v -b:v:1 700k 
-filter_complex [0]format=pix_fmts=yuv420p[temp2];[temp2]scale=-2:720[A2] -map [A2]:v -b:v:2 2500k 
D:\Hoc Tap\Project III\VideoStreaming\react-node-video-streaming\server\tmp\file_example_MP4_1920_18MG-1639910101254\file_example_MP4_1920_18MG-1639910101255.mpd

I honestly don't understand most of the things inside the command and just managed to run and generate the segments and manifest which I thought would run. Maybe there's something wrong with this command ? I'd be best if you could share some sample commands to correctly generate the segments and manifest :D

@quanhoang288
Copy link
Author

@derekherman i'm really sorry if i keep asking for ffmpeg commands that you used but i really need them now to have a look since i'm doing a school project and the deadline is about to be due :( The streaming part is the core part of my project so I managed to set up everything but could not load chunk to the buffer. I'd very much appreciate it if you could provide (or ask s.o handling this part) some examples of the commands soon. Thank you for replying my issue!

@dero
Copy link
Collaborator

dero commented Dec 20, 2021

@quanhoang288 The commands used to generate the sample videos are a part of the posts that explain streaming:

See the "Example FFmpeg command" section in both of those posts. Do those help?

@quanhoang288
Copy link
Author

quanhoang288 commented Dec 20, 2021

@dero thanks a lot, i'll check it out and see if it works xD

@quanhoang288
Copy link
Author

quanhoang288 commented Dec 24, 2021

@dero I'm sorry for bothering again but it didn't seem to work for me. I was able to encode the video but it throws this error when trying to load the initialization segment to the buffer:
image
When I use the media tool in Chrome it gives me this error:
Invalid top-level ISO BMFF box type 0xbfbd6d6f
Could you give me some insights on this ? Thank you

@quanhoang288
Copy link
Author

@derekherman could you help me take a look at the problem for a bit ? I reference kino generated manifests and they look similar to mine but somehow it still didnt work. Any insight would be appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants