vlc

android vlc rtsp

空扰寡人 提交于 2020-01-16 16:10:36
/** * created by XuTi on 2019/5/20 14:00 */ public class VlcModel { private static final String TAG = VlcModel.class.getSimpleName(); private LibVLC mLibVLC; private MediaPlayer mMediaPlayer; private String mUriString; private SurfaceView mSurfaceView = null; private MediaPlayer.EventListener mEventListener; private int mPortraitDisplayWidth; private int mPortraitDisplayHeight; private int mLandscapeDisplayWidth; private int mLandscapeDisplayHeight; public VlcModel(String uriString,MediaPlayer.EventListener eventListener) { mUriString = uriString; mEventListener = eventListener; } private void

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:/

Open Video file in VLC through Python

六眼飞鱼酱① 提交于 2020-01-15 06:07:34
问题 import subprocess import os print os.path.exists("C:/Users/Dhruv/Desktop/Motivation/RiseShine.mp4") p = subprocess.Popen(["C:/Program Files (x86)/VideoLAN/VLC/vlc.exe","C:/Users/Dhruv/Desktop/Motivation/RiseShine.mp4"]) The code above is to open a video file in VLC player using python. The VLC player opens up, but does not run the video. I have checked the video location, it is correct. Can somebody tell me how to make this work? 回答1: This worked for me (Python 3.4): p = subprocess.Popen(["C:

Open Video file in VLC through Python

…衆ロ難τιáo~ 提交于 2020-01-15 06:07:22
问题 import subprocess import os print os.path.exists("C:/Users/Dhruv/Desktop/Motivation/RiseShine.mp4") p = subprocess.Popen(["C:/Program Files (x86)/VideoLAN/VLC/vlc.exe","C:/Users/Dhruv/Desktop/Motivation/RiseShine.mp4"]) The code above is to open a video file in VLC player using python. The VLC player opens up, but does not run the video. I have checked the video location, it is correct. Can somebody tell me how to make this work? 回答1: This worked for me (Python 3.4): p = subprocess.Popen(["C:

前段播放 流媒体(RTMP,RTSP,HLS)

一个人想着一个人 提交于 2020-01-14 08:57:01
前言 最近项目需要流媒体的播放,后端一共提供了 三种流数据(RTSP,RTMP,HLS),在不同的场景可能会使用到不同方式播放,就需要做到适配, 支持所有的流数据播放。花了一段时间研究,在这里和大家分享一下,还有些遗留问题,看大家有没有好的方法。 RTSP 简介 这种协议流数据前段播放,没有特别好的解决方法,需要在本机装一个vlc 插件,依靠这个插件才能让 RTSP 协议 在网页上能播放,但是目前高版本的 Chrome 浏览器不支持 NPAPI 插件,也就是说高版本的 Chrome 浏览器还是不能播放(46 以上的版本都不行)。 html code <object type='application/x-vlc-plugin' id='vlc' width="200" height="500" events='True' pluginspage="http://www.videolan.org" codebase="http://downloads.videolan.org/pub/videolan/vlc-webplugins/2.0.6/npapi-vlc-2.0.6.tar.xz"> <param name='mrl' value='rtsp://***********************/Streaming/Channels/1' /> <param name=

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 = "

VLC视频播放插件的使用

自古美人都是妖i 提交于 2020-01-13 15:02:53
首先不得不承认,VLC是一款非常牛逼的视频播放插件,支持格式N多。但是集成到web上,尤其是google上网上资源很少,我是众里千百度,看各种文档。终于找到了,小嘿一下: 1)、下载VLC应用程序vlc-2.1.3-win32.exe,官方默认集成IE和火狐插件,唯独没有google,没办法找办法 2)、在google应用开发中心找VLC,VLC media PLay 3)、有没有成功自己可以写代码测试 <div id="scrollDiv"> <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab" id='vlc-parent'> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="320" height="240" autoplay="false" id="vlc" name="vlc" target="upload/<s:property value="storePath"/>">

vlc时钟控制

时光毁灭记忆、已成空白 提交于 2020-01-12 08:46:08
1.获取系统时钟 posix标准中相关选项定义了时钟可选单调或者系统实时作为参考 1.1posix标准时钟id获取   posix选项中的_POSIX_TIMERS支持的情况下是可以通过时钟id来方便进程获取准确的时间参数,其中CLOCK_REALTIME对应的时钟为挂墙时钟(wall clock),是跟随系统时间一起变化的;CLOCK_MONOTONIC则是单调时钟,不会因为设置的系统时钟改变而变化,记录的是系统重启到此的间隔。 #if !defined (_POSIX_TIMERS) # define _POSIX_TIMERS (-1) #endif #if !defined (_POSIX_CLOCK_SELECTION) /* Clock selection was defined in 2001 and became mandatory in 2008. */ # define _POSIX_CLOCK_SELECTION (-1) #endif #if !defined (_POSIX_MONOTONIC_CLOCK) # define _POSIX_MONOTONIC_CLOCK (-1) #endif #if (_POSIX_TIMERS > 0) static unsigned vlc_clock_prec; # if (_POSIX_MONOTONIC

用vlc搭建简单流媒体服务器(UDP和TCP方式)

…衆ロ難τιáo~ 提交于 2020-01-12 04:39:36
这段时间用到了流媒体数据传输的 TCP 和 UDP 方式,感觉 vlc 可以做这方面的 demo ,这里总结下,也方便我以后查阅。 简介 VLC 主页: http://www.videolan.org VLC 不仅仅是个播放器,也可以作为流媒体服务器使用。这个网上有相关的资料,我就不多说了。 声明下本文用的 VLC 版本: 2.0.3 用 VLC 搭建基于 UDP 的流媒体服务器 流媒体服务器大多数是基于 UDP 的,这个在 VLC 中也有好几种实现,我这里只列出我用到的几个。 1 、 UDP ( legacy )传统模式 服务端操作 打开“媒体——流”选项,如图所示: 点击“添加”按钮选择流媒体文件,然后点击“串流”按钮 点击“下一个”后,在“目标设置”界面选择“ UDP (legacy)” ,然后点击添加按钮 填上目标 ip 地址,并在“转码选项”中选择相应的编码类型(这个视情况而定) 可以点击“下一个”进行相关设置,也可以点击“串流”来完成服务端的设定。这里我点击“串流”完成服务端的设定。 客户端操作 点击“媒体——打开网络串流”,在弹出的框中输入“ udp: //@1234 ” ,点击“播放”按钮即可。 通过界面操作比较简单,但如果经常进行此类工作的话,脚本是比较靠谱的。 命令行操作方式 服务端( 172.16.1.1 ): vlc -vvv sample1.avi -

Automating VideoLan's VLC using Delphi

若如初见. 提交于 2020-01-11 11:03:30
问题 I've generated a type-library import unit from v.2.2.1 of VideoLan's VLC player and embedded the resulting plug-in component in a simple Delphi (D7 and XE8) form. Code extract is below. The basic functionality of the component is fine - I can play a (local) .MP4 file, stop it, speed it up and down, etc without any problem. However, there is one basic function which is not working, namely volume control. The plug-in displays a v. simple (compared with the one in VLC running as an app) toobar