
Recherche avancée
Autres articles (58)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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 ) (...)
Sur d’autres sites (6563)
-
How to render or convert animation to video format ?
29 novembre 2018, par user9964622I have created animation using tweenjs and createjs libraries createjs and tweenjs, now, I’d like to convert these animations to video files (MPEG4, or other, doesn’t matter) or how can I render it in the backend using nodejs ?
I have animation looking like this : Animated
Here is solution I have tried so far using nodejs and ffmpeg module
var express = require('express');
var cors = require('cors')
var path = require('path');
var app = express();
var ffmpeg = require('ffmpeg');
//Cors Middleware
app.use(cors());
// Body Parser Middleware
app.use(bodyParser.json())
// Port Number
const port = process.env.PORT || 8000;
//video processing
try {
var process = new ffmpeg('/path/to/your_movie.mp4');
process.then(function (video) {
video
.setVideoSize('640x?', true, true, '#fff')
.audioCodec('libmp3lame')
.videoCodec('libx264')
.setAudioCodec('libfaac')
.setAudioChannels(2)
.save('/path/to/save/your_movie.mp4', function (error, file) {
if (!error)
console.log('Video file: ' + file);
});
}, function (err) {
console.log('Error: ' + err);
});
} catch (e) {
console.log(e.code);
app.use('/video', video);
app.get('/', (req, res) => {
res.send('invaild endpoint');
});
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname + '/video-client/dist/video-client/index.html'));
});
// Start Server
app.listen(port, () => {
console.log('Server started on port '+port);
});Here is sample of what I am trying to archive check this website logo animation , in this website as u can see when u click preview u can see the message that waits for its rendering after finish rendering it gives the option to download the rendered video file, on my side I am able to create animation but am not able to render it so that it can convert to video format .
I am new to nodejs and backend stuff in general, unfortunately, my solution does not work so far, and I am stuck. I need help
Is this the right way to create video from animation if not what is the best way ? ,
please help, any suggestion or tutorials will be appreciated, thanks
-
Auto delete .ts and .m3u8 files once client receives all .ts files
11 mars 2019, par Abhishek MehandirattaSo I created an express server that gets an mp3 file (which is stored locally right now, but will be taken from mongo db later) and uses ffmpeg to make .m3u8 and .ts files. The files are successfully sent to the client and there are no errors while playing it on the client. I used hls.js to play these files in Chrome. But the server still has those files stored locally. Is there any way the server can know when to delete these files that it stored locally ? There are a lot of files generated by ffmpeg so I can’t just let them stay there forever.
I used the ffmpeg part of code from hls-server github repo.
my server file
index.js
// just used to run ffmpeg for conversion
var command = ffmpeg('inp.mp3')
.on('start', function (commandLine) {
console.log('command', commandLine);
}).addOptions([
'-c:a aac',
'-b:a 64k',
'-vn',
'-hls_list_size 0',
'-segment_time 10',
]).output('files\\output.m3u8');
var express = require('express');
var app = express();
// express middleware to serve individual .ts and .m3u8 files when requested
app.use(express.static('./files/'));
app.get('/', function (req, res) {
command.on('end', function () {
console.log('done');
res.write(`
<code class="echappe-js"><script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js"></script><script><br />
function onLevelLoaded (event, data) {<br />
var level_duration = data.details.totalduration;<br />
console.log(level_duration, data);<br />
}<br />
if(Hls.isSupported()) {<br />
var audio = new Audio();<br />
var hls = new Hls();<br />
// requesting files from here<br />
hls.loadSource('http://localhost:8000/output.m3u8');<br />
hls.attachMedia(audio);<br />
hls.on(Hls.Events.LEVEL_LOADED, onLevelLoaded);<br />
hls.on(Hls.Events.FRAG_BUFFERED, (e, d) => {<br />
console.log(e, d);<br />
});<br />
}<br />
</script>`) ;
res.end() ;
}).run() ;
}) ;app.listen(8000) ;
-
Intel QuickSync error : Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
30 novembre 2018, par Arie SyamsudinI want to make IPTV with a topology like this :
Restream / source -----> IPTV server -----> User
The problem at the moment is the question of bandwidth that is still large.
Finally I announced by IPTV software providers to transcode with Intel QuickSync video and FFmpeg.
I followed the steps given by the software provider at the following link :
http://www.ezhometech.com/document/intel_ffmpeg.txtWhich comes from the link below :
https://www.intel.com/content/dam/www/public/us/en/documents/white-paper...I installed IPTV software on a laptop with an Intel processor, chipset and VGA.
[root@iptv ffmpeg-4.1]# **lspci**
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
02:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
[root@iptv ffmpeg-4.1]# **lspci -nn -s 0:02.0**
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)but when I do a transcoding test, an error always appears :
Error initializing output stream 0:0 — Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height.Error details :
https://paste.fedoraproject.org/paste/vp9XIzbeOuyXRuLBlLfSngFFmpeg log :
./ffmpeg -hwaccel qsv -i http://premium-play.org:8000/domm0H56Cj/q3ODLP6C16/2826 -vcodec h264_qsv -acodec copy -b:v 1200K -f mpegts udp://127.0.0.1:9011?pkt_size=1316
ffmpeg version 3.2.12 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration: --enable-libmfx --enable-nonfree
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
Input #0, mpegts, from 'http://premium-play.org:8000/domm0H56Cj/q3ODLP6C16/2826':
Duration: N/A, start: 30200.274878, bitrate: N/A
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 125 kb/s
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
[h264_qsv @ 0x2a89500] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
Stream #0:1 -> #0:1 (copy)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height