如何使用C / C ++流式传输视频 [英] How to stream video using C/C++

查看:263
本文介绍了如何使用C / C ++流式传输视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows上使用VC ++将视频流传输到文件/或内存缓冲区。
任何人都可以建议易于集成库?(有一个H,一个LIB和一个DLL)。

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).

我现在正在探索libVLC,并且还会探索FFMPEG。
不想花时间完全自己构建这些复杂的软件,感谢任何帮助/指针/参考。

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.

我的最终目标是流式传输视频并在HTML5浏览器上使用流。

我尝试使用VLC媒体播放器流式传输到OGG文件,我在HTML5视频标签中使用了相同的OGG文件它的工作。

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 same OGG file in a HTML5-Video tag and it worked.

现在我想使用libVLC而不是VLC媒体播放器进行流媒体部分。
我想将视频文件流传输到文件或内存流。

Now I want to do the streaming part using libVLC instead of VLC media player. I want to stream the video file to File or memory stream.

我发现这个示例 https: //wiki.videolan.org/Stream_to_memory_(smem)_tutorial/

不知道如何入门?
1)我在哪里可以获得libVLC.dll,libVLC.lib,libVLC.h,有没有任何示例的可视化工作室有一切设置,我可以直接开始使用libVLC等编写代码。

BUt unsure of how to get started ? 1) Where do i get the libVLC.dll, libVLC.lib, libVLC.h , Is there any sample visual studio that has everything setup and I can straight begin to write the code using libVLC etc.

2)由于libVLC据说是在200多个其他库/模块/插件上弃置,我将如何包含并分发我的应用程序?
http://www.enjoythearchitecture.com/vlc-architecture.html
https://wiki.videolan.org/Contrib_Status/

2) Since libVLC is said to depdend on 200+ other libraries/modules/plugins, what will I have include and distribute with my application ? http://www.enjoythearchitecture.com/vlc-architecture.html https://wiki.videolan.org/Contrib_Status/

3)流格式:上面的例子似乎流入PCM格式,不能得到它的流以一些格式,有更好的编解码器和由HTML5重新定义?例如,当我尝试使用VLC媒体播放器时,我的选项如下
:sout =#transcode {vcodec = theo,vb = 800,acodec = vorb,ab = 128,channels = 2,samplerate = 44100}文件{dst = C:\Users\testUser\stream-output.ogg,no-overwrite}:sout-keep

3) streaming format : above example seems to stream into PCM format, cant I get it stream in some format that has better codec and regonized by HTML5 ? For example when i tried using VLC media player , my options were as following :sout=#transcode{vcodec=theo,vb=800,acodec=vorb,ab=128,channels=2,samplerate=44100}:file{dst=C:\Users\testUser\stream-output.ogg,no-overwrite} :sout-keep

推荐答案

最后我能够通过VLC。

Finally I was able to get through VLC.

您需要下载正确的文件集

You need to download correct set of files

http://www.videolan.org/vlc/download-windows.html下载7z软件包

,这就是您需要的。

它有DLL,LIB和标题。
这是您需要开始的所有。

It has DLLs, LIBs, and Headers. thats all you need to get started.

VLC的任何示例程序都需要这三个。
如果有人需要任何帮助,请随时给我发消息。

Any sample program of VLC would require these three. If anybody need any help, please feel free to buzz me.

这篇关于如何使用C / C ++流式传输视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆