
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (20)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (5678)
-
Problem importing whatsapp-web.js nodejs module in electron react app
26 mai 2021, par Sunil ShahI am trying to build an electron react app. I need to integrate this node modules https://www.npmjs.com/package/whatsapp-web.js in my electron react app. My main.js of electron looks like this :




// Modules to control application life and create native browser window
const { app, BrowserWindow } = require("electron");
const path = require("path");

function createWindow() {
 // Create the browser window.
 const mainWindow = new BrowserWindow({
 width: 800,
 height: 600,
 webPreferences: {
 webSecurity: false,
 },
 });

 // and load the index.html of the app.
 mainWindow.loadURL("your ip address:3000");

 // Open the DevTools.
 // mainWindow.webContents.openDevTools()
}

app.whenReady().then(() => {
 createWindow();

 app.on("activate", function () {
 // On macOS it's common to re-create a window in the app when the
 // dock icon is clicked and there are no other windows open.
 if (BrowserWindow.getAllWindows().length === 0) createWindow();
 });
});

// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", function () {
 if (process.platform !== "darwin") app.quit();
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.







And the React code where i want to import whatsapp-web.js module looks like




import React from "react";
import styled from "styled-components";
const qrcode = require('qrcode-terminal');
const Client = require('whatsapp-web.js');
function Error() {
 var client = new Client();
 client.initialize();
 console.log(client);
 console.log(qrcode);
 return (
 <container>
 <errorimage src="https://cdn4.iconfinder.com/data/icons/smiley-vol-3-2/48/134-512.png"></errorimage>
 <errormessage>Oops, you are not connected to any number.</errormessage>
 </container>
 );
}

export default Error;

const Container = styled.div`
 display: flex;
 height: 100vh;
 width: 100%;
 padding-top: 20vh;
 position: center;
 /* align-items: center; */
 justify-content: center;
`;

const ErrorImage = styled.img`
 background-color: transparent;
 background-repeat: no-repeat;
 background-size: cover;
 object-fit: contain;

 width: 25%;
 height: 25%;

 /* border: 2px solid black; */
`;

const ErrorMessage = styled.div`
 margin: 10px;
 width: 50%;
 height: 25%;
 /* top: 20px; */
 font-size: 30px;
 align-items: center;
 font-family: "Lucida Console", "Courier New", monospace;
 /* font-weight: bold; */
`;







Now everytime I try to import const Client = require('whatsapp-web.js') It throws error like this :
**
[0] ./node_modules/fluent-ffmpeg/index.js
[0] Module not found : Can't resolve './lib-cov/fluent-ffmpeg' in 'D :\Sunil\Zarir_app-main\Zarir_app-main\node_modules\fluent-ffmpeg'
[0] Compiling...
[0] Failed to compile.


and I tried the solution
https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/573#issuecomment-305408048
and other resources but still nothing works and just loops in errors and errors.
Please help if you have any information related to it.
Thank you.


-
Merge commit ’3176217c60ca7828712985092d9102d331ea4f3d’
12 juin 2016, par Clément BœschMerge commit ’3176217c60ca7828712985092d9102d331ea4f3d’
* commit ’3176217c60ca7828712985092d9102d331ea4f3d’ :
h264 : decouple h264_ps from the h264 decoderMain changes :
a local GetBitContext is created for the various
ff_h264_decode_seq_parameter_set() attemptsjust like the old code, remove_sps() is adjusted so it doesn’t remove
the pps.Fixes decode with Ticket #631
http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111108/dae58f17/attachment.mp4
but see next point as well.ff_h264_update_thread_context() is updated to work even when SPS
isn’t set as it breaks current skip_frame code. This makes sure we
can still decode the sample from ticket #631 without the need for
-flags2 +chunks. (Thanks to Michael)keep sps,pps_ref pointers that stay alive even when the active
pps/sps get removed from the available lists (patch by michaelni with
additionnal frees in ff_h264_free_context() from mateo)added a check on sps in avpriv_h264_has_num_reorder_frames() to fix
crashes with mpegts_with_dvbsubs.ts from Ticket #4074
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4074/mpegts_with_dvbsubs.tsin h264_parser.c:h264_parse(), after the ff_h264_decode_extradata() is
called, the pps and sps from the local parser context are updated with
the pps and sps from the used h264context. This fixes fate-flv-demux.in h264_slice.c, "PPS changed between slices" error is not triggered
anymore in one condition as it makes fate-h264-xavc-4389 fails with
THREADS=N (Thanks to Michael)Merged-by : Clément Bœsch <clement@stupeflix.com>
Merged-by : Michael Niedermayer <michael@niedermayer.cc>
Merged-by : Matthieu Bouron <matthieu.bouron@stupeflix.com>- [DH] libavcodec/dxva2_h264.c
- [DH] libavcodec/h264.c
- [DH] libavcodec/h264.h
- [DH] libavcodec/h264_cabac.c
- [DH] libavcodec/h264_cavlc.c
- [DH] libavcodec/h264_direct.c
- [DH] libavcodec/h264_loopfilter.c
- [DH] libavcodec/h264_mb.c
- [DH] libavcodec/h264_mb_template.c
- [DH] libavcodec/h264_mvpred.h
- [DH] libavcodec/h264_parser.c
- [DH] libavcodec/h264_ps.c
- [DH] libavcodec/h264_refs.c
- [DH] libavcodec/h264_sei.c
- [DH] libavcodec/h264_slice.c
- [DH] libavcodec/vaapi_h264.c
- [DH] libavcodec/vdpau.c
- [DH] libavcodec/vdpau_h264.c
- [DH] libavcodec/videotoolbox.c
-
How to make high smooth, high resolution particle motion animations
5 décembre 2019, par algaeFor some time I have been having trouble with producing short movies/animations/gifs which are of sufficiently high resolution. I’m going to use R to generate some frames as a random example, but if there is somewhere else I should be creating frames from to give better results I would be interested in that too.
Creating frames
The kinds of animations I’m interested involve some cloud of ’particles’ moving about the page. There are usually a large number of particles and I would like their motion be as smooth as possible. As a random example, consider the R code (using base graphics and not
ggplot2
as it is far quicker for saving a large number of frames)N <- 500
nFrames <- 250
points <- pracma::randp(n=N, r=1)
rot <- function(p, a) { return(cbind(p[,1]*cos(a) - p[,2]*sin(a), p[,1]*sin(a) + p[,2]*cos(a))) }
cols <- colorRampPalette(c("red", "green", "blue"))(nFrames)
ang <- seq(0, pi, length=N)
# Save frames
png(filename="%d.png")
par(mar=c(0,0,0,0))
for (i in seq(1,N,length=nFrames))
plot(sqrt(i)*rot(points, ang[i]), xlim=sqrt(N)*c(-1,1), ylim=sqrt(N)*c(-1,1), cex=0.5, pch=19, col=cols[i], asp=1, xaxs="i")
dev.off()Frames to animation
There are a number of tools available to chain each frame together into an animation (in R there are also things like
gganimate
which I have tried but did not find convenient or better than the following). I also don’t have any requirements for the resulting file size or time taken to get everything looking as crisp as possible.convert
For short gif style animations a common solution is to do something like
convert -delay 1 -loop 0 *.png g.gif
which givesgifski
Running
gifski -o g.gif *.png
producesThere is an annoying amount of ’jitter’ happening in the transition between frames in both of the above (though less noticeable with
gifski
).ffmpeg
Being gifs, the above will be have limited options for tweaking so I suspect part of the solution lies in using
ffmpeg
. All I would like to know is how to make the animation appear totally smooth without any kind of noticeable blurriness. Here the resulting movies tend to be quite smooth, but resolution is lacking.. e.g. after settingheight=1080
andwidth=1080
inpng()
of the above code we can runfmpeg -i %d.png -s 1080x1080 -c:v libx264 -vf fps=250 -pix_fmt yuv444p out.mp4
If the particles move on a time/space scale smaller than is visible to the naked eye, and we set the frames per second to be the total number of frames, the transition between frames should be seamless, right ? At around the 2 second mark in
out.mp4
you will see some kind of frame drop and similarly right at the beginning. Why does this happen ?Questions
- Is there a standard documented approach to generating high quality animations/movies involving large numbers of ’point-like’ particles ? Do we need more an more frames ?
- How to improve resolution of movies using
ffmpeg
? Should I change from .png format to something vectorised (if so, how) ?
Running Fedora v31.