Recherche avancée

Médias (91)

Autres articles (22)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (5086)

  • FPS shown in ffmpeg does not match with total frames/duration

    14 juin 2020, par Lincolnhuj

    FPS is defined as number of frames per second. But when I try to calculate FPS using total frames / duration, I get slightly different number than the FPS shown in ffmpeg :

    



    For this video http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4
using ffmpeg, we can get its FPS, duration and total frames :

    



    


    ffprobe -select_streams v -show_streams ForBiggerFun.mp4 | grep nb_frames

    


    



    nb_frames=1440

    



    


    ffmpeg -i ForBiggerFun.mp4

    


    



    23.98 fps
Duration : 00:01:00.07

    



    If we calculate duration per frame using nb_frames, we get
fps = nb_frames/Duration = 1440/60.07 = 23.972032628599965, which is different from 23.98

    



    Which value is more reliable ? Does the difference means duration of a frame might be different from others (frames are not evenly distributed) ?

    


  • PHP - Upload video convert mp4 and upload to Amazon S3

    31 octobre 2019, par Kadir Geçit

    I’m using amazon s3 as video storage for my website. I’m having problems for some videos. black screen or sound problems etc.

    I want to convert the video to mp4 format after uploading the video to my server and then upload it to amazon. Is it possible with FFMPEG ?

    I’m using this code for uploading files now :

    $file1 = $_FILES['file']['name'];
    $videoFileType = strtolower(pathinfo($file1,PATHINFO_EXTENSION));
    $file_name = sprintf('%s_%s', uniqid(),uniqid().".".$videoFileType);
    $temp_file_location = $_FILES["file"]["tmp_name"];

    require 'application/libraries/Amazon/aws-autoloader.php';
           $s3 = new Aws\S3\S3Client([
               'region'  => $amazon_region,
               'version' => 'latest',
               'credentials' => [
               'key'    => $amazon_key,
               'secret' => $amazon_secret,
               ]
           ]);    

           $result = $s3->putObject([
               'Bucket' => $amazon_bucket,
               'Key'    => $file_name,
               'SourceFile' => $temp_file_location,
               'ACL'    => 'public-read',
               'CacheControl' => 'max-age=3153600',
           ]);
               $filepath = $result['ObjectURL'] . PHP_EOL;

               echo json_encode([
                   'status' => 'ok',
                   'path' => $filepath

               ]);
  • 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);
           }
       }