
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (106)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (11512)
-
avcodec_open2 returns Invalid Argument (errnum -22)
7 avril 2023, par noklaI am trying to encode a vector of AVFrames to an MP4 file using the h264 codec.


Everything seems to work fine until the avcodec_open2 function, which returns an "Invalid Argument" (-22) error.


*The stream parameter is a pointer to AVStream.


Here is the code that sets the stream parameters :


stream->codecpar->codec_id = AV_CODEC_ID_H264;
 stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
 stream->codecpar->width = settings.resolution[0]; // 270
 stream->codecpar->height = settings.resolution[1]; // 480
 stream->codecpar->format = AV_PIX_FMT_YUV420P;
 stream->codecpar->bit_rate = 400000;
 AVRational framerate = { 1, 30};
 stream->time_base = av_inv_q(framerate);



And here is the code that opens the codec context :


// Open the codec context
 AVCodecContext* codec_ctx = avcodec_alloc_context3(codec);
 if (!codec_ctx) {
 std::cout << "Error allocating codec context" << std::endl;
 avformat_free_context(format_ctx);
 return;
 }

 ret = avcodec_parameters_to_context(codec_ctx, stream->codecpar);
 if (ret < 0) {
 std::cout << "Error setting codec context parameters: " << av_err2str(ret) << std::endl;
 avcodec_free_context(&codec_ctx);
 avformat_free_context(format_ctx);
 return;
 }

 ret = avcodec_open2(codec_ctx, codec, nullptr);
 if (ret < 0) {
 wxMessageBox("Error opening codec: ");
 wxMessageBox(av_err2str(ret));
 avcodec_free_context(&codec_ctx);
 avformat_free_context(format_ctx);
 return;
 }



I tried the solution that @philipp suggested in ffmpeg-avcodec-open2-returns-invalid-argument but it didn't resolve my error.


I don't know what's causing this error in my code, can someone please help me ?


-
Problem : av_seek_frame() always returns me the beginning of the video
3 novembre 2020, par ZWenI'm currently trying to making use of FFMpeg to build a player. When I'm using av_seek_frame() to change the timestamp, it always gives me the beginning of the stream.


Here is my code :


bool XDemux::Seek(double pos)
{
 mux.lock();
 if (!ic)
 {
 mux.unlock();
 return false;
 }
 avformat_flush(ic);

 long long seekPos = 0;
 seekPos = ic->streams[videoStream]->duration * pos;
 int re = av_seek_frame(ic, videoStream, seekPos, AVSEEK_FLAG_BACKWARD | AVSEEK_FLAG_FRAME);
 mux.unlock();
 if (re < 0)
 {
 return false;
 }
 return true;
}



Where ic and mux are defined as


AVFormatContext* ic
std::mutex mux;



When I'm trying to call the Seek function and print out the frame index, it will be something like :


//Read() is called:
0 0 21 42 40 ...
//Then Seek(0.9) is called, should have begin with a later frame, but it also returns me:
0 0 21 42 40 ...



-
PHP ffmpeg exec returns null
19 mars 2012, par benedict_wI'm trying to run ffmpeg through a PHP exec call, I've been debugging for a while and looked at lot of responses on here, but still not found any answers...
My simplified call is :
$cmd = 'ffmpeg 2>&1';
exec(escapeshellcmd($cmd), $stdout, $stderr);
var_dump($stderr);
var_dump($stdout);
var_dump($cmd);
exit;My output is $stderr = int(1) and $stdout = array(0)
Also I tried
shell_exec($cmd)
which returnsNULL
.cmd.exe has permissions set for the IUSR account - e.g. I can run
$cmd = 'dir'
and see a directory listing output.PHP is not running in safe mode.
The ffmpeg.exe is in the same directory as my php file, but I have the same response giving an absolute path to the ffmpeg.exe file in
$cmd
.ffmpeg is executing fine from the command line.
I'm running Windows XP, IIS and PHP 5.3.
EDIT :
If I run 'ffmpeg -h' I get the help commands, which must indicated that ffmpeg is recognised
I've increased the PHP memory limit to 1024 - no luck.