Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (58)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (7872)

  • ffmpeg from a C# app using Process class - user prompt not shown in standardError

    21 avril 2016, par DarwinIcesurfer

    I am writing an app to run ffmpeg using c#. My program redirects the standardError output to a stream so it can be parsed for progress information.

    During testing I have found a problem :

    If the output is shown in a command window rather than being redirected ffmpeg will display it’s normal headers followed by "file c :\temp\testfile.mpg already exists. overwrite [y]". If I click on the command window and press y the program continues to encode the file.

    If the StandardError is redirected to my handler and then printed to the console, I see the same header information that was displayed in the command window now printed to the console. except for the file...already exists prompt. If I click in the command window and press y the program continues to process the file.

    Is there a stream other than standardOutput or standardError that is used when the operator is prompted for information, or am I missing something else ?

    public void EncodeVideoWithProgress(string filename, string arguments, BackgroundWorker worker, DoWorkEventArgs e)
       {

           Process proc = new Process();

           proc.StartInfo.FileName = "ffmpeg";
           proc.StartInfo.Arguments = "-i " + " \"" + filename + "\" " + arguments;

           proc.StartInfo.UseShellExecute = false;
           proc.EnableRaisingEvents = true;

           proc.StartInfo.RedirectStandardError = true;
           proc.StartInfo.RedirectStandardOutput = false;
           proc.StartInfo.CreateNoWindow = false; //set to true for testing

           proc.ErrorDataReceived += new DataReceivedEventHandler(NetErrorDataHandler);

           proc.Start();
           proc.BeginErrorReadLine();


           StreamReader reader = proc.StandardOutput;
            string line;
            while ((line = reader.ReadLine()) != null)
           { Console.WriteLine(line); }
        proc.WaitForExit();
    }

    private static void NetErrorDataHandler(object sendingProcess,
                  DataReceivedEventArgs errLine)
       {
           if (!String.IsNullOrEmpty(errLine.Data))
           {
               Console.WriteLine(errLine.Data);
           }
       }
  • Surface Texture object is not getting the frames from a Surface Class

    22 avril 2016, par Juan Manuel González Otero

    On the one hand, I have a Surface Class which when instantiated, automatically initialize a new thread and start grabbing frames from a streaming source via native code based on FFMPEG. Here is the main parts of the code for the aforementioned Surface Class :

    public class StreamingSurface extends Surface implements Runnable {

       ...

       public StreamingSurface(SurfaceTexture surfaceTexture, int width, int height) {
           super(surfaceTexture);

           screenWidth  = width;
           screenHeight = height;      
           init();

       }

       public void init() {
           mDrawTop = 0;
           mDrawLeft = 0;
           mVideoCurrentFrame = 0;
           this.setVideoFile();
           this.startPlay();
       }

       public void setVideoFile() {        
           // Initialise FFMPEG
           naInit("");

           // Get stream video res
           int[] res = naGetVideoRes();
           mDisplayWidth = (int)(res[0]);
           mDisplayHeight = (int)(res[1]);

           // Prepare Display
           mBitmap = Bitmap.createBitmap(mDisplayWidth, mDisplayHeight, Bitmap.Config.ARGB_8888);
           naPrepareDisplay(mBitmap, mDisplayWidth, mDisplayHeight);
       }

       public void startPlay() {
           thread = new Thread(this);
           thread.start();
       }

       @Override
       public void run() {
           while (true) {
               while (2 == mStatus) {
                   //pause
                   SystemClock.sleep(100);
               }
               mVideoCurrentFrame = naGetVideoFrame();
               if (0 < mVideoCurrentFrame) {
                   //success, redraw
                   if(isValid()){
                        Canvas canvas = lockCanvas(null);
                        if (null != mBitmap) {
                            canvas.drawBitmap(mBitmap, mDrawLeft, mDrawTop, prFramePaint);
                        }
                        unlockCanvasAndPost(canvas);
                   }
               } else {
                   //failure, probably end of video, break
                   naFinish(mBitmap);
                   mStatus = 0;
                   break;
               }
           }  
       }

    }

    In my MainActivity class, I instantiated this class in the following way :

    public void startCamera(int texture)
    {
       mSurface = new SurfaceTexture(texture);
       mSurface.setOnFrameAvailableListener(this);
       Surface surface = new StreamingSurface(mSurface, 640, 360);
       surface.release();        
    }

    I read the following line in the Android developer page, regarding the Surface class constructor :

    "Images drawn to the Surface will be made available to the SurfaceTexture, which can attach them to an OpenGL ES texture via updateTexImage()."

    That is exactly what I want to do, and I have everything ready for the further renderization. But definitely, with the above code, I never get my frames captured in the surface class transformed to its corresponding SurfaceTexture. I know this because the debugger, for instace, never call the OnFrameAvailableLister method associated with that Surface Texture.

    Any ideas ? Maybe the fact that I am using a thread to call the drawing functions is messing everything ? In such a case, what alternatives I have to grab the frames ?

    Thanks in advance

  • Class 'FFMpeg\FFMpeg\Coordinate\Dimension' not found

    14 juillet 2016, par Vaibhavraj S. Roham

    I am trying to execute basic example of php-ffmpeg library in Laravel 5. I have already installed ffmeg on ubuntu and working fine from command line. I am getting following error while running the example.


    Error

    FatalErrorException in WelcomeController.php line 26 : Class
    ’FFMpeg\FFMpeg\Coordinate\Dimension’ not found


    My Code

    use FFMpeg\FFMpeg;

    class WelcomeController extends Controller {

       public function __construct()
       {
           $this->middleware('guest');
       }

       public function index()
       {
           return view('welcome');
       }

       public function video()
       {

           $ffmpeg = FFMpeg::create();

           $video = $ffmpeg->open('test1.mp4');

           $video
               ->filters()
               ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
               ->synchronize();
           $video
               ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))
               ->save('frame.jpg');
           $video
               ->save(new FFMpeg\Format\Video\X264(), 'export-x264.mp4')
               ->save(new FFMpeg\Format\Video\WMV(), 'export-wmv.wmv')
               ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');
       }
    }

    What would be the error ?