vlc

WPF VlC 实现视频的播放(1)

妖精的绣舞 提交于 2020-01-10 10:55:21
WPF 使用VLC实现视频的播放:网上开源代码我复制了一份: https://github.com/someonehan/Vlc.DotNet 1. 准备阶段 (I) libvlc.dll 和 libvlccore.dll 是必须的两个库 (II) 配合使用和还要有plugins文件夹下面的乱七八糟的dll,这个东西如果不好找可以在电脑上安装一个vlc播放器然后在安装目录下面就能够找到这个文件夹 2. 使用播放 (I) 在使用这个开源的控件之前需要指定VlcLibDirectory其实主要就是plugins文件夹下面乱七八糟的dll(这里面肯定有好多东西是没有用的)指定这个VlcLibDirectory我使用这两种方法: var currentAssembly = Assembly.GetEntryAssembly(); var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName; vlcControl.MediaPlayer.VlcLibDirectory = new DirectoryInfo(Path.Combine(currentDirectory, @"..\..\..\lib\x64\")); View Code vlcControl.MediaPlayer

How to get first video frame?

别说谁变了你拦得住时间么 提交于 2020-01-07 06:37:33
问题 I am programming media player using VLCKit. I want to take preview picture of the video. How can i do that using VLCKit or maybe another tools? P.S. I've already used AVFoundation and QTKit, but it didn't work. They argue on video format (.mkv) 回答1: You want to use VLCKit's thumbnailer class. It is doing everything for you. 来源: https://stackoverflow.com/questions/38827400/how-to-get-first-video-frame

VLC.DotNet Control Hosted in WPF

对着背影说爱祢 提交于 2020-01-07 06:26:38
问题 I have hosted the VLC.DotNet windows Control in a WindowsFormsHost element, inside a WPF window. The reason behind doing this, instead of using Vlc.DotNet WPF control is because the performance of the WinForms version is twice better than the WPF version. Anyway, everything works fine, except for one annoying detail; When using the WinForms version inside a WinForms App , the rendered video will exactly fit the control ; However, using the same control inside a WindowsFormsHost element,

VLC.DotNet Control Hosted in WPF

孤街醉人 提交于 2020-01-07 06:26:09
问题 I have hosted the VLC.DotNet windows Control in a WindowsFormsHost element, inside a WPF window. The reason behind doing this, instead of using Vlc.DotNet WPF control is because the performance of the WinForms version is twice better than the WPF version. Anyway, everything works fine, except for one annoying detail; When using the WinForms version inside a WinForms App , the rendered video will exactly fit the control ; However, using the same control inside a WindowsFormsHost element,

Open file in VLC via HTML/JS or PHP

僤鯓⒐⒋嵵緔 提交于 2020-01-07 05:11:28
问题 I'm trying to set up a local media server, purely for educational purpose, and want to open local video files in VLC media player via the browser (preferably Chrome) So far I've tried the following without any luck: local "file:///" URLs: was able to open local directories in windows explorer but no luck opening media files in their designated programs (using IE11). This works if run via command line (php my_file.php), but not via browser: $file = 'pathToFile'; system("pathtovlc/vlc {$file}")

Python: VLC streaming error

笑着哭i 提交于 2020-01-06 18:00:47
问题 The module somehow managed to work Refer But now while trying to run the program: import vlc i = vlc.Instance('--verbose 2'.split()) p = i.media_player_new() p.set_mrl('rtp://@192.168.1.109:8080/video') p.play() I get the following error: [002d332c] main libvlc debug: VLC media player - 2.1.5 Rincewind [002d332c] main libvlc debug: Copyright ■ 1996-2014 the VideoLAN team [002d332c] main libvlc debug: revision 2.1.5-9-gb3fd0af [002d332c] main libvlc debug: configured with ../extras/package

Where is the documentation for the Mjpeg codec used in mencoder, VLC and FFMpeg?

白昼怎懂夜的黑 提交于 2020-01-06 10:20:23
问题 Mencoder has a lovely option for converting a mjpeg file into an avi file with an 'MJPG' codec that plays in VLC. The command line to do this is: mencoder filename.mjpeg -oac copy -ovc copy -o outputfile.avi -speed 0.3 where 0.3 is the ratio of the desired play framerate to the default 25 fps. All this does is make a copy of the mjpeg file, put an avi header on top and at the end, what seems to be an index of the frame positions in the file. I want to replicate this in my own code, but I can

Where is the documentation for the Mjpeg codec used in mencoder, VLC and FFMpeg?

自作多情 提交于 2020-01-06 10:20:21
问题 Mencoder has a lovely option for converting a mjpeg file into an avi file with an 'MJPG' codec that plays in VLC. The command line to do this is: mencoder filename.mjpeg -oac copy -ovc copy -o outputfile.avi -speed 0.3 where 0.3 is the ratio of the desired play framerate to the default 25 fps. All this does is make a copy of the mjpeg file, put an avi header on top and at the end, what seems to be an index of the frame positions in the file. I want to replicate this in my own code, but I can

A WindowsFormsHost cannot be rotated. To suppress this error, handle the LayoutError event and set ThrowException to false

白昼怎懂夜的黑 提交于 2020-01-06 04:37:14
问题 I have VLC ActiveX Plugin control inside of WPF. <Grid> <WindowsFormsHost HorizontalAlignment="Stretch" Margin="0,0,0,0" Visibility="Hidden" Name="windowsFormsHost1" VerticalAlignment="Stretch" ClipToBounds="True" SnapsToDevicePixels="True" /> </Grid> And when I try to apply some animation I am facing this error: A WindowsFormsHost cannot be rotated. To suppress this error, handle the LayoutError event and set ThrowException to false. Any clue how we can fix it? 回答1: That error is pretty

Re-encoding vlc-created mpeg2 .ts file results in 20 second file; AKA: multi-stream file with hidden streams

梦想的初衷 提交于 2020-01-05 04:24:33
问题 I was recording something with vlc off v4l2 (in case that makes a difference), and I just selected the first format that worked, being mpeg2 using TS container. File resulted in .ts extension, as automatically selected by vlc. When I then tried to put the video file in my video editor, it said the video was 19,884 hours long, when it should be about 6 minutes (it is ~80mb in size). When I try to play it in xine, it correctly shows the duration (vlc doesn't), and when I use ffprobe : [mpegts @