Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (83)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (10049)

  • Encrypted HLS works as live stream, doesn't work as VOD

    22 avril 2015, par Misiur

    I’ve found some crude bash script for encoding and encrypting video file, into a HLS stream, and I’ve edited it slightly (I have no idea about bash) :

    #!/bin/bash

    set -e     # Exit on errors

    tsFile="$1"

    if ! [ -f "$tsFile" -a -r "$tsFile" ]; then
       echo "First argument is required" >&2
       exit 2
    fi

    if [ -z "$3" ]; then
       output="output"
    else
       output="$3"
    fi


    keyFile="$output.key"
    keyInfoFile="$output.keyinfo"
    playList="$output.m3u8"

    if [ -z "$4" ]; then
       separator='-'
    else
       separator="$4"
    fi

    splitFilePrefix="$output$separator"


    if [ -d "$2" ]; then
       outDir="$2"
    else
       mkdir "$2" || exit 1
       outDir="$2"
    fi

    tempDir="$outDir/.$$_tmp"
    keyFile="$outDir/$keyFile"

    mkdir $tempDir

    echo "$outdir/$keyFile\n$outdir/$keyFile" > "$outdir/$keyInfoFile"


    ffmpeg -i "$tsFile" -hls_time 5 -hls_list_size 0 -hls_segment_filename "$tempDir/$splitFilePrefix%03d.ts" -strict -2 "$tempDir/$playList"

    openssl rand 16 > $keyFile
    encryptionKey=`cat $keyFile | hexdump -e '16/1 "%02x"'`

    numberOfTsFiles=$(( `ls "$tempDir/$splitFilePrefix"*.ts | wc -l` -1 ))

    for i in $(seq -f "%03g" 0 $numberOfTsFiles); do
       initializationVector=`printf '%032x' $(( 10#$i))`
       openssl aes-128-cbc -e -in "$tempDir/$splitFilePrefix"$i.ts \
       -out "$outDir/$splitFilePrefix"$i.ts -nosalt -iv $initializationVector -K $encryptionKey
    done

    {
       head -4 "$tempDir/$playList"
       echo '#EXT-X-KEY:METHOD=AES-128,URI='"$keyFile"
       egrep "$tempDir/$playList" -vie '#EXT-X-TARGETDURATION:' \
       | tail -n +4
    } > "$outDir/$playList"

    #rm -r "$tempDir"

    This results in a something like this :

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-KEY:METHOD=AES-128,URI=output.key
    #EXT-X-TARGETDURATION:11
    #EXTINF:10.176833,
    output-000.ts
    #EXTINF:8.341667,
    output-001.ts
    #EXTINF:8.341667,
    output-002.ts
    #EXTINF:3.136467,
    output-003.ts
    #EXT-X-ENDLIST

    This almost works. However I need an VOD, not a live stream. So, I added line :

    #EXT-X-PLAYLIST-TYPE:VOD

    And now it doesn’t work with encrypted segments, only with unencrypted ones. I thought all segments are crypted separately ? Also, even with unencrypted files, the info about total length isn’t present. How can I fix that ?

  • Live Streaming and watching HLS stream on VLC

    9 avril 2015, par TakeruDavis

    I have been trying to livestream a video in HLS using ffmpeg (trying both hls and segment mode) and everything looks like it should, m3u8 file is created and the content matches with examples.

    TS files look good as well, briefly looking at their headers in HEX editor makes them seem okay and separately, they are playable.

    But when I enter the URL of the m3u8 playlist into VLC, at first, it does nothing, then it seems like it is trying to open files with weird filenames. My best guess is it opens those TS files and treats their content as another playlist.

    Can someone help me figure out what might be the problem ?

    PS : I think I set up Apache properly too, it should be giving correct MIME types for both things.

  • How can i decode an mp3 and encode it as aac with ezstream

    8 avril 2015, par Roberto Arosemena

    This is my current ezstream config

    <ezstream>
      <url>http://localhost:8000/test</url>
      <sourcepassword>password</sourcepassword>
      <format>MP3</format>
      <filename>playlist.m3u</filename>
      <reencode>
         <enable>1</enable>
         <encdec>
            <format>MP3</format>
            <match>.mp3</match>
            <decode>madplay -b 16 -R 44100 -S -o raw:- "@T@"</decode>
            <encode>lame --preset cbr 32 -r -s 44.1 --bitwidth 16 - -</encode>
         </encdec>
      </reencode>
    </ezstream>

    It’s mounting to an icecast server, its decoding and encoding mp3 to a lower bitrate, I’m trying to encode it to aac instead of mp3 in hopes that the quality improves as i heard that aac is better than mp3 for lower bitrates.

    What i would like to know is if i can use an aac encoder such as FFmpeg instead of the lame mp3 encoder and get an aac to the end user instead of mp3, if so what parameters should i pass to FFmpeg so that it works with my current config.