Recherche avancée

Médias (91)

Autres articles (63)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

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

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (3630)

  • 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
  • mov : Export geotag metadata fields

    3 juin 2014, par Martin Storsjö
    mov : Export geotag metadata fields
    

    The ’ ?xyz’ form is used by android devices (and according to apple
    mailing list archives, also by older iOS devices). The ’loci’ field
    (defined in 3GPP 26.244) is used by recent iOS devices.

    Even though the loci field can contain an altitude, it was plain
    0 in my sample. Just export longitude and latitude, in a string
    format matching the one used by the ’ ?xyz’ metadata field.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavformat/mov.c
  • Converting timecode to timestamp for ffmpeg

    4 septembre 2020, par Brendon Rathbone

    I am having some issues understanding how timecode could relate to timestamps for grabbing stills or snippets from a video file.

    &#xA;

    I seem to have two issues. I'm running my code through python as a subprocess if that changes anything.

    &#xA;

    My code :

    &#xA;

    '' '

    &#xA;

    TC = 01:05:08:04&#xA;fftc = 01:05:08.125&#xA;input = myfile.mp4&#xA;InFps = 23.976&#xA;tcstamp = 01050804&#xA;&#xA;&#xA;Command = f&#x27;ffmpeg -ss {fftc} -i "{input}" -r {InFps} -frames:v 1 "myfile_{tcstamp}.png"&#x27;&#xA;&#xA;P1= subprocess.call(command, shell=True)&#xA;

    &#xA;

    '' '

    &#xA;

    My issues are twofold I think. Since I am trying to adapt timecodes listed in any editor, which reads the timecode track, i get different images(even when correcting for ffmpeg starting from 00:00 compared to my actual timecode). It seems like ffmpeg reads a different duration for my file and thus i can't seem to convert a timecode that would match up in the same place.

    &#xA;

    I assumed this was simply an issue with h264, but if I try this on a dnxhd file, it can't get a still on a number of frames, giving me the error that the encoded outputfile is empty.

    &#xA;

    I do notice the metadata on my dnxhd file shows a video track at 23.976 but a timecode track at 24fps.

    &#xA;

    Is there a way to compare duration to convert timecode to timestamps in my video or is it a limitation I won't be able to overcome ?

    &#xA;