Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (32)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (5501)

  • Error finding watermark path using ffmpeg in asp.net application

    27 août 2013, par irfanmcsd

    I am using .net ffmpeg wrapper to post watermark on videos. Posting watermark works fine if i execute ffmpeg command directly but failed to find suitable watermark png file location if command executed via asp.net application.

    here is sample ffmpeg command

    string RootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);
    _mhandler.FFMPEGPath = RootPath + "/ffmpeg_aug_2013/bin/ffmpeg.exe";
    _mhandler.InputPath = RootPath + "/contents/original";
    _mhandler.OutputPath = RootPath + "/contents/mp4";
    _mhandler.BackgroundProcessing = false;
    _mhandler.FileName = "wildlife.wmv";
    _mhandler.OutputFileName = "wildlife_ddd";
    string presetpath = RootPath + "/ffmpeg_aug_2013/presets/libx264-ipod640.ffpreset";
    _mhandler.OutputExtension = ".mp4";
    _mhandler.Parameters = "-s 640x380 -b:v 500k -bufsize 500k -b:a 128k -ar 44100 -c:v libx264 -vf \"movie = watermark.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]\"";
    _mhandler.Parameters = _mhandler.Parameters + " -fpre \"" + presetpath + "\"";
    VideoInfo info =  _mhandler.Process();

    i tried direct code too

    string _out = "";
    Process _process = new Process();
    _process.StartInfo.UseShellExecute = false;
    _process.StartInfo.RedirectStandardInput = true;
    //_process.StartInfo.RedirectStandardOutput = true;
    _process.StartInfo.RedirectStandardError = true;
    _process.StartInfo.CreateNoWindow = true;
    _process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    _process.StartInfo.FileName = _ffmpegpath;
    _process.StartInfo.Arguments = cmd;
    if (_process.Start())
    {            
       _process.WaitForExit(ExitProcess);
       _out = _process.StandardError.ReadToEnd();
       if (!_process.HasExited)
         _process.Kill();

       return _out;
    }

    ffmpeg error output as

    FFMPEG Output:ffmpeg version N-55753-g88909be Copyright (c) 2000-2013
    the FFmpeg developers built on Aug 24 2013 21:40:51 with gcc 4.7.3
    (GCC) configuration : —enable-gpl —enable-version3
    —disable-w32threads —enable-avisynth —enable-bzlib —enable-fontconfig —enable-frei0r —enable-gnutls —enable-iconv —enable-libass —enable-libbluray —enable-libcaca —enable-libfreetype —enable-libgsm —enable-libilbc —enable-libmodplug —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-librtmp —enable-libschroedinger —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libtwolame —enable-libvo-aacenc —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libx264 —enable-libxavs —enable-libxvid —enable-zlib libavutil 52. 42.100 / 52. 42.100 libavcodec 55. 29.100 / 55. 29.100 libavformat 55. 14.102 / 55. 14.102 libavdevice 55. 3.100
    / 55. 3.100 libavfilter 3. 82.102 / 3. 82.102 libswscale 2. 5.100 / 2.
    5.100 libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100 [asf @ 024c9960] Stream #0 : not enough frames to estimate rate ; consider increasing probesize Guessed Channel Layout for Input Stream

    0.0 : stereo Input #0, asf, from 'F :\own\mhp_new/contents/original\wildlife.wmv' : Metadata :

    SfOriginalFPS : 299700 WMFSDKVersion : 11.0.6001.7000 WMFSDKNeeded :
    0.0.0.0000 comment : Footage : Small World Productions, Inc ; Tourism New Zealand | Producer : Gary F. Spradling | Music : Steve Ball title :
    Wildlife in HD copyright : © 2008 Microsoft Corporation IsVBR : 0
    DeviceConformanceTemplate : AP@L3 Duration : 00:00:30.09, start :
    0.000000, bitrate : 6977 kb/s Stream #0:0(eng) : Audio : wmav2 (a1[0][0] / 0x0161), 44100 Hz, stereo, fltp, 192 kb/s Stream

    0:1(eng) : Video : vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 tbr, 1k tbn, 1k tbc [image2 @ 024c76e0]

    Could find no file with path 'watermark.png' and index in the range
    0-4 [Parsed_movie_0 @ 024c0540] Failed to avformat_open_input
    'watermark.png' [AVFilterGraph @ 024ca100] Error initializing filter
    'movie' with args 'watermark.png' Error opening filters ! Error Code= 0

    Error on point ( Could find no file with path 'watermark.png' ) shows watermark.png file not found.
    I place watermark.png file in the following locations but still can't found

    i : application root

    ii : root where actual aspx page located

    iii : ffmpeg root

    iv : ffmpeg/bin/

    I also used complete path but still can't detected.

    Note : if i use same ffmpeg command in php and place watermark.png on location where actual php page exist watermark properly detected and command executed properly, but same approach not working in asp.net

    Can any one help me where should i place watermark.png file so that script can access it.

  • ffmpeg convert video in a path with different name

    16 mars 2019, par tour travel

    Using ffmpeg in php with shell_exec and want to convert video in a path that different with where script is run. php script is in /s/m/video.php :

    <?php
    if(isset($_GET["videoTools"])){

       $user = $_GET["user"];
       $uid = $_GET["uid"];
       $vid = $_GET["vid"];

       $uploaddir = '/seller/uploads/'.$user.'/'.$uid.'/';

       echo shell_exec('ffmpeg -i '.$uploaddir.$vid.'-vid.mp4 -i /s/m/logo.png \
       -filter_complex "hflip[flipped];[flipped]overlay=x=20:y=20" \
       -s 480x320 -acodec aac -strict -2 -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 \
       -strict -2 '.$uploaddir.$vid.'-vid-resized.mp4');
    }
    ?>

    And this script called by ajax in /s/a/index.php :

       $.ajax({
           url: "/s/m/video.php?videoTools",
           type: "GET",
           data: {vid: json[0], uid: json[1], user: json[2]},
           success: function(data){
            // success
           }
       });

    And for example I want to convert video in this path /s/uploads/91/768/2019-2-2_668-vid.mp4

    Problems :

    This not working, because look like ffmpeg not find video and logo in a path / Also look like ffmpeg not accepet video with - or _ or etc.

    No related error log, but video not generated and script not working. Any idea ?

    [Sat Mar 16 04:09:26.934114 2019] [php7:warn] [pid 25486] [client
    85.133.232.199:34756] PHP Warning : Unknown : open_basedir restriction in effect. File(/var/cpanel/php/sessions/ea-php72) is not within the
    allowed path(s) :
    (/home/pedram/ :/tmp :/var/tmp :/usr/local/lib/php/ :/usr/local/php72/lib/php/)
    in Unknown on line 0

  • How to correctly specify the path to a file in -vf media ?

    15 juillet 2024, par Wintreist

    Good afternoon, please, I really need help.
I'm putting a watermark on the video :

    


    with tempfile.TemporaryFile("wb", delete=False, suffix=".png") as watermark_file:
    watermark_file.write(buff.read())
(
    ffmpeg
    .input(str(path))
    .output(
        os.environ.get("TEMP")+f"\\{uuid.hex}_{path.name}",
        vf=f"movie='{watermark_file.name}' [watermark]; [in][watermark] overlay='{overlay}' [out]"
    )
    .global_args('-copyts')
    .run()
)


    


    In a temporary folder, I create a file in which I write a watermark from io.BytesIO
using the ffmpeg-python library, I do not work directly with the console.

    


    The problem is that when running .run() to the console outputs the following :

    


    [Parsed_movie_0 @ 0000011b21b3e300] Failed to avformat_open_input 'C'
[AVFilterGraph @ 0000011b21b4d4c0] Error initializing filters
[vost#0:0/libvpx-vp9 @ 0000011b23a07500] Error initializing a simple filtergraph
Error opening output file C:\Users\smeta\AppData\Local\Temp\5e5a695966cf4d728edbd7f39c509d0e_000.webm.
Error opening output files: No such file or directory


    


    But if I copy a watermarked file from temp and upload it to the workspace :
vf=f"movie='{'test.png'}' [watermark]; [in][watermark] overlay='{overlay}' [out]"
then everything works as it should. I.e. apparently there is a problem with the path to the watermark, and I do not understand what to do.
I ask for help