
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (44)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (8901)
-
Programmatically terminate ffmpeg child process on Raspberry Pi
16 août 2020, par McGuireV10Is it possible to cleanly terminate ffmpeg when it's running as a child process under Linux (specifically on a Raspberry Pi 4B) ? I have a .NET Core 3.1 application which spawns ffmepg with the following command, which should encode an h.264 stream to an MP4 file :


ffmpeg -framerate 24 -i - -b:v 2500k -c copy video.mp4



After some arbitrary period of time I want to terminate ffmpeg, but everything I try is either ignored or causes ffmpeg to exit immediately — it never writes the MOOV chunk to the end of the MP4 file, which results in a corrupted file that cannot be played. I realize this chunk can take awhile to generate, and I've tried leaving the process alone for up to 60 seconds, which is far longer than h.264 to MP4 encoding requires interactively on the same device. For the record, I know how to create a "fragmented" MP4 which is mostly playable (using the
-movflags
switch and others), but I'm trying to generate a correct MP4.

I've tried sending a Q key with or without various CR+LF combos, which I've seen mentioned in similar questions, but I think that's a Windows-only thing.


I've tried every Unix signal as well as combinations of two signals. I saw somewhere (I think the ffmpeg site itself) that
SIGINT
should be sent twice, but that does nothing. In another SO post, somebody suggested sendingSIGQUIT
which also does nothing. Interestingly, sendingSIGINT
followed bySIGQUIT
is the only combination that actually terminates the process, but it ends immediately with the following output :

Error writing trailer of /media/ramdisk/video.mp4: Immediate exit requested
frame= 236 fps= 29 q=-1.0 Lsize= 28928kB time=00:00:09.79 bitrate=24201.9kbits/s speed= 1.2x
video:29167kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.



I've tried a long delay between the two, nothing happens until the
SIGQUIT
at which point it responds as shown above. Oddly, sometimes it saysreceived signal 3
instead of 2.

There has to be some trick I'm missing.


-
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 continues to process after time specified at "-to"
4 août 2020, par YamahabestI have a video, where I want to cut a part from the beginning, and from the end. And I want to apply some fade ins/fade outs, and add some text.


So, I came up with the following syntax :


-ss 10 -to 40 
-i "D:\DATA\Software\VideoProcessor_Files\20171015 Zelhem Tandem Frans met Mirthe.MP4" 
-loop 1 -i "Input_Files\logo maurik large.png" 
-loop 1 -i "Input_Files\logo maurik small.png" 
-filter_complex "
 color=0x7F7F7F@0.95:1920x1080[grey_for_fade_out];
 [grey_for_fade_out]fade=t=out:st=12:d=2:alpha=1[grey_fade_out];
 [0:v][grey_fade_out]overlay[video_grey_fade_out];
 color=0x7F7F7F@0.95:1920x1080[grey_for_fade_in];
 [grey_for_fade_in]fade=t=in:st=37:d=2:alpha=1[grey_fade_in];
 [video_grey_fade_out][grey_fade_in]overlay[video_grey_fade_out_in];
 [1:v]fade=t=out:st=13:d=2:alpha=1[over];
 [over]scale=iw/1.5:-1[scaled];
 [video_grey_fade_out_in][scaled]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/10[video_grey_fade_out_in_logo];
 [1:v]fade=t=in:st=36:d=2:alpha=1[over2];
 [over2]scale=iw/1.5:-1[scaled2];
 [video_grey_fade_out_in_logo][scaled2]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[video_grey_fade_out_in_logo2];
 [2:v]colorchannelmixer=aa=0.5,fade=t=in:st=14:d=2:alpha=1,fade=t=out:st=35:d=2:alpha=1[over3];
 [over3]scale=iw/10:-1[scaled3];
 [video_grey_fade_out_in_logo2][scaled3]overlay=10:10[video_complete];
 [video_complete]drawtext=fontfile=Input_Files/Sansation-Bold.ttf:text='Tandemvlucht met Mirthe':fontsize=96:fontcolor=white:alpha='if(lt(t,11),1,(2-(t-11))/2)':x=(w-text_w)/2:y=((h-text_h)/2)+125,drawtext=fontfile=Input_Files/Sansation-Bold.ttf:text='Zeddam':fontsize=96:fontcolor=white:alpha='if(lt(t,11),1,(2-(t-11))/2)':x=(w-text_w)/2:y=((h-text_h)/2)+250,drawtext=fontfile=Input_Files/Sansation-Bold.ttf:text='4 augustus 2020':fontsize=96:fontcolor=white:alpha='if(lt(t,11),1,(2-(t-11))/2)':x=(w-text_w)/2:y=((h-text_h)/2)+375,drawtext=fontfile=Input_Files/Sansation-Bold.ttf:text='Ook een keer meevliegen?':fontsize=96:fontcolor=white:alpha='if(lt(t,37),0,(t-37)/2)':x=(w-text_w)/2:y=((h-text_h)/6),drawtext=fontfile=Input_Files/Sansation-Bold.ttf:text='Of bel 085 - 049 55 69':fontsize=96:fontcolor=white:alpha='if(lt(t,37),0,(t-37)/2)':x=(w-text_w)/2:y=((h-text_h)/2)+350"
-preset medium 
-crf 18 
-c:a copy 
-y ".\Output_Files\Video\Zeddam\2020-08-04\Mirthe\27ed390a-8497-4550-b93f-4f87d9f2c9f0\MP_Tandemvlucht met_Mirthe_Zeddam_2020-08-04.mp4"



I am quite sure this has worked in the past, but now FFmpeg just keeps on processing endlessly. If I then stop the FFmpeg process, and look at the resulting file, I see that the last frame (of the end of the specified period) just keeps on duplicating.


The drop counter in the console output of FFmpeg also starts increasing at the end of the specified period :


frame= 987 fps= 15 q=-1.0 Lsize= 31357kB time=00:00:41.04 bitrate=6259.0kbits/s dup=0 drop=10 speed=0.644x



I am kind of lost on why this doesn't work anymore. I might have upgraded the FFmpeg executable in the mean time. Maybe my syntax was/is not correct, but I believe it just worked.


It has to be in the complex filter, because when I remove that, it works alright.
It is not in the drawtext part of the complex filter, because it still occurs when I remove that. And when I only do the drawtext, FFmpeg stops correctly at the specified time.


I have tried this, but then it still occurs :


-filter_complex "
 color=0x7F7F7F@0.95:1920x1080[grey_for_fade_out];
 [grey_for_fade_out]fade=t=out:st=12:d=2:alpha=1[grey_fade_out];
 [0:v][grey_fade_out]overlay[video_grey_fade_out];
 color=0x7F7F7F@0.95:1920x1080[grey_for_fade_in];
 [grey_for_fade_in]fade=t=in:st=37:d=2:alpha=1[grey_fade_in];
 [video_grey_fade_out][grey_fade_in]overlay"



Also with this, it still occurs :


-filter_complex "
 [1:v]fade=t=out:st=13:d=2:alpha=1[over];
 [over]scale=iw/1.5:-1[scaled];
 [0:v][scaled]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/10[video_grey_fade_out_in_logo];
 [1:v]fade=t=in:st=36:d=2:alpha=1[over2];
 [over2]scale=iw/1.5:-1[scaled2];
 [video_grey_fade_out_in_logo][scaled2]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[video_grey_fade_out_in_logo2];
 [2:v]colorchannelmixer=aa=0.5,fade=t=in:st=14:d=2:alpha=1,fade=t=out:st=35:d=2:alpha=1[over3];
 [over3]scale=iw/10:-1[scaled3];
 [video_grey_fade_out_in_logo2][scaled3]overlay=10:10"



I just don't understand. All my fade-ins/-outs seem to be within the specified range :


- 

- fade=t=out:st=12:d=2 : start at 12 seconds, duration 2 seconds. This ends at 14 seconds, which is smaller than 40 seconds.
- fade=t=in:st=37:d=2 : start at 37 seconds, duration 2 seconds. This ends at 39 seconds, which is smaller than 40 seconds.
- fade=t=out:st=13:d=2 : start at 13 seconds, duration 2 seconds. This ends at 15 seconds, which is smaller than 40 seconds.
- fade=t=in:st=36:d=2 : start at 36 seconds, duration 2 seconds. This ends at 38 seconds, which is smaller than 40 seconds.










It is just like some sequence is not ended properly, which is causing FFmpeg to just continue.