bytedeco/javacv

Close avformat_find_stream_info()

Open

#1,409 opened on Apr 26, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

hello I am currently using version 1.5.3,avformat_find_stream_info () will execute for about 2 seconds.So i need to close avformat_find_stream_info().If I call grabber.start (false), I will get an error message:Did not find a video or audio stream inside "java.io.BufferedInputStream@3b424c84" for videoStream == -1 and audioStream == 2147483647.

I already know the information of some video sources, but I do n’t know how to use the information I know to make the program run normally after closing avformat_open_input ()。

Should I set the information I know here?

grabber.setVideoOption("vcodec", "copy"); grabber.setFormat("mpeg"); grabber.setPixelFormat(avutil.AV_PIX_FMT_YUV420P); grabber.setVideoCodec(avcodec.AV_CODEC_ID_H264); grabber.setAudioStream(Integer.MAX_VALUE); grabber.setFrameRate(25); grabber.setImageWidth(1280); grabber.setImageHeight(720);

If yes, what properties do I need to set to allow the program to execute normally? If not, where do I need to set up some video information I know?

I'm helpless about this, can you give me some help? thank you very much!

Contributor guide