
Recherche avancée
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (10104)
-
FFmpeg error Unable to load FFMpeg during parallel encoding
1er janvier 2021, par DrJohnI'd like to build web service on the Laravel platform which allows users upload some videos on a server. During uploading video files I use ffmpeg to encode them and compress.
I can't install ffmpeg on my hosting and so I have downloaded packages and executable files from https://ffmpeg.org/download.html and locate them on my web directory. Then I make all steps to install ffmpeg in my Laravel project.
I try to upload a video file and it's OK. The time to upload and encode is about 20 seconds. During encoding of the first video file I try to upload the second. And the second video file falls with the error "Unable to load FFMpeg". But the first video file is encoded successfully. When the first encoding is completed and I repeat uploading the second file it encoded successfully as well.
So I think that ffmpeg can work only with only one file at the time and I can't build multi-user service.
Please help me to find solution.


Here is a peace of code which use to encode files :


try {
 $pub_path = Storage::disk('public')->getAdapter()->getPathPrefix();
 $videopath =$pub_path . $myusertheme->public_reference.'/'.$this->random_filename(25,'','mp4');
 //echo (Storage::disk('public')->getAdapter()->getPathPrefix().'<br />');
 echo ($videopath);
 $ffmpeg = \FFMpeg\FFMpeg::create([
 'ffmpeg.binaries' => "./usr/bin/ffmpeg",
 'ffprobe.binaries' => "./usr/bin/ffprobe",
 'timeout' => 3600, // The timeout for the underlying process
 'ffmpeg.threads' => 12, // The number of threads that FFMpeg should use
 'set_command_and_error_output_on_exception' => true,
 ]);
 $vid=$ffmpeg->open($request->file('videofile')->getRealPath());
 $vid->save(new \FFMpeg\Format\Video\X264('libmp3lame', 'libx264'), $videopath);

/*
 $videopath = $myusertheme->public_reference.'/'.$this->random_filename(25,'','mp4');
 //FFMpeg::fromDisk('local_root')
 $ffmpeg
 ->open($request->file('videofile')->getRealPath())
 ->export()
 ->onProgress(function ($percentage) {
 //echo ($percentage.'/n');
 if ($percentage===100)
 {

 $videopath = $this->random_filename(25,'','mp4');
 }})
 ->inFormat(new \FFMpeg\Format\Video\X264('libmp3lame', 'libx264'))
 ->toDisk('public')
 ->save($videopath);

*/

 } catch (EncodingException $exception) {
 $videopath = null;
 $command = $exception->getCommand();
 $errorLog = $exception->getErrorOutput();
 echo $errorLog;
 return \Response::json('Ошибка кодировки файла', 500);

 }



-
FFMPEG extract frame-accurate video fragments with minimal transcoding
9 mars 2018, par LeeroyHow can I extract frame-accurate video or audio fragments using FFMPEG without transcoding the full portion ?
ffmpeg -i input.mp4 -ss 00:00:01.234 -to 00:00:05.678 output.mp4
works because it re-encodes... If I use-codec: copy
then it disregards the precision of my start and end time arguments and instead uses the closest keyframe (I understand).Is there a command or combination of commands to instruct FFMPEG to transcode only what’s needed, the bits near the start/end markers, up to keyframes ?
EDIT : A bit of context... I’m trying to write this function to process video piped from
youtube-dl
, perhaps even as a service. So it matters that I minimize bandwidth (downloading to timestamp and discarding after) and CPU utilization (re-encoding all of the fragment). -
Getting ffmpeg to work with Heroku
23 octobre 2016, par scientifficI attempted to install ffmpeg for my Heroku Rails app and now my app is crashing.
I added a buildpack using the following command :
heroku config:add BUILDPACK_URL=https://github.com/shunjikonishi/heroku-buildpack-ffmpeg
After pushing to Heroku, I get the following error according to my logs :
2013-11-17T17:50:44.022351+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 47171`
2013-11-17T17:50:46.295602+00:00 app[web.1]: bash: bundle: command not found
2013-11-17T17:50:47.589491+00:00 heroku[web.1]: Process exited with status 127
2013-11-17T17:50:47.597968+00:00 heroku[web.1]: State changed from starting to crashed
2013-11-17T17:50:48.620853+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ (...) fwd="76.118.180.235" dyno= connect= service= status=503 bytes=
2013-11-17T17:50:48.847288+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=(...) fwd="76.118.180.235" dyno= connect= service= status=503 bytes=When I run heroku run rake db:migrate, I get the error :
Running `rake db:migrate` attached to terminal... up, run.9791
(in /app)
rake aborted!
no such file to load -- bundler/setup
rubygems/custom_require>:29:in `require'
rubygems/custom_require>:29:in `require'
/app/config/boot.rb:6:in `<top>'
rubygems/custom_require>:29:in `require'
rubygems/custom_require>:29:in `require'
/app/config/application.rb:1:in `<top>'
rubygems/custom_require>:29:in `require'
rubygems/custom_require>:29:in `require'
/app/Rakefile:5:in `<top>'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>'
</main></top></top></top>When I check the version of bundler I’m using (bundle show bundler), I get :
/Users/(...).rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:284: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/Users/(...)/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5How can I solve this problem ?