Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (63)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (8841)

  • I have installed FFMPEG and can't find it inside a PHP script

    14 novembre 2019, par Antop

    I have installed FFMPeg in CentOS. It works perfectly.
    It’s inside /usr/bin directory. Also, I have PHP 7.2.24 that comes with Plesk 18.0.20.

    I want to use FFMPeg inside a PHP script, but that script can’t find the executable of FFMpeg. I have tried giving the exact route (/usr/bin/ffmpeg) but doesn’t work.

    It’s a production server. The same script, in my development server (macOS) works perfectly.

    I tried using :

    var_dump(getenv('PATH'));
    var_dump(exec('which ffmpeg'));
    var_dump(ini_get('open_basedir'));
    var_dump(is_file(exec('which ffmpeg')));
    var_dump(is_executable(exec('which ffmpeg')));

    And it returns me :

    string(49) "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
    string(0) ""
    string(44) "/var/www/vhosts/name-of-the-domain.com/:/tmp/"
    bool(false)
    bool(false)
    NULL

    ¿What could be happening ?

    A very strange thing I’ve noticed is that I can’t access any command via php :
    I tried using it with echo

    var_dump(exec('which echo'));
    var_dump(is_file(exec('which echo')));
    var_dump(is_executable(exec('which echo')));

    And it returns me :

    string(0) ""
    bool(false)
    bool(false)
    NULL

    And the permissions are right :

    [root@vps bin]# ls -lha echo
    -rwxr-xr-x 1 root root 33K ago 20 08:25 echo

    [root@vps bin]# ls -lha ffmpeg
    -rwxr-xr-x 1 root root 217K abr  4  2019 ffmpeg

    But if I make a

    var_dump(exec('echo "HELLO"'))

    it returns me

    string(5) "HELLO"
  • Trying to fetch all audio streams with FFmpeg Python

    27 juillet 2022, par Apollo

    I'm using ffmpeg-python to fetch streams from a video and write some parameters (codec_name, resolution, etc.) for each stream into csv.

    


    video = 'test.mkv'
probe = ffmpeg.probe(video)
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
print(video_stream['codec_long_name'])
audio_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'audio'), None)
...


    


    My problem is that it works well for a video stream, but not for multiple audio (or subtitles) streams. If the video has several audio streams it returns only one audio stream.

    


    I've tried another approach, but it returns some streams 2-3 times and I get duplicates. So if the video sample has 4 audio tracks, I end up with 9 audio streams instread of 4.

    


    audio_streams = []
for audio in (probe['streams']):
    if (audio['codec_type'] == 'audio'):
        audio_streams.append(audio)
        pprint(audio_streams)


    


    All other ideas I tried don't work, I'm new to programming and I'm stuck with it.
How can I get all audio streams from a file without duplicates ?

    


  • FFmpeg conversion to mp3 works in terminal, not in script

    19 juillet 2013, par user2598172

    I can run

    ffmpeg -i test.m4a -vn -acodec libmp3lame -ab 256k test.mp3

    And it works perfectly. However, when I have the line :

    ./ffmpeg -i "$SONG_SAVE.m4a" -vn -acodec libmp3lame -ab 256k "$SONG_SAVE$EXT" &> /dev/null

    running in a .sh script (downloading the same file that I was able to successfully convert through the terminal), it returns an mp3 file with no audio data. Does anyone have any idea what could be causing this ? Thanks !

    EDIT : here is the whole script :

    #!/bin/bash

    TITLE="$(echo "$1" | ./recode html..ascii | tr -d '\' | tr -s ' ' | sed 's|\ *$||')"
    TAG_TITLE="$2"
    ARTIST="$(echo "$3" | ./recode html..ascii | tr -d '\' | tr -s ' ')"
    ALBUM="$(echo "$4" | ./recode html..ascii | tr -d '\' | tr -s ' ')"
    IMG="$5"
    TRACK_NUMBER="$6"
    TOTAL_TRACKS="$7"
    URL="$8"
    MIX_TITLE="$9"
    CONVERT="${10}"
    RECURSIVE="${11}"
    SESSION_ID="${12}"
    DOWNLOAD_ID="${13}"
    SONG_ID="${14}"

    SONG_SAVE="songs/$SONG_ID"
    ZIP_SAVE="$SESSION_ID-$DOWNLOAD_ID.zip"
    ZIP_DIR="$MIX_TITLE/"
    ARTWORK_SAVE="artwork/$MIX_TITLE.png"
    SAVE_TITLE="$(echo "$TITLE" | sed 's|/|-|g;s|^\.||g')"

    [ "$TAG_TITLE" == "false" ] && unset TITLE
    [ "$ARTIST" == "false" ] && unset ARTIST
    [ "$ALBUM" == "false" ] && unset ALBUM
    [ "$IMG" == "false" ] && unset IMG
    [ "$TRACK_NUMBER" == "false" ] && unset TRACK_NUMBER TOTAL_TRACKS
    [ "$CONVERT" == "false" ] && unset CONVERT
    [ "$RECURSIVE" == "false" ] && unset RECURSIVE

    while [ -f "SONG_SAVE".part ]; do
       sleep 2
    done

    if [ -f "$SONG_SAVE".m4a ]; then
       EXT=".m4a"
       touch "$SONG_SAVE$EXT"
    elif [ -f "$SONG_SAVE".mp3 ]; then
       EXT=".mp3"
       touch "$SONG_SAVE$EXT"
    else
       curl -Lso "$SONG_SAVE".part "$URL"

       if [ -n "$(file -b "$SONG_SAVE".part | grep "MPEG ADTS")" ]; then
           EXT=".mp3"
       elif [ -n "$(file -b "$SONG_SAVE".part | grep "MPEG v4")" ]; then
       EXT=".m4a"
    else
       EXT=".txt"
       echo "Unable to download: $URL. Sorry ):" > "$SONG_SAVE".part
    fi

    mv "$SONG_SAVE".part "$SONG_SAVE$EXT"
    fi

    if [ -n "$CONVERT" ] && [ "$EXT" == ".m4a" ]; then
    EXT=".mp3"
    if [ ! -f "$SONG_SAVE$EXT" ]; then
       ./ffmpeg -i "$SONG_SAVE.m4a" -vn -acodec libmp3lame -ab 256k "$SONG_SAVE$EXT"         &> /dev/null
       fi
    fi

    if [ "$EXT" == ".mp3" ]; then
       ./eyeD3 --remove-images -t "$TITLE" -a "$ARTIST" -A "$ALBUM" -n "$TRACK_NUMBER" -N     "$TOTAL_TRACKS" "$SONG_SAVE$EXT" &> /dev/null
       if [ -n "$IMG" ]; then
       [ ! -f "$ARTWORK_SAVE" ] && curl -Lso "$ARTWORK_SAVE" "$IMG"
           ./eyeD3 --add-image="$ARTWORK_SAVE":FRONT_COVER "$SONG_SAVE$EXT" &> /dev/null
       fi
    elif [ "$EXT" == ".m4a" ]; then
    if [ -n "$IMG" ]; then
       [ ! -f "$ARTWORK_SAVE" ] && curl -Lso "$ARTWORK_SAVE" "$IMG"
       if [ -n "$TRACK_NUMBER" ]; then
           ./mp4tags -P "$ARTWORK_SAVE" -s "$TITLE" -a "$ARTIST" -R "" -A "$ALBUM" -t "$TRACK_NUMBER" -T "$TOTAL_TRACKS" "$SONG_SAVE$EXT" &> /dev/null
       else
           ./mp4tags -P "$ARTWORK_SAVE" -s "$TITLE" -a "$ARTIST" -R "" -A "$ALBUM" "$SONG_SAVE$EXT" &> /dev/null
       fi
    else
       if [ -n "$TRACK_NUMBER" ]; then
           ./mp4tags -r P -s "$TITLE" -a "$ARTIST" -R "" -A "$ALBUM" -t "$TRACK_NUMBER" -T "$TOTAL_TRACKS" "$SONG_SAVE$EXT" &> /dev/null
       else
           ./mp4tags -r P -s "$TITLE" -a "$ARTIST" -R "" -A "$ALBUM" "$SONG_SAVE$EXT" &> /dev/null
           fi
       fi
    fi

    if [ -n "$RECURSIVE" ]; then
       cd archives
       mkdir -p "$ZIP_DIR"
       chmod 777 "$ZIP_DIR"
       cp "../$SONG_SAVE$EXT" "$ZIP_DIR$SAVE_TITLE$EXT"
       ./zip -q -0 -D -r "$ZIP_DIR$ZIP_SAVE" "$ZIP_DIR$SAVE_TITLE$EXT" &> /dev/null
       rm -f "$ZIP_DIR$SAVE_TITLE$EXT"
       printf "archives/$ZIP_DIR$ZIP_SAVE\n$MIX_TITLE.zip\n$EXT\n"
       echo "$(du -h "$ZIP_DIR$ZIP_SAVE" | tr '\t' '\n' | head -1)"
    else
       printf "$SONG_SAVE$EXT\n$SAVE_TITLE$EXT\n$EXT"
    fi