
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (112)
-
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (6383)
-
why type casting on non-pointer struct give syntax error
31 mars 2016, par Sany LiewI am using Visual C++ express 2008 try to compile code similar to below :
no problem
{
...
AVRational test = {1, 1000};
...
}but has problem when it is as below :
{
...
AVRational test = (AVRational){1, 1000};
...
}gave errors :
1>..\..\..\projects\test\xyz.cpp(1139) : error C2059: syntax error : '{'
1>..\..\..\projects\test\xyz.cpp(1139) : error C2143: syntax error : missing ';' before '{'
1>..\..\..\projects\test\xyz.cpp(1139) : error C2143: syntax error : missing ';' before '}'where AVRational (ffmpeg.org library) is defined as :
typedef struct AVRational{
int num; ///< numerator
int den; ///< denominator
} AVRational;FFmpeg come with some pre-define value such as
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
which is used as below
av_rescale_q(seek_target, AV_TIME_BASE_Q, pFormatCtx->streams[stream_index]->time_base);
will failed to compile on Visual C++ express 2008
It seem like the same code will be compiled with no error/warning on gcc compiler. Why I get this error on VC++ ? Is it a C/C++ standard way to do casting on struct value ? Anyway I can avoid this error while still able to use the defined AV_TIME_BASE_Q ?
-
ffmpeg - when merging an image and audio, audio gets shortened
25 août 2014, par GaryI am trying to merge a png image with 11 seconds of audio and create an mp4 file. When I execute ffmpeg I end up with a total duration of 10 seconds for the mp4 file. The command I’m using is...
ffmpeg -r 6 -loop 1 -i "image1.png" -i "audio1.wav" out.mp4
UPDATE : Here is the log that is produced...
FFmpeg version SVN-r15986, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --extra-cflags=-fno-common --enable-memalign-hack --enable-pthr
eads --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libtheora
--enable-libspeex --enable-libfaac --enable-libgsm --enable-libx264 --enable-lib
schroedinger --enable-avisynth --enable-swscale --enable-gpl
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 6. 0 / 52. 6. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
built on Dec 3 2008 01:59:37, gcc: 4.2.4
Input #0, image2, from 'image1.png':
Duration: 00:00:00.16, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, rgb32, 400x300, 6.00 tb(r)
Input #1, wav, from 'audio1.wav':
Duration: 00:00:11.07, bitrate: 88 kb/s
Stream #1.0: Audio: pcm_u8, 11025 Hz, mono, s16, 88 kb/s
File 'out.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'out.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 400x300, q=2-31, 200 kb/s, 6.00 tb(c)
Stream #0.1: Audio: libfaac, 11025 Hz, mono, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 1 fps= 0 q=4.1 Lsize= 42kB time=0.17 bitrate=2063.7kbits/s
video:14kB audio:26kB global headers:0.kB muxing overhead 4.894235%I have also tried using
ffmpeg -loop 1 -i "image1.png" -i "audio1.wav" -t 11 out.mp4
This command does create an mp4 of 11 seconds but the audio is still cut off at 10 seconds.
Why is the audio being cutoff at 10 seconds ?
Thanks,
Gary -
Why am I getting an error for stream #0.1 ?
30 juillet 2014, par Rob Avery IVI’m converting videos using ffmpeg-php. Here is my code :
// Set our source file
$srcFile = $uploadFilm.".".$film_type;
$destFile = $uploadFilm;
$ffmpegPath = "ffmpeg";
// Create our FFMPEG-PHP class
$ffmpegObj = new ffmpeg_movie($srcFile);
// Save our needed variables
$srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
$srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
$srcFPS = $ffmpegObj->getFrameRate();
if($ffmpegObj->hasAudio()){
$srcAB = intval($ffmpegObj->getAudioBitRate()/1000);
$srcAR = $ffmpegObj->getAudioSampleRate();
}else{
$srcAB = 0;
$srcAR = 0;
}
// Call our convert using exec()
//$command = $ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . "k -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile;
//$command = "whoami";
$command = $ffmpegPath . ' -i ' .'"'. $srcFile . '" -ar ' . $srcAR . ' -ab ' . $srcAB . 'k -f flv -s ' . $srcWidth . 'x' . $srcHeight . ' "' . $destFile . '" 2>&1';
$outputCommand = array();
$status = 1;
exec($command, $outputCommand, $status);The output gives out this error at the end :
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
I know that both
$srcAB
and$srcAR
have values because this is the command this being ran :ffmpeg -i source -ar 48000 -ab 160k -f flv -s 1920x1080 destination
Of course, after the command is executed, the "convert video" has a size 0, which means it didn’t convert it.
What am I missing here ?
EDIT : Here is my full output :
FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 18 2014 08:41:45 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)
configuration: --enable-libmp3lame --disable-mmx --enable-shared
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 1 / 0.16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.93. 0 / 52.93. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.74. 0 / 1.74. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/path/to/file/bbb_sunflower_1080p_30fps_normal.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2013-12-16 17:44:39
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
genre : Animation
composer : Sacha Goedegebure
Duration: 00:10:34.60, start: 0.000000, bitrate: 3481 kb/s
Stream #0.0(und): Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 2998 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc
Metadata:
creation_time : 2013-12-16 17:44:39
Stream #0.1(und): Audio: mp3, 48000 Hz, 2 channels, s16, 160 kb/s
Metadata:
creation_time : 2013-12-16 17:44:42
Stream #0.2(und): Audio: ac3, 48000 Hz, 6 channels, s16, 320 kb/s
Metadata:
creation_time : 2013-12-16 17:44:42
[buffer @ 0x2231e20] w:1920 h:1080 pixfmt:yuv420p
Output #0, flv, to '/path/to/file/bbb_sunflower_1080p_30fps_normal.flv':
Stream #0.0(und): Video: flv, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 30 tbc
Metadata:
creation_time : 2013-12-16 17:44:39
Stream #0.1(und): Audio: libmp3lame, 48000 Hz, 6 channels, s16, 160 kb/s
Metadata:
creation_time : 2013-12-16 17:44:42
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height