Open Leadrive opened 3 years ago
I have tested your example right now and everything works fine. May be it's a codec issue. Check what encoders your library supported and try different ones.
Sorry I don't know how to change the codec.
I follow the ReadMe ./configure --prefix=/usr/local/ffmpeg --enable-shared make make install
and copy the all the dll files to example directory.
After run video-to-image, it will report Resource temporarily unavailable.
I search the issues, change Decode()=>Decode2() it will work with tests-sample.mp4, but did not work for other videos.
frame, ret = ist.CodecCtx().Decode2(pkt)
if ret < 0 {
fmt.Printf("Unexpected error - %s\n", gmf.AvError(ret))
break
}
frames, err = gmf.DefaultRescaler(swsctx, []*gmf.Frame{frame})
if err != nil {
fmt.Printf("Error scaling - %s\n", err)
break
}
I tested it in Windows7, it take error. the same code and same videos, In Ubuntu 18.02, it work fine.
Well, possible issue might be the wrong destination path (in terms of Windows), default output path is ./tmp
this is linux specific.
thanks your reply. run with tests-sample.mp4, In the ./tmp path, it have the many result image files.
I now found the potential issue, see here.
Hi, I tested the video-to-image.go example in Windows 10, https://github.com/flutter/plugins/blob/master/packages/video_player/video_player/example/assets/Butterfly-209.mp4
this video will report Resource temporarily unavailable error. the tests-sample.mp4 will work ok.