libvlc

Playing multiple video using libvlc and Qt

孤街浪徒 提交于 2019-12-01 14:28:06
I have created a sample application in Qt where i have to display camera stream in a 2x2 grid. I am using libvlc to play the stream and i am able to display the video as well. But i am facing few issues Vlc is creating a separate window to render the video. Its not displayed on the area provided by Qt Application. Here is my code void playerView::createPlayer() { const char *const vlc_args[] = { "--avcodec-hw=any", "--plugin-path=C:\QtSDK\vlc-2.2.1\plugins" }; vlcinstance = libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); const char* url = "rtsp://<camera ip>/cam0_0"; /* Create a

Passing file-like objects to ctypes callbacks

走远了吗. 提交于 2019-12-01 12:13:32
I'm attempting to use the LibVLC Python bindings to play an in-memory stream (Python 3.4, Windows 7, LibVLC 3.x). Eventually, my aim is to feed data into a BytesIO instance which VLC will then read from and play. But for the moment, I decided to hack up a quick script to try reading from a file stream. Here's the code and traceback - to say I'm pretty new to ctypes would be an understatement so does anyone know what I'm doing wrong? import ctypes import io import sys import time import vlc MediaOpenCb = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes

VLC Python EventManager callback type?

徘徊边缘 提交于 2019-11-30 17:44:20
I'm having trouble attaching an event handler to tell when a song has finished playing when using the VLC Python bindings. The event_attach function is complaining about the callback type. def __init__(self): self.vlc = vlc.Instance() self.vlc_playlist = self.vlc.media_list_new() self.vlc_player = self.vlc.media_list_player_new() self.vlc_player.set_media_list(self.vlc_playlist) self.vlc_events = self.vlc_player.event_manager() self.vlc_events.event_attach(vlc.EventType.MediaPlayerEndReached, self.SongFinished, 1) .... def SongFinished(self, *args, **kwargs): pass Errors: self.vlc_events.event

Reduce delay when playing rtp stream with libvlc on Android

守給你的承諾、 提交于 2019-11-30 16:16:15
I am using LibVLC version 3.0.0 to play incoming mpeg2ts stream over rtp on Android. The code is the following: SurfaceView playerView; //Initialized somewhere before LibVLC libVlc = new LibVLC(context, arrayListOf("--file-caching=150", "--network-caching=150", "--clock-jitter=0", "--live-caching=150", "--clock-synchro=0", "-vvv", "--drop-late-frames", "--skip-frames")); MediaPlayer player = new MediaPlayer(libVlc); IVLCVout vout = player.getVLCVout(); vout.setVideoView(playerView); vout.attachViews(); Media media = new Media(libVlc, Uri.parse("rtp://@:" + UDP_PORT + "/")); player.setMedia

Video rotation on android using LibVLC

蹲街弑〆低调 提交于 2019-11-30 16:10:00
I'm using LibVLC to display video files. It's working fine so far, despite of the orientation. I'm able to get the orientation out of meta-data but don't really know how to force LibVLC to rotate it from landscape to portrait. It would be nice to get a hint for a workaround. Thanks! I had a similar problem. Unfortunately LibVLC for android does not expose all features, so I had to change code in the jni layer to get it working. Here is how to do it: Edit libvlcjni.c, and find the function : Java_org_videolan_libvlc_LibVLC_nativeInit. Look for the local varibale argv array and add the following

How to stream your images/files with VLC?

﹥>﹥吖頭↗ 提交于 2019-11-30 10:54:01
问题 So I know there are lot of wrappers of libVLC.dll . But I just do not know what one is ready to do what I need... What I need is simple... in my C# program I create some bitmap (once or twice per second)... I now want to stream bitmaps live as video (in some format VLC can to offer me) to some http:localhost:port/ using VLC... How to do that? 回答1: You need to use following code to stream a image. cd "C:\program files\videolan\vlc" vlc -I dummy fake:// --fake-file c:\1.jpg -vvv --sout

Playback video in slow motion in android

不羁的心 提交于 2019-11-30 10:02:56
- I am working on a project which needs to play video in slow motion. - I am well aware that Android doesn't provide these functionality. - I found PVPlayer Engine and libVLC which possessed these capabilities, but i didn't found any tutorial or proper documentation of including them in the android project and using them. - So i tried doing this by using Runnable and Handler , it was successful in slowing down the video but they possessed jerks during playing. public class MainActivity extends Activity { VideoView vx; Button mbutt; Handler h ; int curr = 0; @Override protected void onCreate

A simple C program to play mp3 using libvlc

余生颓废 提交于 2019-11-30 05:43:38
I am an average C/C++ programmer. Recently I took a project to make a media player with a smart playlist that will work like Zune's SmartDj. I have decided to use libvlc for playing. I have never coded an open source software before, so I know nothing about git and all. Can you please help me to write at least a C program to play a mp3 file? Where should I get started? How do you extract a song's artist and other information from the mp3 file itself? regards. be sure that you have installed the following packages (else install it): $ apt-get install libvlccore-dev libvlc-dev test.c: #include

VLC Python EventManager callback type?

痞子三分冷 提交于 2019-11-30 01:53:15
问题 I'm having trouble attaching an event handler to tell when a song has finished playing when using the VLC Python bindings. The event_attach function is complaining about the callback type. def __init__(self): self.vlc = vlc.Instance() self.vlc_playlist = self.vlc.media_list_new() self.vlc_player = self.vlc.media_list_player_new() self.vlc_player.set_media_list(self.vlc_playlist) self.vlc_events = self.vlc_player.event_manager() self.vlc_events.event_attach(vlc.EventType.MediaPlayerEndReached,

How to stream your images/files with VLC?

岁酱吖の 提交于 2019-11-29 22:43:38
So I know there are lot of wrappers of libVLC.dll . But I just do not know what one is ready to do what I need... What I need is simple... in my C# program I create some bitmap (once or twice per second)... I now want to stream bitmaps live as video (in some format VLC can to offer me) to some http:localhost:port/ using VLC... How to do that? Ram You need to use following code to stream a image. cd "C:\program files\videolan\vlc" vlc -I dummy fake:// --fake-file c:\1.jpg -vvv --sout #transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=localhost:1234}} You can use the