-
Notifications
You must be signed in to change notification settings - Fork 169
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
Multi-threaded decoding #125
Comments
Hi, @SpaceInvader61
|
Hi, @3d0c ! Thank you for the fast response For simplicity, I tried to use your examples of video-to-goImage(I removed the save image part) and added SetThreadCount to all possible places there So, what am I missing? |
@SpaceInvader61 |
@3d0c Thank you! |
Well, you can try to define count of thread vi codec, err := gmf.FindEncoder(extention)
if err != nil {
log.Fatalf("%s\n", err)
}
options := []*gmf.Option{
{"threads", 8},
}
cc := gmf.NewCodecCtx(codec, options) |
I tried to do what you suggested in the video-to-goImage example, but it is still only using one thread |
Hm, that is strange. I checked it out and everything worked. I recheck it later.
…-------- Original Message --------
On Apr 3, 2020, 18:46, Space Invader wrote:
***@***.***(https://github.com/3d0c)
I tried to do what you suggested in the video-to-goImage example, but it is still only using one thread
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#125 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAWCGGQHJ5TU3NZMOORVVQDRKYAFZANCNFSM4L3LEGSQ).
|
Oh, actually, I got confused with a different context in the example So, probably I just didn't get it right - where is the place I should pass this option? Because it seems like I need to pass it to the inner videoStream Codec? Thank you! |
Ok. you've got 4 (a least) contexts:
I've provided a complete snippet, which you can just replace lines 57-66 and it should work. |
You mean 57-66 in stream.go , right? |
Oops, sorry, looks like i've got another codebase |
Yeah, that's what I mean - this one is used for Encoding, isn't it? And to do the same for Decoding I'll have to change the context inside the "ist" object |
Actually, no. You did (libav did) multy-hreadnig for decoding, not for encoding (you can see it by debugging ffmpeg) - it doesn't. So, setup threads for decoding and forget about encoding. |
Hi!
Is it possible to do a multi-threaded decoding?
I see you had a commit related to that ~10 month ago, does it mean it is not implemented yet?
It yes, are there plans to implement this feature?
The text was updated successfully, but these errors were encountered: