gmf icon indicating copy to clipboard operation
gmf copied to clipboard

Windows10, Resource temporarily unavailable

Open Leadrive opened this issue 4 years ago • 5 comments

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.

Leadrive avatar Jan 10 '21 13:01 Leadrive

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.

3d0c avatar Jan 10 '21 14:01 3d0c

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.

Leadrive avatar Jan 10 '21 14:01 Leadrive

Well, possible issue might be the wrong destination path (in terms of Windows), default output path is ./tmp this is linux specific.

3d0c avatar Jan 10 '21 14:01 3d0c

thanks your reply. run with tests-sample.mp4, In the ./tmp path, it have the many result image files.

Leadrive avatar Jan 10 '21 14:01 Leadrive

I now found the potential issue, see here.

debugger-zhang avatar Jan 10 '24 02:01 debugger-zhang