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

very slow speed for ffmpeg'segment and hls ? #38

Open
akingbr opened this issue Sep 10, 2018 · 3 comments
Open

very slow speed for ffmpeg'segment and hls ? #38

akingbr opened this issue Sep 10, 2018 · 3 comments

Comments

@akingbr
Copy link

akingbr commented Sep 10, 2018

hello, I compile shiftmediaproject ok, then test hls segment, command likes:
ffmpeg.exe -i F:\web\express\testv\public\hls\ani.mp4 -codec:v libx264 -codec:a aac -map 0 -f ssegment -segment_format mpegts -segment_list F:\web\express\testv\public\hls\playlist.m3u8 -segment_wrap 5 -segment_time 5 F:\web\express\testv\public\hls\out%%03d.ts

or
ffmpeg.exe -i F:\web\express\testv\public\hls\ani.mp4 -c:v libx264 -c:a aac -strict -2 -f hls -hls_wrap 5 -hls_time 5 F:\web\express\testv\public\hls\playlist.m3u8

but when I preview m3u8 in browser , I found that video is blocked frequently; I notice that ts(segemnt)file was produced very slowly。 if I use ffmpeg complied by mingw, ts file was produced very fast, any suggestion?

thanks a lot。

@Sibras
Copy link
Member

Sibras commented Sep 10, 2018

This is potentially an issue with the FFmpeg code itself using different code paths when compiled with msvc than when compiled with mingw (this often occurs when the code uses a non standard gcc feature that is not natively supported by msvc). Although it could also be a difference due to ffmpeg being compiled using different libraries so first check to see if the mingw build you are comparing it to uses different libraries to this one.

Im not familiar enough with the hls code to know where the difference may be. So my suggestion would be to look in the used code for areas where the msvc compiled ffmpeg uses different code to the mingw one. Once that is identified then you can check in with the upstream ffmpeg coders for a potential fix.

@akingbr
Copy link
Author

akingbr commented Sep 11, 2018

thanks for replay so quickly, i check two compiled ffmpeg codes recently。 if something be found, i will tell you, thanks。

@oviano
Copy link

oviano commented Jan 1, 2019

Did you establish whether this was the segmenter being slow or the x264 encode? i.e. try the comparison just encoding to a simple mp4 file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants