
Recherche avancée
Autres articles (52)
-
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...)
Sur d’autres sites (5204)
-
A very simple lightweight video editor
11 novembre 2011, par algorithmicCoderI want to make an editor that does the following :
1) takes an mp3 audio file
2) Takes a picture —a jpg file
3) Outputs a simple video format e.g. .mov which consists of the jpg file with the mp3 file in the background
4) Does NOTHING else
I want to use this as a project to learn just the basics of all this stuff however I do not want to code basic things by hand. Where do I start and what key steps do I take to accomplish this ?
I am decent with PHP and Java and do not mind learning Python for this. I actually would ideally want to write this in Python to gain experience.
Thanks !
-
How to start an FFmpeg process, create a pipe and write data from the parent process ?
3 mai 2021, par xlxsMy code is based on https://stackoverflow.com/a/32279430/5941827.


I run FFmpeg with the following params :


std::stringstream sstm;
sstm << "ffmpeg -loglevel error -y -f rawvideo -vcodec rawvideo -s " << std::to_string(width) << "x" << std::to_string(height) //
 << " -pix_fmt rgb24 -framerate " << std::to_string(fps) << " -i - -c:v libx264 -preset " << getPreset(encodeSpeed) << //
 " -crf " << std::to_string(crf) << " -shortest " << path;



(the variables are initialized in a class constructor correctly)


Then I open the pipe with
pPipe = popen(sstm.str().c_str(), "w")
.The problem is after Ifwrite
to it and callingfclose
, based on the contents I write sometimes less or more bytes reach FFmpeg, and I get

[rawvideo @ 000000000010c3df] Invalid buffer size, packet size 196606 < expected frame_size 196608
Error while decoding stream #0:0: Invalid argument



The saved output video usually has one frame more or less than the expected.
I have checked the array I'm sending trough the pipe with
fwrite
and it's size is correct.
It appears that based on the data I send some bytes don't get there, or more bytes than I send go through the pipe.

I have also tried two different FFmpeg versions, but with the same error message.


-
Send email once FFMPEG video conversion has completed (php)
14 juin 2012, par DinoI have a basic php script which converts an avi using ffmpeg :
<?php
if (exec("/usr/bin/ffmpeg -i testvideo.avi -sameq -ar 22050 convertvideo.mp4 2> logfile.log")){
echo "Success";
}else{
echo "Error";
}
?>now as an extension to this I would like to use php to check if the file is still being converted if not an email should be sent can anyone advise how I can achieve this ?
Also despite using the code above and the file being converted successfully, the output I always get is "Error", can anyone help with this as well ?
Thanks