阿里云播放器直播rtsp、rtmp、flv流,flash播放直播流

阿里云视频播放器 文章目录视频播放器介绍实战引入脚本文件和 css 文件初始化视频播放器播放地址播放播放凭证播放(推荐)test代码总结: 视频播放器介绍 阿里云的视频播放器类比 HTML5视频播放标签video和音频播放标签audio标签 只是阿里云视频播放器是针对阿里云上传的视频进行配置和操作。 阿里云播放器 SDK ( ApsaraVideo Player SDK)是阿里视频服务的重要一环,除了支持点播和直播的基础播放功能外,深度融合视频云业务,如支持视频的加密播放、安全下载、清晰度切换、直播答题等业务场景,为用户提 阅读详情
1、安装vue-aliplayer-v2依赖
 npm install vue-aliplayer-v2
2、在main.js中引入依赖
import VueAliplayerV2 from 'vue-aliplayer-v2';
Vue.use(VueAliplayerV2);
3、在需要创建播放器的vue页面粘贴如下代码。

阿里云播放器有两个版本,h5版本(支持动态切换),flash版本(不支持动态切换),

1、引入js和css样式,

阿里云支持在线调试视频地址: https://player.alicdn.com/aliplayer/setting/setting.html
里面有h5版本,flash版本,选择你需要的版本,放入你的直播流,可以在线播放测试,
在这里插入图片描述

<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.9.3/skins/default/aliplayer-min.css" />
<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.9.3/aliplayer-min.js"></script>

在代码里面拿到在线的js和css样式连接,在本地创建相同名字的js和css样式,在将在线的复制到本地放在你vue项目的public文件里面就可以了,没有可以创建一个,在html里面引入静态的css和js。也可以直接用在线的。离线的情况下可以复制。
在这里插入图片描述

 <link rel="stylesheet" href="<%= BASE_URL %>cdn/aliplayer/2.9.3/aliplayer-min.css">
 <script src="<%= BASE_URL %>cdn/aliplayer/2.9.3/aliplayer-min.js"></script>

如果是单体项目,直接将整个代码复制下来就是完整的播放器了。
复制下面的代码到vue页面里面。重启就可以了。

<template>
    <div id="app">
        <template v-if="!isShowMultiple && show">
            <vue-aliplayer-v2 :source="source" ref="VueAliplayerV2" :options="options" />
        </template>
        <div v-if="isShowMultiple && show" class="show-multiple">
            <template v-for="x in 5">
                <vue-aliplayer-v2 class="multiple-player" :key="x" :source="source" ref="VueAliplayerV2" :options="options" />
            </template>
        </div>
        <p class="remove-text" v-if="!show">播放器已销毁!</p>
        <div class="player-btns">
            <template v-if="!isShowMultiple && show">
                <span @click="play()">播放</span>
                <span @click="pause()">暂停</span>
                <span @click="replay()">重播</span>
                <span @click="getCurrentTime()">播放时刻</span>
                <span @click="getStatus()">获取播放器状态</span>
            </template>
            <span @click="show = !show">{
  
  { show ? '销毁' : '重载' }}</span
使用 阿里云 播放器播放 .flv 和 hls(.m3u8) 格式的视频流 使用 阿里云 播放器 播放.flv 和 hls(.m3u8)格式的视频流 阅读详情

相关推荐

RTMP、RTSP、SRT流媒体协议实战:从原理到安卓/嵌入式推流全解析

流媒体协议是音视频实时传输的基石,其核心原理在于如何在网络之上高效、可靠地封装和传输连续的媒体数据。RTMP基于TCP,通过稳定的连接和块流机制实现低延迟交互,成为直播推流领域的事实标准,其技术价值在于广泛的生态兼容性。RTSP则扮演“网络遥控器”的角色,通过信令控制RTP传输音视频流,专精于安防监控等专业领域。面对公网传输中的丢包和抖动挑战,SRT协议在UDP基础上引入ARQ自动重传和AES加密机制,其技术价值在于为远程制作、跨国传输等场景提供了高可靠、低延迟的解决方案。本文聚焦于这三大核心协议,深入剖析

weixin_34037173的博客 810

流媒体建设及部署指导

例如,在处理RTSP请求时,ZLMediaKit采用了异步非阻塞的方式,这大大提升了服务器处理并发请求的能力,使得即使是面对大量用户的直播场景,也能保持良好的性能表现。无论是哪种协议,ZLMediaKit都致力于提供最佳的用户体验,通过灵活的配置选项,用户可以根据具体需求选择最合适的传输方式,确保每个场景下都能获得最优的播放效果。协议支持完善:支持的RTMP协议确保了直播内容的快速传输,同时还具备动态调整码率的功能,可以根据网络状况自动调节视频质量,从而在保证流畅播放的同时,也兼顾了画质的清晰度;

企业实战系列集 ●●● https://ximenjianxue.blog.csdn.net 2026

基于RTS超低延时直播优化强互动场景体验

介绍了基于 RTS 超低延迟直播优化强互动场景体验的最佳实践方案,并以阿里云播放器 Aliplayer 为例,详细介绍 RTS 超低延迟拉流接入、自动降级、排障信息获取等逻辑的实现。

Maxineeez的博客 1879

期末求生指南:手把手教你用F12开发者工具绕过百一测评的切屏检测(JavaScript/jQuery实战)

本文详细介绍了如何利用F12开发者工具绕过百一测评的切屏检测,通过分析JavaScript/jQuery中的blur()和focus()事件监听机制,提供实战技巧动态修改代码。文章涵盖事件监听定位、代码修改方法及应对高级检测机制的策略,适合需要临时解决线上考试限制的学生参考。

weixin_30731305的博客 444

智能农业大棚

目 录 摘要 1.绪论 2.系统概述及单片机介绍 2.1整体方案设计思想 2.2系统组成 2.2.1主控芯片的选择 2.2.2传感器模块选择 2.2.3电机驱动模块 2.3 单片机介绍 2.3.1 AT89C51单片机的基本组成 2.3.2AT89C51主要特性 2.3.3管脚说明 2.3.4 AT89C51单片机的存储器 2.3.4.1 程序存储器 2.3.4.2 数据存储器 2.3.5 振荡电路和时钟 2.3.6 AT89C51的中断

weixin_70886450的博客 1324

医学影像AI的幻觉问题与CCD解决方案

医学影像AI在辅助诊断中面临的核心挑战是幻觉现象,即模型生成不符合实际影像的虚假诊断。这种现象源于多模态大语言模型(MLLMs)在视觉-语言对齐上的技术局限,可能导致假阳性或假阴性的临床风险。通过临床对比解码(CCD)框架,结合症状锚定和专家引导的双阶段校准机制,可有效提升模型输出的可靠性。该技术在CheXpert和MIMIC-CXR等标准数据集上验证,显著改善了肺不张、胸腔积液等关键指标的检测准确率。对于医疗AI落地场景,这种即插即用的解决方案既规避了数据隐私合规问题,又降低了基层医院的部署门槛,为AI辅

weixin_36303807的博客 320

一文详解声码器

声码器(Vocoder)是语音信号处理领域的核心技术,其本质是通过“分析 - 参数化 - 合成” 的闭环流程,实现语音的高效编码、转换或生成。它不仅是早期语音通信的关键工具,更是现代 AI 语音技术(如 TTS、语音转换)的核心组件。以下从原理、技术分类、关键模块、应用及发展趋势展开详细解析。

weixin_41413777的博客 1345

Meta DINOv3实战指南:如何用7B参数ViT模型提升你的视觉任务性能(附Hugging Face部署教程)

本文提供了Meta DINOv3 7B参数ViT模型的实战部署指南。文章详细解析了该自监督视觉模型的优势,并重点演示了如何在Hugging Face平台上高效加载这一大规模模型,同时给出了图像分类、语义分割等下游任务的性能提升技巧与代码示例,帮助开发者在实际视觉任务中应用这一前沿技术。

pz89012345的博客 317

简单记录一次拿网站后台的过程

本文章重在让大家了解拿后台的逻辑与流程,请不要利用此文章的内容对别人的网站进行攻击破坏,否则后果自负,作者不承担任何责任。

kk的博客 912

YOLO26 网络结构逐模块解析:Backbone/Neck/Head

本文解析了YOLO26目标检测网络的架构设计,重点介绍其在Backbone、Neck和Head三个核心组件的创新优化。Backbone采用改进的CSP模块与轻量级注意力机制,提升特征提取效率;Neck使用改进的BiFPN结构实现高效多尺度特征融合;Head采用完全解耦设计简化回归流程。文章详细分析了各模块的技术演进、实现细节和设计思想,通过流程图和代码示例展示了YOLO26的整体架构和关键组件实现。该研究对模型优化、定制开发和硬件部署具有重要指导意义。

一键难忘的博客 1227

基于 FastAPI + LangGraph + LLM 大语言模型的通用 Agent 多智能体系统架构设计与开发实战、产业应用

FastAPI是一个现代、快速(高性能)的Python Web框架,专门用于构建API。它由Sebastián Ramírez(@tiangolo)创建,基于Starlette(用于Web部分)和Pydantic(用于数据部分)构建。性能优先:FastAPI是当前最快的Python Web框架之一,性能与NodeJS和Go相当。这得益于其基于Starlette的异步架构,能够充分利用Python 3.6+的async/await特性。开发效率。

AI天才研究院 223

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: geoserver+openlayers做地图展示,添加标注,删除标注,vue版本,前后端分离版
下一篇: echarts柱状图基本属性。
先生抽烟吗
博客等级 码龄9年 33粉丝 26原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值