简体   繁体   English

如何使用 RTSP 在 Java Swing 中播放 mp4 格式的视频

[英]How to play video of mp4 Format in Java Swing using RTSP

I am using JAVA SWING to implement a video application which can handle MP4 and MJPEG video formats.我正在使用 JAVA SWING 来实现一个可以处理 MP4 和 MJPEG 视频格式的视频应用程序。 I can play MJPEG video format but can't play MP4 videos.我可以播放 MJPEG 视频格式,但不能播放 MP4 视频。 Do you have some advice that what changes i need to make in this code, so that MP4 videos can also be handled.您对我需要在此代码中进行哪些更改有一些建议,以便也可以处理 MP4 视频。 video player in JAVA using RTSP 使用 RTSP 的 JAVA 视频播放器

VLCJ and OpenCV both offer out of the box connection to RTSP streams. VLCJ 和 OpenCV 都提供到 RTSP 流的开箱即用连接。 They can be displayed in JPanels live.它们可以实时显示在 JPanels 中。 OpenCV is easier but way overkill for image processing and VLCJ simply just creates a VLC player instance in a panel. OpenCV 更容易,但对于图像处理来说太过分了,而 VLCJ 只是在面板中创建一个 VLC 播放器实例。

This question is old but I recently ran into the same problem and hope people find this helpful.这个问题很老,但我最近遇到了同样的问题,希望人们觉得这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM