
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (68)
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)
Sur d’autres sites (12141)
-
About the delay of Electron playing FFpmeg transcoded video
26 juillet 2020, par YohannIn the Electron project, you need to try to play the video screen of the camera


The camera is Haikang’s webcam


Get real-time video stream through RTSP protocol


rtsp://admin:admin@192.168.0.253/main/Channels/


There will be a delay of about 3s when playing through the VLC player


Then when used in the project, create a websocket service in Electron through the main process, decode the rtsp video through fluent-ffmpeg, and convert it to flv stream and push it to the rendering process


import * as express from 'express'
import * as expressWebSocket from 'express-ws'
import ffmpeg from 'fluent-ffmpeg'
import webSocketStream from 'websocket-stream/stream'
const path = require('path')

let ffmpegPath
if (process.env.NODE_ENV === 'development') {
 ffmpegPath = path.join(__static, 'ffmpeg', 'bin', 'ffmpeg.exe')
} else {
 ffmpegPath = path.join(process.cwd(), 'ffmpeg', 'bin', 'ffmpeg.exe')
}
ffmpeg.setFfmpegPath(ffmpegPath)

// Start video transcoding service
function videoServer () {
 let app = express()
 app.use(express.static(__dirname))
 expressWebSocket(app, null, {
 perMessageDeflate: true
 })
 app.ws('/rtsp/', rtspRequestHandle)
 app.listen(8888)
 console.log('Create a monitoring service')
}

//RTSP transcoding method
function rtspRequestHandle (ws, req) {
 console.log('rtsp request handle')
 const stream = webSocketStream(ws, {
 binary: true,
 browserBufferTimeout: 1000000
 },
 {
 browserBufferTimeout: 1000000
 })
 let url = req.query.url
 console.log('rtsp url:', url)
 try {
 ffmpeg(url)
 .addInputOption('-rtsp_transport', 'tcp', '-buffer_size', '102400') // Here you can add some RTSP optimized parameters
 .outputOptions([
 '-fflags',
 'nobuffer',
 '-tune',
 'zerolatency'
 ])
 .on('start', function () {
 console.log(url, 'Stream started.')
 })
 .on('codecData', function () {
 console.log(url, 'Stream codecData.')
 })
 .on('error', function (err) {
 console.log(url, 'An error occured: ', err.message)
 })
 .on('end', function () {
 console.log(url, 'Stream end!')
 })
 .outputFormat('flv').videoCodec('copy').noAudio().pipe(stream)
 } catch (error) {
 console.log(error)
 }
}

export default videoServer



The rendering process parses the video stream and plays the video through flv.js


<template>
 <div class="video">
 <video class="video-box" ref="player"></video>
 </div>
</template>

<code class="echappe-js"><script>&#xA; import flvjs from &#x27;flv.js&#x27;&#xA; export default {&#xA; name: &#x27;videopage&#x27;,&#xA; props: {&#xA; rtsp: String&#xA; },&#xA; data () {&#xA; return {&#xA; player: null&#xA; }&#xA; },&#xA; mounted () {&#xA; console.log(flvjs.isSupported())&#xA; if (flvjs.isSupported()) {&#xA; let video = this.$refs.player&#xA; console.log(video)&#xA; if (video) {&#xA; this.player = flvjs.createPlayer({&#xA; type: &#x27;flv&#x27;,&#xA; isLive: true,&#xA; url: &#x27;ws://localhost:8888/rtsp/?url=&#x27; &#x2B; this.rtsp&#xA; }, {&#xA; enableStashBuffer: true&#xA; })&#xA; console.log(this.player)&#xA; this.player.attachMediaElement(video)&#xA; try {&#xA; this.player.load()&#xA; this.player.play()&#xA; } catch (error) {&#xA; console.log(error)&#xA; }&#xA; }&#xA; }&#xA; },&#xA; methods: {&#xA; getCurrentFrame () {&#xA; let video = this.$refs.player&#xA; let scale = 1&#xA; let canvas = document.createElement(&#x27;canvas&#x27;)&#xA; canvas.width = video.videoWidth * scale&#xA; canvas.height = video.videoHeight * scale&#xA; canvas.getContext(&#x27;2d&#x27;).drawImage(video, 0, 0, canvas.width, canvas.height)&#xA; return canvas.toDataURL(&#x27;image/png&#x27;)&#xA; }&#xA; },&#xA; beforeDestroy () {&#xA; this.player &amp;&amp; this.player.destory &amp;&amp; this.player.destory()&#xA; }&#xA; }&#xA;</script>





Then there will be a delay of about 3s when playing, and the delay will increase with the playing time


There will be a delay of 10 minutes in the later period


Is there any way to control this delay time


Or is there any other decoding scheme that can be used ?


Solutions that can support electron


-
FFMPEG hls m3u8 live stream
4 juillet 2018, par Num NutsI’m trying to download a m3u8 live stream but it requires cookies to access the files. Can anyone correct my command line ? Thanks.
ffmpeg -headers "Cookie: reqPayload=^\^"iaodNwtkT225JhvKtpRLb+jpeFpWv4aiQAGGeKu0UO0xAsJdu4leyx6jabp7vz5j0CEp4+I75Puwm/2FQS2C7AJYXAoiJvSKacZMYE2aqasYEYkFJCfmR5cNLEJfq3NVgDw3t7+NBwNdhw7ANtJO9anjj7269d12ERIY9n6vplh+BhlT+dwBqUnvGJ6UvX6TBfkEccybvE4tKHvD+ezZAIK+8abp+sVohUHEtQB5DU6hdx4+igd7M3829J6jFUMu213SNNuDhlW9qQgQQsFPdJPGLZfArRt8bo2BFT1BCn4rtXd112jb6WxRsgc3Y4PO/WFeq/CG067oMW7Z4pSBNS8VeOFB0wec9v9/TmkQmjYuHMJw9pVOCdGoSasaHtU+xc0li24rG6IFRir31IG56cIv38s0DGHygFYHrwzxbGC4KTlCqAv5XZYZ00EyiXdr8LKbps6kj9Rf4uO8eBFVgce8/nGllBK3XKigu9TO0FnSH0yP+HancGfTKri1j3WjP36o3kpqfThG1Na85Djn8GzrpA3m/6S0QE/F+DLv8F5mXiZuZ6aasgFchXnGAo203RcYSsJwuMLOx26O0w0b0gMJUhwuEh0vVrsCQEuADM5MOMXMkagmHqFoLOfFQiWIfHA/GokGyAYBk+FXTPrbmEjs959mopXrhWckeyW/uz4euG84gzA8+1VjbhEZxM6M7NG9214EXbD5iilxAHDfrOUr1gOHZ1XaMFQk8FqfH6k700pFaL6OKqhY1ZiCNuNe7bG+pB9dOGXC+PcqUOiR8hOKnWEfg1j1lZieHyZkrtsblM/qWl0Off+m1EVvP2+KwV9z1A158N1MGXqjG4+fpywdRo95c3RFd2VHe2SH4mktGg22iaPZjX9nmIOYwy3t0htjgj+gL2sEgUvUkXKaDN0skxLlBnUx6UughTS+psG4jI4i0pjBa5h7tnIdyEdNGBnDVMF+kgG/TJqKPnNB9mBAN1HJnpatAjnpB9V6U7xpUS/Xpqe1penzgK8mUYSaWG79nIDFUAM3t2idUn9gmGRgR/x/VLGHPujtE4hsSZv6A03kzsfVQ5JemydUdt38UFJltVsaJcW7hOKko6fZB+E4LQpnCfvUBfqNvkaIDrVgUCkUzVHU6bQGpoa2DcASx+uXIgq9LJ8CCozcYCWKm0lvRh56HMRkEeA=^\^";" -user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36' -loglevel verbose -i http://fox-foxcollegesports-central.live.sonytv.adaptive.level3.net/PROD02/sony/FOX_FCS_CENTRAL/live/2017/05/25/7418092/4500K/4500_slide.m3u8 -acodec copy -vcodec copy output.mp4 -stimeout 3000 -y
When I run the command it’s response is
Trailing options were found on the commandline.
Hyper fast Audio and Video encoder
usage : ffmpeg [options] [[infile options] -i infile]... [outfile options] outfile...Use -h to get full help or, even better, run ’man ffmpeg’
If I take out the cookies header, it says
Unable to open key file https://key-service.totsuko.tv/key-service/key/key?contentId=15125048&channelId=24995&kid=29715503
[hls,applehttp @ 0000000000778860] Error when loading first segment ’http://fox-foxcollegesports-central.live.sonytv.adaptive.level3.net/PROD02/sony/FOX_FCS_CENTRAL/live/2017/05/25/7418092/4500K/151/22/16/21_839.ts’
http://fox-foxcollegesports-central.live.sonytv.adaptive.level3.net/PROD02/sony/FOX_FCS_CENTRAL/live/2017/05/25/7418092/4500K/4500_slide.m3u8 : Invalid data found when processing inputThanks in advance for whoever helps me get this working !
-
How to utilize hardware decode for audio ?
20 mars 2014, par jAckOdEI have a buffer that contain packets read by ffmpeg from a video file encoded using H264/AAC
According to Apple document, audio stream encoded in AAC can be decode with hardware support,how to decode the audio stream with hardware support ?
UPDATE : I use Audio Queue Service to output the audio. Right now i decode AAC packet using ffmpeg and send LPCM audio to AQS. According to the Apple document, I can send directly AAC audio to AQ and it will take care of decoding task. Does it decode with hardware ? Do i need, and how to set Audio Queue's parameter to enable audio hardware decoding ?