
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (106)
-
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 (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)
Sur d’autres sites (10457)
-
How to scale and mux audio ?
20 décembre 2019, par siods333333First problem is with audio rescaling. I’m trying to redo
doc/examples/transcode_aac.c
so that it also resamples from 41100 to 48000, it contained a warning that it can’t do it.Using
doc/examples/resampling_audio.c
as a reference, I saw that before doingswr_convert
, I need to find the number of audio samples at the output with the code like this :int dst_nb_samples = av_rescale_rnd( input_frame->nb_samples + swr_get_delay(resampler_context, 41100),
48000, 41100, AV_ROUND_UP);Problem is, when I just set
int dst_nb_samples = input_frame->nb_samples
(which is 1024), it encodes and plays normally, but when I do thatav_rescale_rnd
thing (which results in 1196), audio is slowed down and distorted, like there are skips in the audio.Second problem is with trying to mux
webm
withopus
audio.When I set
AVStream->time_base
to1/48000
, and increaseAVFrame->pts
by 960, the resulted file is played in the player as a file that is much bigger. 17 seconds audio shows as 16m11s audio, but it plays normally.When I increase
pts
by 20, it displays normally, but has a lot of[libopus @ 00ffa660] Queue input is backward in time
messages during the encoding. Same forpts
30, still has those messages.Should I try
time_scale
1/1000 ?webm
always have timecodes in milliseconds, andopus
have packet size of 20ms (960 samples at 48000 Hz).Search for
pts += 20;
Here is the whole file, all modification I did are marked with
//MINE
: http://www.mediafire.com/file/jlgo7x4hiz7bw64/transcode_aac.cHere is the file I tested it on http://www.mediafire.com/file/zdy0zarlqw3qn6s/480P_600K_71149981_soundonly.mkv
-
ffmpeg scale doesn't work if destination res is larger than source
21 décembre 2017, par VibokI just tried ffmpeg filter
scale=320x180:force_original_aspect_ratio=disable
to resize a 270x480 video into a 320x180 video, and it still keeps aspect ratio.force_original_aspect_ratio=disable
got ignored.I guess the problem is that the destination width is bigger than the source width, while the destination height is smaller. Because it worked for other videos, even without
force_original_aspect_ratio=disable
.The resulted file is also weird. It says it’s 320x180, while its weight is obliviously smaller than that.
Here are the video files, original and resized. https://drive.google.com/file/d/1UNXlfwpzoizhx7WOjqn44mlcbQgacOHS/view?usp=sharing
Here is my command :
ffmpeg -i 480P_600K_107047752.mp4 -force_key_frames 00:00:03.000 -filter_complex [0:v]scale=320x180:force_original_aspect_ratio=disable,fps=30[vid];[vid]
-
Workflow for creating animated hand-drawn videos - encoding difficulties
8 décembre 2017, par MircodeI want to create YouTube videos, kind of in the style of a white-board animation.
Tldr question : How can I encode into a lossless rgb video format with ffmpeg, including alpha channel ?
More detailed :
My current workflow looks like this :I draw the slides in Inkscape, I group all paths that are to be drawn in one go (one scene so to say) and store the slide as svg. Then I run a custom python script over that. It animates the slides as described here https://codepen.io/MyXoToD/post/howto-self-drawing-svg-animation. Each frame is exported as svg, converted to png and fed to ffmpeg for making a video from it.
For every scene (a couple of paths being drawn, there are several scenes per slide) I create an own video file and then I also store a png file that contains the last frame of that video.
I then use kdenlive to join it all together : A video containing the drawing of the first scene, then a png which holds the last image of the video while I talk about the drawing, then the next animated drawing, then the next still image where I continue talking and so on. I use these intermediate images because freezing the last frame is tedious in kdenlive and I have around 600 scenes. Here I do the editing, adjust the duration of the still images and render the final video.
The background of the video is a photo of a blackboard which never changes, the strokes are paths with a filter to make it look like chalk.
So far so good, everything almost works.
My problem is : Whenever there is a transition between an animation and a still image, it is visible in the final result. I have tried several approaches to make this work but nothing is without flaws.
My first approach was to encode the animations as mp4 like this :
p = Popen(['ffmpeg', '-y', '-f', 'image2pipe', '-vcodec', 'png', '-r', str(fps), '-i', '-', '-vcodec', 'libx264', '-crf', '21', '-bf', '2', '-flags', '+cgop', '-pix_fmt', 'yuv420p', '-movflags', 'faststart', '-r', str(fps), videofile], stdin=PIPE)
which is recommended for YouTube. But then there is a little brightness difference between video and still image.
Then I tried mov with png codec :
p = Popen(['ffmpeg', '-y', '-f', 'image2pipe', '-vcodec', 'png', '-r', str(fps), '-i', '-', '-vcodec', 'png', '-r', str(fps), videofile], stdin=PIPE)
I think this encodes every frame as png in the video. It creates way bigger files since every frame is encoded separately. But it’s ok since I can use transparency for the background and just store the chalk strokes. However, sometimes I want to swipe parts of the chalk on a slide away, which I do by drawing background over it. Which would work if those overlaid, animated background chunks which are stored in the video looked exactly like the underlying png in the background. But it doesn’t. It’s slightly more blurry and I believe the color changes a tiny bit as well. Which I don’t understand since I thought the video just stores a sequence of pngs... Is there some quality setting that I miss here ?
Then I read about ProRes4444 and tried that :
p = Popen(['ffmpeg', '-y', '-f', 'image2pipe', '-vcodec', 'png', '-r', str(fps), '-i', '-', '-c:v', 'prores_ks', '-pix_fmt', 'yuva444p10le', '-alpha_bits', '8', '-profile:v', '4444', '-r', str(fps), videofile], stdin=PIPE)
and this actually seems to work. However, the animation files become larger than the bunch of png files they contain, probably because this format stores 12 bit per channel. This is not thaat horrible since only intermediate videos grow big, the final result is still ok.
But ideally there would be a lossless codec which stores in rgb colorspace with 8 bit per channel, 8 bit for alpha and considers only the difference to the previous frame (because all that changes from frame to frame is a tiny bit of chalk drawing). Is there such a thing ? Alternatively, I’d also be ok without transparency but then I have to store the background in every scene. But if only changes are stored from frame to frame within one scene, that should be manageable.
Or should I make some fundamental changes in my workflow altogether ?
Sorry that this is rather lengthy, I appreciate any help.
Cheers !