
Recherche avancée
Autres articles (70)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (9286)
-
Merge commit 'cc1c94dacd0642ac1a6cad45deb65071f127d91a'
19 février 2018, par James Almer -
Permission denied when trying to call ffmpeg on heroku
1er décembre 2013, par chuck wI have a rails 3.1 web app on Heroku (cedar) that that allows users to post stories with photo and video attachments using the paperclip gem (3.5.1). Uploads are stored on s3. This has been working 100% for many months.
I have recently added video transcoding and thumbnailing to my dev machine with the paperclip-ffmpeg gem (1.0.1) and ffmpeg running locally. This is also working.
I've followed these instructions to build and install ffmpeg on heroku, and I've altered my Heroku app's path so that it reads as follows :
PATH: bin:vendor/ffmpeg/bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
and my app's LD_LIBRARY_PATH so that it reads as follows :
LD_LIBRARY_PATH: vendor/ffmpeg/lib:/usr/local/lib
Finally, I've vendored ffmpeg into my app with the following structure :
When I commit and push these changes to Heroku and POST a story that has a video I get the following output on Heroku logs :
2013-11-30T22:51:46.711010+00:00 app[web.1]: Started POST "/stories" for 71.80.218.93 at
2013-11-30 22:51:46 +0000
2013-11-30T22:51:47.023119+00:00 app[web.1]: Cocaine::ExitStatusError (Command 'ffprobe
"/tmp/sideways video20131130-2-14w1q4j.mp4" 2>&1' returned 126. Expected 0
2013-11-30T22:51:47.023119+00:00 app[web.1]: Here is the command output:
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.023119+00:00 app[web.1]: app/controllers/stories_controller.rb:11:in
`create'
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.019228+00:00 heroku[router]: at=info method=POST path=/stories
host=myapp.herokuapp.com fwd="71.80.218.93" dyno=web.1 connect=1ms
service=3130ms status=500 bytes=754
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.023600+00:00 app[web.1]: cache: [POST /stories] invalidate, pass
2013-11-30T22:51:47.023119+00:00 app[web.1]: sh: ffprobe: Permission denied
2013-11-30T22:51:47.023119+00:00 app[web.1]: ):Also, running the console command :
heroku run "ffmpeg -version" -a myapp
returns :Running ffmpeg -version attached to terminal... up, run.6591
bash: vendor/ffmpeg/bin/ffmpeg: Permission deniedHere is my Post model paperclip set-up :
class Post < ActiveRecord::Base
attr_accessible :contents, :photo, :video
belongs_to :story, :touch => true
belongs_to :user, :touch => true
has_attached_file :photo,
:styles => {
:thumb => ["100x140>", :jpg],
:medium => ["400x400>", :jpg],
:large => ["800x800>", :jpg]
},
:processors => [:thumbnail],
:storage => :s3,
:s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
:path => "/:style/:id/:filename"
has_attached_file :video,
:storage => :s3,
:s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
:path => "/video/:id/:filename",
:styles => {
:thumb => { :geometry => "140x100#", :format => 'jpg', :time => 10 },
:medium => { :geometry => "480x360", :format => 'mp4' },
}, :processors => [:ffmpeg]Why am I getting these "permission denieds" ? Any help would be greatly appreciated !!!
-
Streaming jpegs to a video on my server
2 décembre 2013, par Andrew SimpsonI found a solution to my problem IF I was using a Linux/UNIX machine. It is FFServer from the tools from FFMPEG.
I had been using FFMPEG on my client Winform Desktop C# to convert jpegs into an OGG video file for playback.
I have now been tasked with uploading the jpegs to my server and rendering it as a video.
Optimum, I would start an FFMPEG process on my client PC and supply its stdin with jpegs in byte array format. I have achieved this (I have looked around) but is there a way to redirect the stdoutput to my server that can be picked up by my code on the server and render in real-time to my web User ?
I have looked on the ffmpeg web site but I am unsure how to 'fit' it in with my process.
This is my code so far :
public byte[] EncodeAndUploadImages(string _args1, string _fn)
{
byte[] _data = null;
try
{
clientBuild = new Process();
clientBuild.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
clientBuild.StartInfo.Arguments = " -f mjpeg -r 30 -i - -c:v libtheora -q:v 7 -r 30 -f ogg -";
clientBuild.StartInfo.FileName = Environment.CurrentDirectory + @"\ffmpeg.exe";
clientBuild.StartInfo.UseShellExecute = false;
clientBuild.StartInfo.RedirectStandardOutput = true;
clientBuild.StartInfo.RedirectStandardError = true;
clientBuild.StartInfo.RedirectStandardInput = true;
clientBuild.StartInfo.CreateNoWindow = true;
clientBuild.StartInfo.LoadUserProfile = false;
clientBuild.EnableRaisingEvents = true;
clientBuild.Start();
using (BinaryWriter bw = new BinaryWriter(clientBuild.StandardInput.BaseStream))
{
//I am simulating a stream of jpegs coming in////////////////
for (int i = 1; i < 20; i++)
{
using (MemoryStream ms = new MemoryStream())
{
System.Diagnostics.Debug.Write(i.ToString("00000"));
Bitmap bmp = new Bitmap("h:\\streamin\\" + i.ToString("00000") + ".jpg");
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
bw.Write(ms.ToArray());
bmp.Dispose();
ms.Close();
}
}
bw.Close();
}
// I need some in my ffmpeg arguments to do something here//////
mStandardOutput = clientBuild.StandardOutput.BaseStream;
mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);
clientBuild.WaitForExit();
_data = mStandardOutputMs.ToArray();
mStandardOutput.Close();
}
catch (Exception _ex)
{
}
finally
{
clientBuild.Dispose();
}
return _data;
}Thanks