Recherche avancée

Médias (91)

Autres articles (102)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (8995)

  • Cutting and saving video in folder using ffmpeg

    10 novembre 2015, par Samiksha Singh
    private bool ReturnVideo(string fileName)
    {

       string html = string.Empty;
       //rename if file already exists

       int j = 0;

       string AppPath;

       string inputPath;

       string outputPath;

       // string imgpath;

       AppPath = Request.PhysicalApplicationPath;

       //Get the application path

       inputPath = AppPath + "OriginalVideo";

       //Path of the original file
       outputPath = AppPath + "ConvertVideo";

       //Path of the converted file

       // imgpath = AppPath + "Thumbs";

       //Path of the preview file
           string filepath = Server.MapPath("~/OriginalVideo/" + fileName);
           while (File.Exists(filepath))
           {

               j = j + 1;

               int dotPos = fileName.LastIndexOf(".");

               string namewithoutext = fileName.Substring(0, dotPos);

               string ext = fileName.Substring(dotPos + 1);

               fileName = namewithoutext + j + "." + ext;

               filepath = Server.MapPath("~/OriginalVideo/" + fileName);

           }

           try
           {

               this.fileuploadImageVideo.SaveAs(filepath);

           }

           catch
           {

               // return false;

           }

           string outPutFile;

           outPutFile = "~/OriginalVideo/" + fileName;

           int i = this.fileuploadImageVideo.PostedFile.ContentLength;

           System.IO.FileInfo a = new System.IO.FileInfo(Server.MapPath(outPutFile));
           string cmd = "-y -ss 00:00:00 -to 00:00:10 -i " + inputPath + "\\" + fileName + " -vcodec copy -acodec copy " + outputPath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".mp4";

           ConvertNow(cmd);


           return true;

    }

    private void ConvertNow(string cmd)
    {

       string exepath;

       string AppPath = Request.PhysicalApplicationPath;

       //Get the application path

       exepath = AppPath + "ffmpeg\\ffmpeg.exe";

       Process proc = new Process();

       proc.StartInfo.FileName = exepath;
       //Path of exe that will be executed, only for "filebuffer" it will be "flvtool2.exe"

       proc.StartInfo.Arguments = cmd;
       //The command which will be executed

       proc.StartInfo.UseShellExecute = false;

       proc.StartInfo.CreateNoWindow = true;

       proc.StartInfo.RedirectStandardOutput = false;

       proc.Start();
       //while (proc.HasExited == false)
       //{

       //}

    }
  • How can I start ffmpeg while playing a full screen game ?

    11 janvier 2021, par Muhamed Shair benshair

    This is a class of the ffmpeg :

    


    using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Threading.Tasks;  
using System.IO;  
using System.Diagnostics;  
  
namespace Ffmpeg_App  
{  
    class Ffmpeg  
    {  
        Process process;  
  
        public void Start(string FileName, int Framerate)  
        {  
            process = new System.Diagnostics.Process();  
            process.StartInfo.FileName = @"D:\ffmpegx86\ffmpeg.exe"; // Change the directory where ffmpeg.exe is.  
            process.EnableRaisingEvents = false;  
            process.StartInfo.WorkingDirectory = @"D:\ffmpegx86"; // The output directory  
            process.StartInfo.Arguments = @"-f gdigrab -framerate " + Framerate + " -i desktop -preset ultrafast -                                                                     pix_fmt yuv420p " + FileName;  
            process.Start();  
            process.StartInfo.UseShellExecute = false;  
            process.StartInfo.CreateNoWindow = false;  
            Close();  
        }  
  
        public void Close()  
        {  
            process.Close();  
        }  
    }  
}  


    


    And in form1 :

    


    At the top :

    


    Ffmpeg fmpeg = new Ffmpeg();


    


    In a button click event :
To start :

    


    private void Start_Click(object sender, EventArgs e)  
        {  
            fmpeg.Start("test.mp4", 24);  
        }


    


    and to stop :

    


    private void Stop_Click(object sender, EventArgs e)  
        {  
            fmpeg.Close();  
        }


    


    The problem is when I'm in full screen game I don't have access to the form and the buttons they are hidden in the background.

    


    I need to make some global keys hook maybe ?

    


  • YouPHPTube Encoder is not encoding video [on hold]

    11 octobre 2019, par Tanjima Tani

    I successfully installed YouPHPTube an on demand video script. I tried to encode a local video but it is always in "pending" state. The error of encoding error log is as follows :

    [11-Oct-2019 23:54:25 Asia/Dhaka] Upload.php will set format
    [11-Oct-2019 23:54:25 Asia/Dhaka] Upload.php will let function decide decideFormatOrder
    [11-Oct-2019 23:54:25 Asia/Dhaka] decideFormatOrder: {"file":"myvideo.mp4","audioOnly":"false","spectrum":"false","webm":"false","inputHLS":"false","inputLow":"true","inputSD":"true","inputHD":"true","title":"","description":"","categories_id":"0"}
    [11-Oct-2019 23:54:25 Asia/Dhaka] decideFormatOrder: MP4 All
    [11-Oct-2019 23:54:25 Asia/Dhaka] {"status":"error", "msg":"getDurationFromFile ERROR, File () Not Found"}
    [11-Oct-2019 23:54:25 Asia/Dhaka] YouPHPTube-Encoder sending file to http://localhost/YouPHPTube/youPHPTubeEncoder.json
    [11-Oct-2019 23:54:25 Asia/Dhaka] YouPHPTube-Encoder reading file from
    [11-Oct-2019 23:54:25 Asia/Dhaka] YouPHPTube-Streamer answer {"error":false,"video_id":14}
    [11-Oct-2019 23:54:25 Asia/Dhaka] {"error":false,"format":"mp4","file":"","resolution":"","videoDownloadedLink":null,"target":"http:\/\/localhost\/YouPHPTube\/youPHPTubeEncoder.json","postFields":11,"response_raw":"{\"error\":false,\"video_id\":14}","response":{"error":false,"video_id":14}}
    [11-Oct-2019 17:54:27 UTC] downloadFile: start queue_id = 14
    [11-Oct-2019 17:54:27 UTC] downloadFile: url = http://localhost/YouPHPTube-Encoder/videos/original_myvideo_YPTuniqid_5da0c1d10f5c29.50237780
    [11-Oct-2019 17:54:27 UTC] downloadFile:strpos global['webSiteRootURL'] = http://localhost/YouPHPTube-Encoder/
    [11-Oct-2019 17:54:27 UTC] downloadFile: this file was uploaded from file and thus is in the videos
    [11-Oct-2019 17:54:27 UTC] downloadFile: downloadedFile = /var/www/html/YouPHPTube-Encoder/videos/original_myvideo_YPTuniqid_5da0c1d10f5c29.50237780 | url = http://localhost/YouPHPTube-Encoder/videos/original_myvideo_YPTuniqid_5da0c1d10f5c29.50237780
    [11-Oct-2019 17:54:27 UTC] Try to get UTF8 URL http://localhost/YouPHPTube-Encoder/videos/original_myvideo_YPTuniqid_5da0c1d10f5c29.50237780
    [11-Oct-2019 17:54:27 UTC] Try to get UTF8 decode URL http://localhost/YouPHPTube-Encoder/videos/original_myvideo_YPTuniqid_5da0c1d10f5c29.50237780
    [11-Oct-2019 17:54:27 UTC] downloadFile: success
    [11-Oct-2019 17:54:27 UTC] downloadFile: {"error":false,"filename":"14_tmpFile.mp4","pathFileName":"\/var\/www\/html\/YouPHPTube-Encoder\/videos\/14_tmpFile.mp4"}
    [11-Oct-2019 17:54:27 UTC] sendImages: Sending image to [14]
    [11-Oct-2019 17:54:27 UTC] Duration found: 0:00:26
    [11-Oct-2019 17:54:27 UTC] sendImages: YouPHPTube-Encoder sending file to http://localhost/YouPHPTube/objects/youPHPTubeEncoderReceiveImage.json.php
    [11-Oct-2019 17:54:27 UTC] sendImages: YouPHPTube-Encoder reading file from /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4
    [11-Oct-2019 17:54:27 UTC] getImage: ffmpeg -ss 00:00:13 -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vframes 1 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4.jpg
    [11-Oct-2019 17:54:27 UTC] getImage: takes 0.11579895019531 sec to complete
    [11-Oct-2019 17:54:27 UTC] getGifImage
    [11-Oct-2019 17:54:27 UTC] getGif: Starts
    [11-Oct-2019 17:54:28 UTC] getGif: takes 0.51563596725464 sec to complete
    [11-Oct-2019 17:54:29 UTC] sendImages: curl_init
    [11-Oct-2019 17:54:29 UTC] sendImages: curl_exec
    [11-Oct-2019 17:54:29 UTC] sendImages: YouPHPTube-Streamer answer {"error":false,"video_id":14}
    [11-Oct-2019 17:54:29 UTC] {"error":false,"file":"\/var\/www\/html\/YouPHPTube-Encoder\/videos\/14_tmpFile.mp4","target":"http:\/\/localhost\/YouPHPTube\/objects\/youPHPTubeEncoderReceiveImage.json.php","postFields":6,"response_raw":"{\"error\":false,\"video_id\":14}","response":{"error":false,"video_id":14}}
    [11-Oct-2019 17:54:29 UTC] run:runMultiResolution
    [11-Oct-2019 17:54:29 UTC] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vf scale=-2:720 -movflags +faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_HD.mp4]
    [11-Oct-2019 17:54:29 UTC] ffmpeg -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vf scale=-2:720 -movflags +faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_HD.mp4 --- [] --- (8, /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4, /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_HD.mp4, 14)
    [11-Oct-2019 17:54:29 UTC] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vf scale=-2:540 -movflags +faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_SD.mp4]
    [11-Oct-2019 17:54:29 UTC] ffmpeg -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vf scale=-2:540 -movflags +faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_SD.mp4 --- [] --- (7, /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4, /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_SD.mp4, 14)
    [11-Oct-2019 17:54:29 UTC] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vf scale=-2:360 -movflags +faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_Low.mp4]
    [11-Oct-2019 17:54:29 UTC] ffmpeg -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vf scale=-2:360 -movflags +faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_Low.mp4 --- [] --- (1, /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4, /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_Low.mp4, 14)
    [11-Oct-2019 17:54:29 UTC] Trying again: [1] => Execute code error "Array\n(\n)\n"
    Code: ffmpeg -i /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile.mp4 -vf scale=-2:360 -movflags +faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/YouPHPTube-Encoder/videos/14_tmpFile_converted_Low.mp4
    [11-Oct-2019 23:54:30 Asia/Dhaka] ERROR on get http://localhost/YouPHPTube/plugin/CustomizeAdvanced/advancedCustom.json.php false
    [11-Oct-2019 23:54:30 Asia/Dhaka] PHP Warning:  Creating default object from empty value in /var/www/html/YouPHPTube-Encoder/view/index.php on line 233

    What to do next ? Thanks in advance