-
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
How can I get one image file from video by per seconds? #118
Comments
@3d0c Can you help me? |
Hi, @hanluner To get a current intput stream duration in seconds (to get a current second) you can use currSec = pkt.Time(ist.TimeBase()) read this code snippet whithin the So, you've got a packet — you can count a current duration in seconds, then just skip extra packets you don't need to decode and dump. But, remember that not always |
@3d0c Thanks, I'll try. |
Hi, @3d0c |
It returns seconds, calculated according timebase and current packet func (p *Packet) Time(timebase AVRational) int {
return int(float64(timebase.AVR().Num) / float64(timebase.AVR().Den) * float64(p.Pts()))
} |
hi,
May I ask a question, How can I get image file from video by per seconds? Is there have any example code? Thank u very much. My English is very poor.
The text was updated successfully, but these errors were encountered: