Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (57)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (8059)

  • spaces in ffmpeg bash script filename variables

    19 août 2015, par Tandy Freeman

    I am using OS X Yosemite. I want to make a simple bash script that allows me to transcode a video. Everything works well as long as a file is not located in a directory which has spaces.

    Here is my script :

    #!/bin/sh

    ffmpeg -i “$1” -c:v ffv1 -level 3 -g 1 -c:a copy “$1.mkv”

    Initially, I did not have the double quotes around the variable, but I read some stack overflows that used this as a solution. I’d rather not have to alter the path or add slashes etc. I want to just run :

    ./script.sh filename.mov

    Here’s the error I get :

    Kierans-iMac:~ bla$ ./firstscript.command "/Users/bla/Desktop/untitled\ folder\ 2/v210.mov.mkv"
    ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libfaac --enable-libass --enable-ffplay --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 ' --enable-nonfree --enable-vda
     libavutil      54. 27.100 / 54. 27.100
     libavcodec     56. 41.100 / 56. 41.100
     libavformat    56. 36.100 / 56. 36.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.100 /  1.  2.100
     libpostproc    53.  3.100 / 53.  3.100
    “/Users/bla/Desktop/untitled\: No such file or directory
  • Bash Script For FFMPEG

    24 octobre 2016, par armight29

    trying to write simple script to encode files but keep getting this error msg :

    /usr/bin/cm : line 28 : syntax error near unexpected token

    else'
    /usr/bin/cm: line 28:

    else’

    and here is the script called cm :

    #!/bin/bash
    echo Filename?
    read Filename
    echo Enter Target Filesize In Megabytes..
    read TargetSize
    echo ffmpeg preset?
    read PRESET
    Duration='ffprobe -i $Filename -show_entries format=duration -v quiet -of csv="p=0"'
    Bitrate='($TargetSize*8192)/$Duration'
    exiftool -b $Filename -ImageSize
    echo WIDTH=?
    read WIDTH
    echo HEIGHT=?
    read HEIGHT
    echo Padding Required? Enter 'y' or 'n'
    read PADANSWR
    if [PADANSWR = 'y'] then
    echo X=?
    read X
    echo Y=?
    read Y
    ffprobe -show_entries stream=index,codec_type:stream_tags=language -of compact $Filename -v 0 | grep eng
    echo ENG AUDIO INDEX?
    read ENGAUDIOINDEX
    echo ENG SUBS INDEX?
    read ENGSUBSINDEX
    ffmpeg -i $Filename -strict -2 -c:v libx264 -preset $PRESET  -b:v $Bitrate -vf "padding=width=$WIDTH:height=$HEIGHT:x=$X:y=$Y:color=black" pass 1 -f matroska /dev/null -c:a ac3 -b:a 192k && ffmpeg -i $Filename -strict -2 -c:v libx264 -preset $PRESET  -b:v $Bitrate -vf "padding=width=$WIDTH:height=$HEIGHT:x=$X:y=$Y:color=black" -pass 1 -f matroska ENCODE1.mkv -c:a ac3 -b:a 192k
    else
       ffmpeg -i $Filename -strict -2 -c:v libx264 -preset $PRESET -b:v $Bitrate -threads 12 -pass 1 -f matroska /dev/null -c:a ac3 -b:a 192k && ffmpeg -i $Filename -strict -2 -c:v libx264 -preset $PRESET -b:v $Bitrate -threads 12 -pass 1 -f matroska ENCODE1.mkv -c:a ac3 -b:a 192k
    fi

    just started coding in bash—how long can the lines in a script be or do i need to use the ’\’ character—if i do use the ’\’ character does it need a space after it ? TIA

  • ASP.NET : Powershell script finishes after the first ffmpeg call

    24 mars 2014, par sk904861

    The following Powershell script only executes the first ffmpeg call, no matter which one is first. Both the ffmpeg and the powershell processes never finish.

    Param($InputFile, $OutputFile, $Thumbnail, $Sprites)

    $ThumbnailWidth = 120
    $ThumbnailHeight = 120

    # Thumbnail
    ffmpeg -i $InputFile -f image2 -vframes 1 -filter:v "crop=min(iw\,ih):min(iw\,ih), scale=$($ThumbnailWidth):$($ThumbnailHeight)" -crf 18 "$($Thumbnail)\150x150.png"

    # Poster
    ffmpeg -i $InputFile -f image2 -vframes 1 -filter:v "crop=min(iw\,ih):min(iw\,ih), scale=$($PosterWidth):$($PosterHeight)" -crf 18 "$($Thumbnail)\1000x1000.png"

    The script gets called within an ASP.NET application as follows :

    ProcessStartInfo startInfo = new ProcessStartInfo();
    startInfo.FileName = "powershell.exe";
    startInfo.Arguments = String.Format("-executionpolicy RemoteSigned -file \"{0}\" \"{1}\" \"{2}\" \"{3}\" \"{4}\"", scriptPath, fullPath, videoPath, thumbnailPath, sprites);
    startInfo.RedirectStandardOutput = true;
    startInfo.RedirectStandardError = true;
    startInfo.UseShellExecute = false;
    startInfo.CreateNoWindow = true;
    Process process = new Process();
    process.StartInfo = startInfo;

    process.EnableRaisingEvents = true;
    process.Exited += delegate
    {
        // Do some cleaning up
    };

    process.Start();

    Does anyone have a clue, why only the first the two ffmpeg calls is working, while each call seems to be correct ?