
Recherche avancée
Médias (10)
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (96)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (8944)
-
Accord.Video.FFMpeg : Problem of duration difference between recording time and video time
5 mars 2020, par ckrbyI want to save the footage I get from the webcam as a video in webM (Vp8) format. I use the Accord library. But when recording, there is almost 2-3 times the difference between the time spent and the video time. The code I use and some debug outputs are below.
Accord.Video.FFMpeg 3.8.2-Alpha (double pts/dts bug fixed version)
Video Save Format : VP8 (.WebM)Record Start Settings :
videoCodec = VideoCodec.Vp8;
bitrate : 1250000
framerate :10
height :720
width: 1280
videoSource.VideoResolution: 1280x720, 30 fps (30 max fps), 24 bpp
FileWriter.BitRate = bitRate;
FileWriter.FrameRate = new Accord.Math.Rational((int)framerate );
FileWriter.Width = width;
FileWriter.Height = height;
FileWriter.VideoCodec = videoCodec;
FileWriter.Open(FileName);
_recording = true;
StartTimeStamp = DateTime.Now;newFrame Event
private void VideoSourcePlayer1_NewFrame(object sender, ref Bitmap image)
{
if (_recording)
{
try
{
Bitmap CurrentBitmap = image;
DateTime CurrentTimeStamp = DateTime.Now;
TimeSpan CurrentTimeSpan = StartTimeStamp - CurrentTimeStamp;
Console.WriteLine("Video Write Timespan: " + CurrentTimeSpan.ToString());
FileWriter.WriteVideoFrame(CurrentBitmap, CurrentTimeSpan);
// FileWriter.WriteVideoFrame(image);
}
catch (Exception ex)
{
Console.WriteLine("VideoSourcePlayer1_NewFrame catch: " + ex.Message);
}
}
}Note : It is the same issue with timespan or without timespan writing.
In the 122 second (02.02 min) period, 50 seconds of video recording is created. I couldn’t solve it.
Little Part of the debug output :
Video Write Timespan : -00:01:55.4107365
pts:4,730000e+004 pts_time:47,3 dts:4,730000e+004 dts_time:47,3 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:55.6136263
pts:4,740000e+004 pts_time:47,4 dts:4,740000e+004 dts_time:47,4 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:55.8354960
pts:4,750000e+004 pts_time:47,5 dts:4,750000e+004 dts_time:47,5 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:56.5161088
pts:4,760000e+004 pts_time:47,6 dts:4,760000e+004 dts_time:47,6 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:56.7309841
pts:4,770000e+004 pts_time:47,7 dts:4,770000e+004 dts_time:47,7 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:56.9758413
pts:4,780000e+004 pts_time:47,8 dts:4,780000e+004 dts_time:47,8 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:57.1947200
pts:4,790000e+004 pts_time:47,9 dts:4,790000e+004 dts_time:47,9 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:57.4375834
pts:4,800000e+004 pts_time:48 dts:4,800000e+004 dts_time:48 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:01:57.5804983The last two outputs :
Video Write Timespan : -00:02:02.7505463
pts:5,000000e+004 pts_time : 50 dts:5,000000e+004 dts_time : 50 duration:1,000000e+002 duration_time:0,1
Video Write Timespan : -00:02:02.9884038
pts:5,010000e+004 pts_time : 50,1 dts:5,010000e+004 dts_time : 50,1 duration:1,000000e+002 duration_time:0,1Why is there a difference between timespan and dts/pts time ? Could the problem be due to this ?
Note : When I set the framerate to 30 ; Another process 95 seconds (1.35 min) recording time is 16 seconds in the video.
As the frame rate increases, the length of the video gets shorter and
shorter than the actual value it should be.Output :
Video Write Timespan : -00:01:35.1086178
pts:1,606700e+004 pts_time : 16,067 dts:1,606700e+004 dts_time : 16,067 duration:3,300000e+001 duration_time:0,033
Video Write Timespan : -00:01:35.2565302
pts:1,610000e+004 pts_time : 16,1 dts:1,610000e+004 dts_time : 16,1 duration:3,300000e+001 duration_time:0,033
Video Write Timespan : -00:01:35.3984494
pts:1,613300e+004 pts_time : 16,133 dts:1,613300e+004 dts_time : 16,133 duration:3,300000e+001 duration_time:0,033So the video duration is like dts_time. Why is the video duration not
value of timespan time, I still can’t find it ??Soory for my bad english & expression,
-
muxing DVB subtitles into transport stream with ffmpeg
28 novembre 2019, par user3439130So i have H264 video + AAC audio muxed inside transport stream (*.ts). To achive evenly spread PCR values i added muxrate tag to my command.
ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i 1135084.m4v -i 1135084.m4a -c copy -muxrate 7982K -map 0:v:0 -map 1:a:0 -metadata:s:a:0 language=eng -metadata:s:a:0 tms_track_id=169451954 TEMP0.ts
Since our client need DVB substitles we convert SRT to DVD with subtitle edit and then encode them to DVB with ffmpeg with this command :
ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i TEMP0.ts -i out.da.idx -map 0 -c copy -muxrate 7992K -map 1:s -c:s:0 dvbsub -metadata:s:s:0 language=dan TEMP1.ts
here is output from ffmpeg command :
ffmpeg version git-2019-11-18-d831edc Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20191010
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 36.100 / 56. 36.100
libavcodec 58. 62.100 / 58. 62.100
libavformat 58. 35.100 / 58. 35.100
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 66.100 / 7. 66.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
[h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
[h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
[h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
[h264 @ 000002bf7460d400] Reinit context to 1920x1088, pix_fmt: yuv420p
[mpegts @ 000002bf7460ae00] max_analyze_duration 20000000 reached at 20000000 microseconds st:0
[mpegts @ 000002bf7460ae00] start time for stream 2 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'TEMP1.ts':
Duration: 01:51:54.48, start: 1.440000, bitrate: 7992 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
Stream #0:2[0x102](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[vobsub @ 000002bf75d65940] IDX/SUB: out.fi.idx -> out.fi.sub
Input #1, vobsub, from 'out.fi.idx':
Duration: N/A, bitrate: N/A
Stream #1:0[0x0](fi): Subtitle: dvd_subtitle, 1920x1080 (default)
File 'TEMP2.ts' already exists. Overwrite? [y/N] y
[mpegts @ 000002bf74634f00] service 1 using PCR in pid=256, pcr_period=20ms
[mpegts @ 000002bf74634f00] muxrate 8002000, sdt every 500 ms, pat/pmt every 100 ms
Output #0, mpegts, to 'TEMP2.ts':
Metadata:
encoder : Lavf58.35.100
Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
Stream #0:2(dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:3(fin): Subtitle: dvb_subtitle (dvbsub), 1920x1080 (default)
Metadata:
encoder : Lavc58.62.100 dvbsub
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #1:0 -> #0:3 (dvd_subtitle (dvdsub) -> dvb_subtitle (dvbsub))
Press [q] to stop, [?] for help
No more output streams to write to, finishing.me=01:51:46.51 bitrate=7990.2kbits/s speed=18.2x
frame=167862 fps=456 q=-1.0 Lsize= 6558750kB time=01:51:54.47 bitrate=8002.0kbits/s speed=18.2x
video:5738580kB audio:212004kB subtitle:10989kB other streams:0kB global headers:0kB muxing overhead: 10.017118%
Input file #0 (TEMP1.ts):
Input stream #0:0 (video): 167862 packets read (5876305439 bytes);
Input stream #0:1 (audio): 314742 packets read (217092443 bytes);
Input stream #0:2 (subtitle): 1740 packets read (5578504 bytes);
Total: 484344 packets (6098976386 bytes) demuxed
Input file #1 (out.fi.idx):
Input stream #1:0 (subtitle): 855 packets read (6881158 bytes); 854 frames decoded;
Total: 855 packets (6881158 bytes) demuxed
Output file #0 (TEMP2.ts):
Output stream #0:0 (video): 167862 packets muxed (5876305439 bytes);
Output stream #0:1 (audio): 314742 packets muxed (217092443 bytes);
Output stream #0:2 (subtitle): 1740 packets muxed (5578504 bytes);
Output stream #0:3 (subtitle): 1708 frames encoded; 1708 packets muxed (5673736 bytes);
Total: 486052 packets (6104650122 bytes) muxed
[AVIOContext @ 000002bf7463c280] Statistics: 0 seeks, 25621 writeouts
[AVIOContext @ 000002bf74613f80] Statistics: 6728300448 bytes read, 2 seeks
[AVIOContext @ 000002bf75efde40] Statistics: 7852032 bytes read, 0 seeks
[AVIOContext @ 000002bf74f30e40] Statistics: 40275 bytes read, 0 seeksSo i have video/audio and two dvb tracks inside one TS.
Now im adding third subtitle and i get this warning :
frame=32351 fps=869 q=-1.0 size= 1255936kB time=00:21:33.99 bitrate=7951.1kbits/s speed=34.8x
[mpegts @ 0x2994600] Non-monotonous DTS in output stream 0:3; previous: 116868609, current: 116868607; changing to 116868610. This may result in incorrect timestamps in the output file.
frame=33416 fps=886 q=-1.0 size= 1297408kB time=00:22:16.56 bitrate=7952.0kbits/s speed=35.4xBy this warning it seems that something is not right with DVB (0:3) Finish track.
Playing back the file with VLC i can see that Finish subtitles (between 21:33 and 22:16) are not showing up.Dumping packets from 0:3 track i see that 4 packets have the same DTS/PTS values.
#stream#, dts, pts, duration, size, hash
0, 111258000, 111258000, 0, 6979, 6215f060, S=1, 1, 67d220bc
0, 111689100, 111689100, 0, 25, e60e94fa, S=1, 1, 67d220bc
0, 113230800, 113230800, 0, 4423, f811be62, S=1, 1, 67d220bc
0, 113561550, 113561550, 0, 25, 6db8d81f, S=1, 1, 67d220bc
0, 113788800, 113788800, 0, 8247, 8b494779, S=1, 1, 67d220bc
0, 114191190, 114191190, 0, 25, a205e183, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 1119, e5d11188, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 28, 11e09861, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 1122, 8320a3f5, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 28, e896fa37, S=1, 1, 67d220bc
0, 117205200, 117205200, 0, 3583, 47b23f27, S=1, 1, 67d220bc
0, 117611640, 117611640, 0, 25, e5ae32ed, S=1, 1, 67d220bc
0, 117709200, 117709200, 0, 1119, 208b4f80, S=1, 1, 67d220bc
0, 117830970, 117830970, 0, 25, 2a130b71, S=1, 1, 67d220bc
0, 117846000, 117846000, 0, 3105, f179a4f0, S=1, 1, 67d220bc
0, 118148040, 118148040, 0, 25, 29b3ad66, S=1, 1, 67d220bc
0, 120146410, 120146410, 0, 1119, 714ef5d1, S=1, 1, 67d220bc
0, 120146410, 120146410, 0, 28, bbad7fed, S=1, 1, 67d220bc
0, 120708000, 120708000, 0, 2060, 703084f7, S=1, 1, 67d220bc
0, 120855420, 120855420, 0, 25, 6db8d81f, S=1, 1, 67d220bc
0, 121122000, 121122000, 0, 2184, 04a7be71, S=1, 1, 67d220bc
0, 121395330, 121395330, 0, 25, a205e183, S=1, 1, 67d220bcThes are the lines from SRT file where the warning happens :
146
00:21:34,840 --> 00:21:36,600
Make!
147
00:21:42,280 --> 00:21:46,800
Make! Hei, Make. Make!
148
00:21:47,880 --> 00:21:49,240
Make!
149
00:21:49,400 --> 00:21:52,760
Odota minua, Make!
150
00:22:00,400 --> 00:22:01,760
Make!Sometimes muxing subtitles in different order (for example Finish before Danish and then Swedish) would solve this problem, but i would like to know why such things are happening.
-
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