libvlc

简单的多屏播放器示例(vlc+qt)

强颜欢笑 提交于 2020-03-20 07:26:30
介绍 简单的多屏播放器 最多同时播放16个视频 支持本地文件和rtsp、rtmp等流媒体播放 VS2015工程,依赖Qt+VLC 练手作品 截图 下载 程序: download.csdn.net/detail/u014755412/9908787 源码: github.com/FutaAlice/QtPlayer 代码分析 IMediaPlayer是为规定接口的基类 提供了播放和控制的几个常用函数 其中打开媒体部分拆分为了OpenURL和OpenFile,并在cpp中实现 若为Windows环境,则对QFileDialog获取的路径进行替换 /******************************************************************* IMediaPlayer.h(接口类) 构造时传入QWidget* 调用OpenFile或OpenURL或Open打开文件并渲染窗体 *******************************************************************/ #ifndef IMEDIAPLAYER_H #define IMEDIAPLAYER_H class QWidget; class IMediaPlayer { public: IMediaPlayer(QWidget* pWidget);

vlc for android 字幕方块乱码

馋奶兔 提交于 2020-02-26 10:38:04
使用的手机是小米4c,MIUI7 6.1.7Beta。VLC 2.0.6。 VLC下载地址:http://get.videolan.org/vlc-android/2.0.6/ 加载中文字幕显示方块块的问题, 最好的方法是重新编译供个人使用。 根据之前在linux和windows上遇到的问题,是设置的字幕字体不支持中文,在android手机上也可以这样设置。 为了确保手机能正常使用,不覆盖/system/fonts中的字体文件,而采取修改libvlc.so中的字符串替换默认加载字体的方法。 1. 下载https://github.com/adobe-fonts/source-han-sans/blob/release/OTF/SimplifiedChinese/SourceHanSansSC-Normal.otf 2. 将SourceHanSansSC-Normal.otf重命名为DroidSans-Subt.ttf 3. 将文件放入/system/fonts,前提有root权限并且对system目录可写。(这里我使用幸运破解器突破系统对system目录的限制) 4. 将/data/app/org.videolan.vlc-1/lib/arm64/libvlc.so中的字符串DroidSans-Bold替换为DroidSans-Subt.(先进行备份) 方法有多种

WPF另类实现摄像头录像

…衆ロ難τιáo~ 提交于 2020-02-09 12:32:36
WPF中使用第三方控件来直接进行录像的控件没有找到(aforgenet好像不维护了?WPFMediaKit好像只能实现摄像头拍照。收费的控件没有使用,不做评论。) 通过百度(感谢:https://www.cnblogs.com/giserlong88/p/11244779.html),确定了可以通过FFmpeg+Nginx+Vlc.DotNet.Wpf可以实现摄像头的录像保存、录像预览(有延时),实现方案是,通过FFmpeg来实现录像并推送到Nginx搭建的rtmp流媒体服务器,然后WPF通过Vlc.DotNet.Wpf来拉取rtmp流服务器的内容来实现视频预览。 具体代码如下: 首先去下载FFmpeg(http://ffmpeg.org/download.html),Nginx(http://nginx.org/en/download.html),Nuget上引用Vlc.DotNet.Wpf,下载其所需要的libvlc播放器 nginx-win-rtmp.conf配置文件内容如下: #user nobody; # multiple workers works ! worker_processes 2; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log

Is there a way to get LibVlc loaded buffer percentage?

ぃ、小莉子 提交于 2020-02-05 06:42:17
问题 I'm currently making a city webcam app which uses libVlc to display the rtsp stream coming from the city webcams. My question is, it is possible to get the actual loaded state of the stream? I would like to show to the user. I can see in Android Studio runLog that there is some kind of buffering but cannot find in the code. D/VLC: core input: Buffering 56% D/VLC: core input: Buffering 58% D/VLC: core input: Buffering 61% D/VLC: core input: Buffering 64% D/VLC: core input: Buffering 66% D/VLC:

LibVLC empty image

感情迁移 提交于 2020-01-17 05:46:25
问题 I'm trying to use LibVLC to decode a video file and render it to a texture. The code for opening and start playing works, the audio plays perfectly, but the pixel buffer is always filled with 0xCD. The videos I try to render work on VLC, and even in a C# implementation I did they work, but with this new code in C I can't manage to get it working... I'm using the x64 version of the vlc libs and the program is compiled for x64 if this makes any difference. Here is my code: #include "stdafx.h"

Open mp4 with libVLC and play it in OpenCV C++

半腔热情 提交于 2020-01-16 19:40:33
问题 I want to play video file, that i obtained from IP-camera (H264-codec) using libVLC and OpenCV, so i took the code from this post, then created project in VS 2010, and put my mp4 file into project folder ("5.mp4"). When i started it - i got this errors: main error: open of `5.mp4' failed main error: Your input can't be opened main error: VLC is unable to open the MRL '5.mp4'. Check the log for details. Here's my code: #include <vlc/vlc.h> #include <opencv2/opencv.hpp> #include <opencv2

Open mp4 with libVLC and play it in OpenCV C++

青春壹個敷衍的年華 提交于 2020-01-16 19:40:15
问题 I want to play video file, that i obtained from IP-camera (H264-codec) using libVLC and OpenCV, so i took the code from this post, then created project in VS 2010, and put my mp4 file into project folder ("5.mp4"). When i started it - i got this errors: main error: open of `5.mp4' failed main error: Your input can't be opened main error: VLC is unable to open the MRL '5.mp4'. Check the log for details. Here's my code: #include <vlc/vlc.h> #include <opencv2/opencv.hpp> #include <opencv2

Looping an MP4 video

丶灬走出姿态 提交于 2020-01-16 07:49:11
问题 I need to interface with a piece of hardware that is expecting an MPEG-4 RTP stream from a camera (actually multiple streams from multiple different cameras). What we'd like to do is supply that video from a set of small .mp4 files, looped endlessly. 1 What I'm trying right now is to use libVLC in server mode, with the "--loop" argument. The code for this looks like the following: libvlc_vlm_add_broadcast(vlc, "test", ("file:///" + video).c_str(), "#rtp{dst=localhost,port=1234,sdp=rtsp:/

How to stream video using C/C++

坚强是说给别人听的谎言 提交于 2020-01-14 05:56:09
问题 I want to stream video to a file/ or memory buffer using VC++ on windows. Can anyone suggest easy to integrate library?(that has one H,one LIB and one DLL). I am exploring the libVLC right now and gonna explore FFMPEG also. dont want to spend time in building these complex software fully myself, would appreciate any help/pointer/ references. My ultimate goal is to stream a video and consume the stream on HTML5 viewer. I tried streaming using VLC media player and streamed to a OGG file, I used

Use libvlc to stream mp3 to network

南楼画角 提交于 2020-01-13 19:24:09
问题 How can I use libvlc to take an MP3 file (or really any audio file) and stream it to the network so I can connect with iTunes or something and listen like internet radio? C API example is preferred, though any language is fine. 回答1: libvlc_vlm_add_broadcast accepts an sout string, so this seems to do the trick: #include <vlc/libvlc.h> #include <unistd.h> #include <stdbool.h> #include <stddef.h> int main(int argc, char **argv) { libvlc_instance_t *vlc; const char *url; const char *sout = "