rtmp

RTMP推流组件EasyRTMP实现手机直播推送、屏幕推送及录像功能时录像功能时如何实现的

こ雲淡風輕ζ 提交于 2019-11-30 22:26:41
EasyRTMP是结合了多种音视频缓存及网络技术的一个rtmp直播推流端,包括:圆形缓冲区(circular buffer)、智能丢帧、自动重连、rtmp协议等多种技术,能够非常有效地适应各种平台(Windows、Linux、ARM、Android、iOS),各种网络环境(有线、wifi、4G),以及各种情况下的直播恢复(服务器重启、网络重启、硬件设备重启)。 ​ 调用方法 EasyRTMP_File:EasyRTMP做为RTMP推送端,将本地文件推送到RTMP流媒体服务器; EasyRTMP_RTSP:将RTSP/RTP数据获取到本地,再通过EasyRTMP推送到RTMP服务器; EasyRTMP-Android:Android安卓RTMP直播推流,采集安卓手机前/后摄像头、麦克风音视频推送直播;项目地址:https://github.com/EasyDSS/EasyRTMP-Android EasyRTMP-iOS:iOS苹果RTMP直播推流,采集苹果手机前/后摄像头、麦克风音视频推送直播; 项目地址 提出问题 EasyRTMP-iOS录像的实现方式是什么? 分析问题 iOS在实现视频录制功能的时,如果单纯的使用AVCaptureMovieFileOutput将录制的视频文件进行输出,则会导致录制的视频文件太过于大。而使用AVAssetWriter 实现高分辨率录制视频

简单、高效、易用的全平台(Windows/Linux/ARM/Android/iOS)RTMP直播推送库EasyRTMP视频硬编码的流程解析

﹥>﹥吖頭↗ 提交于 2019-11-30 22:26:27
关于RTMP推流组件 EasyRTMP 是一套调用简单、功能完善、运行高效稳定的RTMP推流功能组件,经过多年客户实战和线上运行打造,支持RTMP推送断线重连、环形缓冲、智能丢帧、网络事件回调,支持Windows、Linux、ARM、Android、iOS平台,支持市面上绝大部分的RTMP流媒体服务器,能够完美应用于各种行业的直播需求,手机直播、桌面直播、摄像机直播、课堂直播等方面。结合EasyDSS流媒体服务器,为开发者提供专业、稳定的直播推流、转码、分发服务,全面满足低超低延迟、超高画质、超大并发访问量的要求。 ​ 提出问题: EasyRTMP-iOS介绍下视频硬编码的简单流程。 分析问题: H.264 HWEncoder.m文件实现了视频的硬编码功能。 解决问题: iOS处理音频的库是VideoToolbox,视频硬编码的流程如下: 1、-initVideoToolBox中调用 VTCompressionSessionCreate创建编码session,并调用VTSessionSetProperty设置参数: ​ 再调用VTCompressionSessionPrepareToEncodeFrames开始编码: ​ 2、将获取到摄像头的视频帧,传入-encode: 调用VTCompressionSessionEncodeFrame传入需要编码的视频帧: ​ 3

Is it possible to pull a RTMP stream from one server and broadcast it to another?

二次信任 提交于 2019-11-30 17:56:46
问题 I essentially have a situation where I need to pull a stream from one Wowza media server and publish it to a Red5 or Flash Media Server instance with FFMPEG. Is there a command to do this? I'm essentially looking for something like this: while [ true ]; do ffmpeg -i rtmp://localhost:2000/vod/streamName.flv rtmp://localhost:1935/live/streamName done Is this currently possible from FFMPEG? I remembered reading something like this, but I can't remember how exactly to do it. 回答1: Yes. An example

OpenCV won't capture frames from a RTMP source, while FFmpeg does

百般思念 提交于 2019-11-30 14:20:27
my goal is to capture a frame from a rtmp stream every second, and process it using OpenCV. I'm using FFmpeg version N-71899-g6ef3426 and OpenCV 2.4.9 with the Java interface (but I'm first experimenting with Python). For the moment, I can only take the simple and dirty solution, which is to capture images using FFmpeg, store them in disk, and then read those images from my OpenCV program. This is the FFmpeg command I'm using: ffmpeg -i "rtmp://antena3fms35livefs.fplive.net:1935/antena3fms35live-live/stream-lasexta_1 live=1" -r 1 capImage%03d.jpg This is currently working for me, at least with

Why RTMP streaming protocal's url path different from each other?

倾然丶 夕夏残阳落幕 提交于 2019-11-30 09:07:05
问题 Recently I'm doing some work on RTMP streaming, that is using Flowplayer to integrate with Edgecast Streaming service and CloudFront Streaming service. The basic concept is easy to follow, but the format of different providers really waste me a lot of time to figure out. For example, in order to make edgecast happy, according to the documentation, you need to specify filename in the format of mp4:filename.mp4, flv:filename (without .flv extension) and mp3:filename (without .mp3 extension).

Downloading the first frame of a twitch.tv stream

懵懂的女人 提交于 2019-11-29 22:43:42
问题 Using this api I've managed to download stream data, but I can't figure out how to parse it. I've looked at the RMTP format, but it doesn't seem to match. from livestreamer import Livestreamer livestreamer = Livestreamer() # set to a stream that is actually online plugin = livestreamer.resolve_url("http://twitch.tv/froggen") streams = plugin.get_streams() stream = streams['mobile_High'] fd = stream.open() data = fd.read() I've uploaded an example of the data here. Ideally I wouldn't have to

Using FFMPEG to stream continuously videos files to a RTMP server

。_饼干妹妹 提交于 2019-11-29 19:59:30
ffmpeg handles RTMP streaming as input or output, and it's working well. I want to stream some videos (a dynamic playlist managed by a python script) to a RTMP server, and i'm currently doing something quite simple: streaming my videos one by one with FFMPEG to the RTMP server, however this causes a connection break every time a video end, and the stream is ready to go when the next video begins. I would like to stream those videos without any connection breaks continuously, then the stream could be correctly viewed. I use this command to stream my videos one by one to the server ffmpeg -re -y

Using JWplayer in Android for streaming video playback in Phonegap

…衆ロ難τιáo~ 提交于 2019-11-29 11:15:07
I'm trying to use JWPlayer as a way around Android not supporting HLS playback in Webview in Phonegap (or ar least I can't get it to work, only with WebM streams and the video plugin on https://github.com/macdonst/VideoPlayer , HLS streams give audio only ) I know the user needs flash installed but at the moment what's most importart for me is to get either the RTMP or HLS (.m3u8) displayed on the device (2.3, 4.0 or 4.1, whichever works!) However I keep getting the "Error loading player: no playable sources found" error when implementing the JWplayer in android. So far I have only tested in

用red5/nginx+obs+jwplayer+websocket实现视频直播与弹幕

怎甘沉沦 提交于 2019-11-29 08:55:16
1、Linux环境准备 linux版的red5下载 https://github.com/Red5/red5-server/releases nginx-rtmp下载 ,使用linux的git命令:git clone https://github.com/arut/nginx-rtmp-module.git ( 如果没有git进行安装,yum install git) 二者选一就可以了,网上说nginx比red5性能高,而且用的人比较多。但我5m带宽的服务器测试来说,red5比nginx流畅,而且延迟低 OBS去官网下载就可以了 obs官网 jwplayer 上百度找,或者进入red5目录的/red5-server/webapps/oflaDemo下,会有一个jwplayer.js和player.swf文件。把它复制到自己的项目就能用。 websocket 后面再项目的pom文件中引入依赖即可(用来实时发送弹幕)。 2、red5/nginx-rtmp安装 red5安装教程有很多,网上找教程即可 例如这个 注意的是:制作完启动脚本之后,我启动脚本成功但还是访问不了red5主页,这时,我直接到red5目录手动执行./red5.sh文件,就能访问到red5主页。但一退出red5就会关闭,所以可以使用后台启动 ./red5.sh & nginx-rtmp教程也可以在网上找到。

srs3.x代码阅读

随声附和 提交于 2019-11-29 08:25:30
srs使用了state-threads协程库,是单线程多协程模型。不用考虑线程安全,数据不用加锁。 int SrsServer::listen()中启动if ((ret = listen_rtmp()) != ERROR_SUCCESS) 进一步启动:SrsListener* listener = new SrsBufferListener(this, SrsListenerRtmpStream); 然后启动: SrsTcpListener::SrsTcpListener(ISrsTcpHandler* h, string i, int p) { handler = h; ip = i; port = p; lfd = NULL; trd = new SrsDummyCoroutine(); } 在协程的cycle中,会调用到if ((ret = handler->on_tcp_client(client_stfd)) != ERROR_SUCCESS) 在on_tcp_client()中,会调用if ((ret = server->accept_client(type, stfd)) != ERROR_SUCCESS) int SrsServer::accept_client(SrsListenerType type, st_netfd_t client_stfd)