Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (77)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • 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 (...)

  • 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 (6714)

  • avcodec/qsvenc : Remove dead code for user-provided buffers

    9 septembre 2021, par Andreas Rheinhardt
    avcodec/qsvenc : Remove dead code for user-provided buffers
    

    Dead since commit 93016f5d1d280f9cb7856883af287fa66affc04c
    which ensured that the packets received by encoders are always blank.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/qsvenc.c
  • Rails Paperclip : Skip ffmpeg in video uploading

    4 octobre 2017, par aliahme922

    I have a rails API application and I am using paperclip (s3 storage) for video upload. The file is sent from Android app which is already converted into mp4 and resized at its end but when I add the processor ffmpeg to my video attachment the ffmpeg tries to transcode and resize the video again, which I reckon is not necessary.

    I am not sure that my point is valid that is it always necessary for paperclip to run ffmpeg command of already converted video sent
    from client side ? Or we can stop it of doing it so or perhaps it might not even need to be required. Because what I read from different ffmpeg sources is that it converts a video to different formats so that the file becomes heterogeneous and can be played in various players and devices. Anyway the purpose of this question is to ask that I have a small EC2 instance in which ffmpeg is run in background through sidekiq because it takes a lot of time for conversion and since, what I saw, due to its high memory consumption of CPU and Memory my server went down for like half an hour. So instead of upgrading the instance I need to know that in my case do I have to use ffmpeg or not ?

    Well for the time being, to get rid out of this I changed the concurrency of sidekiq to run only 1 thread at a time and also I made some output changes to ffmpeg processor in my attachment config in order to reduce conversion time.

    has_attached_file :url,
                   styles: {
                       original: {
                           format: 'mp4', streaming: true,
                           convert_options: {
                               output: {
                                   'c:v': 'libx264',
                                   preset: 'ultrafast',
                                   movflags: '+faststart',
                                   crf: '23',
                                   'c:a': 'aac',
                                   'b:a': '128k',
                                   'vf': 'scale=-2:720,format=yuv420p'
                               }
                           }
                       }
                   },
                   processors: [
                       :ffmpeg
                   ],
                   only_process: [
                       :original
                   ]

    This helped me and solved my problem, but again I think for my case I can take much better approach. Need your feedback guys, I will really appreciate.

  • Convert a bash script to Windows bat script [closed]

    17 mai 2024, par gyandoo

    I have a bash script, now I need to convert it to bat.

    &#xA;

    What the script does is based on the shortcut the script checks the audio codec and video codec using ffprobe and then loops through all the files in the folder to convert the file(s) using the presets based on which one the shortcut calls.

    &#xA;

    It also limits the processor usage before running ffmpeg.

    &#xA;

    Here's the script :

    &#xA;

    #!/bin/sh&#xA;FILES="/home/red/Downloads/to_convert/*"&#xA;to_convert="/home/red/Downloads/to_convert"&#xA;TYPE="$1"&#xA;#echo "$TYPE"&#xA;if [ -e &#x27;/tmp/convert.txt&#x27; ]; then&#xA;  echo "Ffmpeg is currently converting a file!"&#xA;  exit 0&#xA;else&#xA;if [ "$(ls -A $to_convert)" ];&#xA;then&#xA;    #Create a temp file so if the script is run hourly and there is an existing instance running the scripts exits&#xA;    echo >> &#x27;/tmp/convert.txt&#x27;&#xA;    #iterate through each file in the directory&#xA;    for f in $FILES&#xA;    do&#xA;    FILENAME1=$(basename "$f")&#xA;    FILENAME=${FILENAME1%.*}&#xA;&#xA;    &#xA;    ##  Detect what audio codec is being used:&#xA;    audio=$(ffprobe "$f" 2>&amp;1 | sed -n &#x27;/Audio:/s/.*: \([a-zA-Z0-9]*\).*/\1/p&#x27; | sed 1q)&#xA;    ##  Detect video codec:&#xA;    video=$(ffprobe "$f" 2>&amp;1 | sed -n &#x27;/Video:/s/.*: \([a-zA-Z0-9]*\).*/\1/p&#x27; | sed 1q)&#xA;    ##  Set default audio settings (you may need to use a different encoder,&#xA;    ##  since libfdk_aac is not re-distributable)&#xA;    aopts="-c:a libfdk_aac -vbr 3"&#xA;    ##  Set default video settings:&#xA;    vopts="-c:v libx264 -crf 22 -preset veryfast"&#xA;&#xA;    case "$audio" in&#xA;        aac|mp3 )&#xA;    #If the audio is one of the MP4-supported codecs,&#xA;    #copy the stream instead of transcoding&#xA;            aopts="-c:a copy"&#xA;            ;;&#xA;        "" )&#xA;    #If there is no audio stream, don&#x27;t bother with audio&#xA;            aopts="-an"&#xA;            ;;&#xA;        * )&#xA;            ;;&#xA;    esac&#xA;&#xA;    case "$video" in&#xA;    #If the video stream is one of the MP4-compatible formats,&#xA;    #copy the stream&#xA;        h264|mpeg4|mpeg2video|mpeg1video )&#xA;            vopts="-c:v copy"&#xA;            ;;&#xA;        "" )&#xA;    #If no video stream is detected, don&#x27;t bother with video&#xA;            vopts="-vn"&#xA;            ;;&#xA;        * )&#xA;            ;;&#xA;    esac&#xA;&#xA;    &#xA;    if [ "$TYPE" = "shrink" ]; then&#xA;    &#xA;      taskset -c 0,2 ffmpeg -i "$f" -vcodec libx265 -crf 28 -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;    elif [ "$TYPE" = "phone" ]; then&#xA;&#xA;      taskset -c 0,2 ffmpeg -y -i "$f" -vf scale=640:-2 -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;    elif [ "$TYPE" = "pmv" ]; then&#xA;&#xA;      taskset -c 0,2 ffmpeg -y -i "$f" -vf scale=360:-2 -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1      &#xA;&#xA;    elif [ "$TYPE" = "music" ]; then&#xA;&#xA;      taskset -c 0,2 ffmpeg -i "$f" -acodec libmp3lame "/home/red/Downloads/done/""$FILENAME"".mp3" &amp;&amp; success=0 || success=1  &#xA;&#xA;    elif [ "$TYPE" = "audio-boost" ]; then&#xA;&#xA;      taskset -c 0,2 ffmpeg -i "$f" -vcodec copy -af "volume=10dB" "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;    elif [ "$TYPE" = "burn-first-sub" ]; then  &#xA;&#xA;      taskset -c 0,2 ffmpeg -i "$f" -vf "subtitles=""$f"":si=0&#x27;" "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;    elif [ "$TYPE" = "burn-srt" ]; then  &#xA;&#xA;      taskset -c 0,2 ffmpeg -i "$f" -vf "subtitles=/home/red/Downloads/to_convert/""$FILENAME"".srt" "/home/huckleberry/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;    elif [ "$TYPE" = "audio-track2" ]; then  &#xA;&#xA;      taskset -c 0,2 ffmpeg -y -i "$f" -map 0:v -map 0:a:1 $vopts $aopts -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;    elif [ "$TYPE" = "split" ]; then  &#xA;&#xA;      taskset -c 0,2 MP4Box -splits 1996800 "$f" &amp;&amp; success=0 || success=1&#xA;&#xA;    elif [ "$TYPE" = "fix" ]; then  &#xA;      taskset -c 0,2 ffmpeg -y -i "$f" -map 0:v:0 -map 0:a:0 -vcodec libx264 -acodec aac -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;    else    &#xA;&#xA;      taskset -c 0,2 ffmpeg -y -i "$f" -map 0:v -map 0:a:0 $vopts $aopts -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" &amp;&amp; success=0 || success=1&#xA;&#xA;      TYPE="converted"&#xA;&#xA;    fi&#xA;&#xA;    &#xA;    if [ $success -eq 0 ]; then&#xA;        swaks --header Subject:"${TYPE} - ${FILENAME}" --body "${FILENAME}" -S&#xA;        echo "Removing $f file..."&#xA;        rm "$f"&#xA;    else&#xA;        swaks --header Subject:"failed - ${FILENAME}" --body "${FILENAME}" -S&#xA;        echo "process failed"&#xA;    fi    &#xA;   &#xA;    done&#xA;    &#xA;    #remove the temp file created&#xA;    rm "/tmp/convert.txt"&#xA;    exit 0&#xA;else&#xA;    echo "to_convert folder is empty"&#xA;    exit 0&#xA;fi&#xA;exit 0&#xA;fi&#xA;&#xA;

    &#xA;