What type of .avi video jmf plays?

主宰稳场 提交于 2019-12-08 12:42:23

I had a very similar project where I used jmf to play video file. I just used the .mov file. So I can suggest you about .mov. You may convert it later to .avi again.

Here is what you can do to play your .avi video in jmf, As far as I guess, this would work for all type of .avi videos. Your concern is to have a good quality video, it will give you a good quality video.

Here's the trick,

You first encode the video, whatever way you want to do it. You can set the bitrate, framerate everything the way you want to, the way you want to.

Try running the video with jmf, it may not run due to limited support of formats by jmf. Then encode it according to this site.

The same code would now run the video in jmf video player without any problem.

The same is what Robadob pointed too in the above answer,

ffmpeg -i input.avi -vcodec mjpeg -acodec pcm_s16be -ac 2 -y output.mov 

Yes, it gave me a terrible quality video, so encode it by giving a different bit rate,

ffmpeg -i input.avi -vcodec mjpeg -acodec pcm_s16be -ac 2 -y -b:v 5000k output.mov 

This would give you a better quality .mov video.

Hope this helps:).

http://www.oracle.com/technetwork/java/javase/formats-138492.html

avi is a container, it can hold video encoded in various different methods. Check this list for the formats which JMF can and can't decode.

According to; http://jeshua.me/blog/EncodingvideowithffmpegforJMF

ffmpeg -i input.mpg -vcodec mjpeg -acodec pcm_s16be -ac 2 -y ouput.mov 

Should work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!