Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (103)

Sur d’autres sites (12995)

  • Add logo or watermark to Converted video using ffmpeg and PHP

    27 mars 2022, par Medicare Advisors

    We are converting videos to MP4 using FFMPEG.

    


    We did a lot of research, however we cannot figure out how to add the company logo as a logo or a water mark to the converted video

    


    PHP code

    


    &lt;?php &#xA;$uploads_dir = &#x27;original/&#x27;;&#xA;$file_name = basename($_FILES[&#x27;file&#x27;][&#x27;name&#x27;]);&#xA;$output_name = explode(&#x27;.&#x27;, $file_name)[0];&#xA;$uploaded_file = $uploads_dir . $file_name;&#xA;$convert_status = [&#x27;mp4&#x27; => 0, &#x27;webm&#x27; => 0];&#xA;&#xA;if(isset($_POST[&#x27;submit&#x27;])) {&#xA;  if(move_uploaded_file($_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;], $uploaded_file)) {&#xA;    // Make sure to get the correct path to ffmpeg&#xA;    // Run $ where ffmpeg to get the path&#xA;    $ffmpeg = &#x27;/bin/ffmpeg&#x27;;&#xA;    &#xA;    // MP4&#xA;    $video_mp4 = $output_name . &#x27;.mp4&#x27;;&#xA;    exec($ffmpeg . &#x27; -i "&#x27; . $uploaded_file . &#x27;" -vcodec h264 -acodec libfdk_aac "./converted/&#x27; . $video_mp4 . &#x27;" -y 1>convert.txt 2>&amp;1&#x27;, $output, $convert_status[&#x27;mp4&#x27;]);&#xA;&#xA;    // Debug&#xA;    // echo &#x27;<pre>&#x27; . print_r($output, 1) . &#x27; </pre>&#x27;;&#xA;&#xA;   &#xA;&#xA;    // Debug&#xA;    // echo &#x27;<pre>&#x27; . print_r($output, 1) . &#x27; </pre>&#x27;;&#xA;  }&#xA;}&#xA;?>&#xA;

    &#xA;

    The logo we want to add is on : https://propeview.com/wp-content/uploads/2021/08/logo-whiteb.png

    &#xA;

  • Close ogg stream upon error when using AV_EF_EXPLODE.

    20 novembre 2017, par Dale Curtis
    Close ogg stream upon error when using AV_EF_EXPLODE.
    

    Without this there can be multiple memory leaks for unrecognized
    ogg streams.

    Signed-off-by : Dale Curtis <dalecurtis@chromium.org>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/oggdec.c
  • ffmpeg's strange behaviour-Conversion started when I close my application

    16 décembre 2013, par m.qayyum

    I'm using ffmpeg in my application to rotate video, but problem is that when I start conversion ffmpeg only shows it's version information and not start the actual conversion, but when I close my application ffmpeg process remains in Running Processes in Taskbar and start to convert the file.

    ffmpeg output
    enter image description here

    Here is my code, please tell me where i'm doing it wrong.

    void ConvertVideo(object[] arr) {

       string Argument = (string)arr[0];
       string OutputFolder = (string)arr[1];
       string ConvertedFile = (string)arr[2];


       UpdateStatus("Converting! Please wait...");
       ffmpeg = new Process();
       ffmpeg.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
       ffmpeg.StartInfo.FileName = "ffmpeg.exe";
       ffmpeg.StartInfo.UseShellExecute = false;
       ffmpeg.StartInfo.RedirectStandardError = true;
       ffmpeg.StartInfo.RedirectStandardOutput = true;
       ffmpeg.StartInfo.CreateNoWindow = true;
       ffmpeg.StartInfo.Arguments = Argument;
       ffmpeg.Start();
       myStreamReader = ffmpeg.StandardError;
       outputLine = myStreamReader.ReadLine();
       UpdateRTB(outputLine);//Write line to ritchtextbox
       do
       {
           if (outputLine.Contains("muxing overhead"))
           {
               UpdateStatus("Muxing video");
           }

           if (outputLine.StartsWith("frame"))
           {
               UpdateStatus("Converting video");
           }
       }
       while (!(ffmpeg.HasExited &amp; (string.Compare(outputLine, "") == 0 | outputLine == null)));
       ffmpeg.Close();
       myStreamReader.Close();
       UpdateStatus("Convertion completed successfully");
    }