
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (22)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
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 (...) -
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 (...)
Sur d’autres sites (3929)
-
How to fill/calculate motion_val in FFMPEG ?
10 février 2015, par MenuItem42I’m trying to get motion vectors of a mpeg video via ffmpeg (in c++).
The problem that I have is, that motion_val along with motion_subsample_log2 and mb_type of the AVFrame class remain empty and/or aren’t initialized (debugger says 0x0) and it seems that they are only available because of compatibility reasons
I’ve read in the ffmpeg wiki, that you can debug the motion vectors of the video via command line withffmpeg -vismv pf -i input.mp4 output.mp4
The result is that the output.mp4 has motion vector arrows. So I searched for the –vismv parameter in the code and found in libavcodec\options.c a long list of options :
{"vismv", "visualize motion vectors (MVs)", OFFSET(debug_mv), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, V|D, "debug_mv"},
I suppose that this line affects somehow debug_mv of AVCodecContext. With this assumption I searched for further information and I found some code snippets which I thought might help.
pAVCodecContext->debug_mv = FF_DEBUG_VIS_MV_P_FOR | FF_DEBUG_VIS_MV_B_FOR | FF_DEBUG_MB_TYPE | FF_DEBUG_MV;
and
pAVCodecContext->debug |= FF_DEBUG_MV;
But both didn’t trigger the calculation or filling of the motion_val array.
By the way my code is based on the code by Victor Hsieh and Jiasi Chen and this code is basically the ffmpeg sourcecode (libavcodec\mpegvideo.c). I also tried to find (also with help of the documentation) the piece of code that triggers the calculation, but because of the complexity of the code I didn’t get any results.
The question is now, if is there any possibility to fill this variables or start the calculation of the motion vector table or is there any other alternative way to get the motion vectors of every block of the mpeg-frames.Edit :
I forgot to mention my ffmpeg versionZeranoe’s FFmpeg version : 2014-07-08 git-14e2406
- libavutil 52. 91.100 / 52. 91.100
- libavcodec 55. 68.102 / 55. 68.102
- libavformat 55. 45.100 / 55. 45.100
- libavdevice 55. 13.101 / 55. 13.101
- libavfilter 4. 10.100 / 4. 10.100
- libswscale 2. 6.100 / 2. 6.100
- libswresample 0. 19.100 / 0. 19.100
- libpostproc 52. 3.100 / 52. 3.100
Changed to a newer version (2.5), but it didn’t change/solve the problem.
-
download and fill file on fly
4 mai 2017, par Gianluca CalabriaI’m trying to create a service for a client which takes some audio chunks and concatenate them. For this I’m using FFmpeg. The user should also be able to download the result on the fly without waiting for the conversion/concatenation to finish. The idea is to "fill" the file as the process goes on. I cannot work my way around it, is it possible to do ? I’m using a RESTful service which calls a class like this one
public ReadableRepresentation serveDownloadRequest(Representation entity) throws SystemInitializationException {
InputStreamChannel inputStreamChannel;
Form reqParameters=getQuery();
try {
String parameters = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS, AudioCutAndJoinParameters.PARAMETERS_MANDATORY);
trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS + "=" + parameters);
String inputUri = readStringParameter(reqParameters, AudioCutAndJoinParameters.INPUT_URI, AudioCutAndJoinParameters.INPUT_URI_MANDATORY);
trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.INPUT_URI + "=" + inputUri);
String markInRelative = readStringParameter(reqParameters, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE_MANDATORY);
trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.MARKIN_ID_RELATIVE + "=" + markInRelative);
String parametersString = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS_STRING, AudioCutAndJoinParameters.PARAMETERS_STRING_MANDATORY);
trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS_STRING + "=" + parametersString);
String cmdFolder = readStringParameter(reqParameters, AudioCutAndJoinParameters.COMMAND_FOLDER, AudioCutAndJoinParameters.COMMAND_FOLDER_MANDATORY);
trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.COMMAND_FOLDER + "=" + cmdFolder);
Map markInIdRelativeMap=JsonEntityManager.getInstance().deserializeMap(markInRelative);
Map parametersMap=JsonEntityManager.getInstance().deserializeMap(parameters);
List <string> InputUri= JsonEntityManager.getInstance().deserializeList(inputUri);
InputStream transcodeOutput = Services.getInstance().runAudioCutAndJoin(parametersMap,markInIdRelativeMap,InputUri,parametersString,cmdFolder);
inputStreamChannel = new InputStreamChannel(transcodeOutput);
ReadableRepresentation result = new ReadableRepresentation(inputStreamChannel, MediaType.AUDIO_ALL);
Disposition disp = new Disposition(Disposition.TYPE_ATTACHMENT);
disp.setFilename("test-cut.wav");
result.setDisposition(disp);
return result;
</string>I’m using the
process.getInputStream()
as return of myrunAudioCutAndJoin
but no download happens until the process of conversion/concatenation is done. Can somebody please help me out ? -
Correctly Allocate And Fill Frame In FFmpeg
14 avril 2022, par Michel FeinsteinI am filling a
Frame
with a BGR image for encoding, and I am getting a memory leak. I think I got to the source of the problem but it appears to be a library issue instead. Since FFmpeg is such a mature library, I think I am misusing it and I would like to be instructed on how to do it correctly.


I am allocating a
Frame
using :


AVFrame *bgrFrame = av_frame_alloc();




And later I allocate the image in the
Frame
using :


av_image_alloc(bgrFrame->data, bgrFrame->linesize, bgrFrame->width, bgrFrame->height, AV_PIX_FMT_BGR24, 32);




Then I fill the image allocated using :



av_image_fill_pointers(bgrFrame->data, AV_PIX_FMT_BGR24, bgrFrame->height, originalBGRImage.data, bgrFrame->linesize);




Where
originalBGRImage
is an OpenCVMat
.


And this has a memory leak, apparently,
av_image_alloc()
allocates memory, andav_image_fill_pointers()
also allocates memory, on the same pointers (I can seebgrFrame->data[0]
changing between calls).


If I call



av_freep(&bgrFrame->data[0]);




After
av_image_alloc()
, it's fine, but if I call it afterav_image_fill_pointers()
, the program crashes, even thoughbgrFrame->data[0]
is notNULL
, which I find very curious.


Looking FFmpeg's
av_image_alloc()
source code, I see it callsav_image_fill_pointers()
twice inside it, once allocating a bufferbuff
....and later inav_image_fill_pointers()
source code,data[0]
is substituted by the image pointer, which is (I think) the source of the memory leak, sincedata[0]
was holdingbuf
from the previousav_image_alloc()
call.


So this brings the final question : What's the correct way of filling a frame with an image ?.