Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (89)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (11796)

  • ffmpeg transcode to hls and multiple aac audio tracks

    23 août 2023, par Aquarius

    I'm trying to transcode h264 mp4 file to HLS format with multiple AAC audio tracks. On Windows browsers everythins works like a shine. There's an option to switch audio track

    


    audio track switcher

    


    It doesn't work on Android devices or TV. On Android Opera browser video works with sound, but screen stuck while seeking and there's no option to switch audio track. On TV browser video works, it doesn't stuck when seeking but also no option to switch audio track

    


    Using video.js player on site. Below code for transcode and produced manifest file

    


    ffmpeg -i "file.mp4" -i PL-6ch.aac -i EN-6ch.aac -map 0:v -map 1:a -map 2:a -c:v copy -c:a:0 aac -ac:a:0 6 -af channelmap=channel_layout=5.1 -c:a:1 aac -ac:a:1 6 -af channelmap=channel_layout=5.1 -tag:v:0 h264 -b:v:0 2500k -tag:a:0 aac -b:a:0 384k -tag:a:1 aac -b:a:1 384k -f hls -hls_time 10 -hls_playlist_type vod -hls_list_size 0 -master_pl_name file.m3u8 -var_stream_map "v:0,agroup:AAC a:0,agroup:AAC,language:pl a:1,agroup:AAC,language:en" file_%v_.m3u8


    


    #EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="AAC",NAME="Polish",AUTOSELECT=YES,DEFAULT=YES,LANGUAGE="pl",URI="file_1_.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="AAC",NAME="English",AUTOSELECT=YES,DEFAULT=NO,LANGUAGE="en",URI="file_2_.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3172400,RESOLUTION=1920x872,CODECS="avc1.640029,mp4a.40.2",AUDIO="AAC" 
file_0_.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=422400,CODECS="mp4a.40.2",AUDIO="AAC"
file_1_.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=422400,CODECS="mp4a.40.2",AUDIO="AAC"
file_2_.m3u8


    


    Any clues what's wrong ?

    


  • dash.js : four channels audio streaming

    19 juillet 2016, par Carlos Chacon

    Does dash.js supports 4 channels in the audio stream ?

    I’m using mp4 container : video : h254 and audio : AAC.

    For the case that the AAC audio stream is 2 channels it works fine, both video and audio play correctly. But 4 channels does NOT work.

    I’m using FFMPEG to create the files and WOWZA to setup the DASH streaming.

    For the case that the AAC audio stream is 4 channels I get the following error :

    Video can't be played because the file is corrupt.

    Command line to generate the 2-channels file :

    ffmpeg -i video_in.mp4 -i audio_in_4ch.wav -c:v copy -c:a aac -ac 2 output_2channels.mp4

    Command line to generate the 4-channels file :

    ffmpeg -i video_in.mp4 -i audio_in_4ch.wav -c:v copy -c:a aac -ac 4 output_4channels.mp4

    This is the fmmpeg -i information printed for each file :

    2 Channels output file details :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output_2channels.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.37.101
     Duration: 00:00:17.59, start: 0.000000, bitrate: 901 kb/s
       Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1024x512 [SAR 1:1 DAR 2:1], 894 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    4 Channels output file details :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output_4channels.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.37.101
     Duration: 00:00:17.59, start: 0.000000, bitrate: 1038 kb/s
       Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1024x512 [SAR 1:1 DAR 2:1], 894 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 4.0, fltp, 265 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    4 Channels output file mdp file :

    <?xml version="1.0" encoding="UTF-8"?>
    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" publishtime="2016-07-19T05:56:28Z" mediapresentationduration="PT17.585S" minbuffertime="PT1.5S">
    <programinformation>
       
    </programinformation>
    <location>http://192.168.0.103:1935/vod/_definst_/mp4:output_4channels.mp4/manifest_w882219731.mpd</location>
    <period start="PT0.0S">
       <baseurl>http://192.168.0.103:1935/vod/_definst_/mp4:output_4channels.mp4/</baseurl>
       <adaptationset mimetype="video/mp4" width="1024" height="512" par="1024:512" framerate="30000/1001" segmentalignment="true" startwithsap="1" subsegmentalignment="true" subsegmentstartswithsap="1">
           <segmenttemplate presentationtimeoffset="0" timescale="90000" media="chunk_ctvideo_rid$RepresentationID$_cs$Time$_w882219731_mpd.m4s" initialization="chunk_ctvideo_rid$RepresentationID$_cinit_w882219731_mpd.m4s">
               <segmenttimeline>
                   <s t="0" d="1582650"></s>
               </segmenttimeline>
           </segmenttemplate>
           <representation codecs="avc1.42c01e" sar="1:1" bandwidth="894760"></representation>
       </adaptationset>
       <adaptationset mimetype="audio/mp4" lang="eng" segmentalignment="true" startwithsap="1" subsegmentalignment="true" subsegmentstartswithsap="1">
           <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
           <segmenttemplate presentationtimeoffset="0" timescale="48000" media="chunk_ctaudio_rid$RepresentationID$_cs$Time$_w882219731_mpd.m4s" initialization="chunk_ctaudio_rid$RepresentationID$_cinit_w882219731_mpd.m4s">
               <segmenttimeline>
                   <s t="0" d="844080"></s>
               </segmenttimeline>
           </segmenttemplate>
           <representation codecs="mp4a.40.2" audiosamplingrate="48000" bandwidth="265851">
           </representation>
       </adaptationset>
    </period>
    </mpd>

    HTML Player Code :

    <code class="echappe-js">&lt;script src=&quot;http://cdn.dashjs.org/latest/dash.all.min.js&quot;&gt;&lt;/script&gt;

  • ffmpeg audio and video gradually go out of sync when recorded with shell script and make

    6 août 2020, par cgmil

    I wrote the following shell script for making streamcasts for recording streams using ffmpeg :

    &#xA;

    [ -z $1 ] &amp;&amp; { echo "No recording device selected!" 2>&amp;1 &amp;&amp; exit ; } || DEV=$1&#xA;VIDFILE=video/bvid.mkv&#xA;AUDFILE=audio/baud.wav&#xA;DIM=$(xdpyinfo | grep dimensions: | awk &#x27;{print $2;}&#x27;)&#xA;(sleep 10 &amp;&amp; echo "Streaming...") &amp;&#xA;ffmpeg -nostdin -loglevel panic -f x11grab -s $DIM -i $DISPLAY.0 -c:v libx264 "$VIDFILE" &amp;&#xA;ffmpeg -nostdin -loglevel panic -f alsa -i hw:$DEV -c:a libmp3lame  "$AUDFILE" &amp;&#xA;sleep 1&#xA;[ -f $VIDFILE ] &amp;&amp; (echo "Created video" 1>&amp;2) || (echo "No video!" 1>&amp;2)&#xA;sleep 1&#xA;[ -f $AUDFILE ] &amp;&amp; (echo "Created audio" 1>&amp;2) || (echo "No audio!" 1>&amp;2)&#xA;&#xA;wait&#xA;trap "killall background -s 2" SIGINT&#xA;

    &#xA;

    This produces a video and audio file that can then be used to make a stream via make using the command make stream. Here is the Makefile (note that there is a 3-minute long audio file and a file with images that is used to make an opening splash screen) :

    &#xA;

    FULLAUDIO=audio/full.wav&#xA;AUDSTART=84&#xA;TITLE="Stats Aside:\\nInterpreting\\nProbability"&#xA;SIZEW=1920&#xA;SIZEH=1080&#xA;&#xA;audio/clip.wav : $(FULLAUDIO)&#xA;        ffmpeg -ss $(AUDSTART) -i $&lt; -t 6 -af "afade=t=in:st=0:d=3:curve=qsin,afade=t=out:st=3:d=3:curve=qsin" -c:a libmp3lame $@&#xA;&#xA;img/thumb.png : img/bg.png img/ico.png&#xA;        convert -stroke white -fill white -background black -transparent "#000000" \&#xA;                 -font "URWBookman-Light" -gravity Center -size 928x1080 \&#xA;                label:$(TITLE) png:- | composite -gravity west -geometry &#x2B;64&#x2B;0 - \&#xA;                img/bg.png $@&#xA;        convert img/ico.png -transparent "#ffffff" png:- | composite \&#xA;                 -gravity southeast -geometry &#x2B;32&#x2B;32 - $@ $@&#xA;        convert $@ -resize $(SIZEW)x$(SIZEH) $@&#xA;&#xA;video/intro.mp4 : img/thumb.png audio/clip.wav&#xA;        ffmpeg -i audio/clip.wav -loop 1 -t 6 -i img/thumb.png -vf "fade=t=in:st=0:d=1,fade=t=out:st=5:d=1:c=white,scale=$(SIZEW):$(SIZEH)" -c:v libx264 -c:a libmp3lame $@&#xA;&#xA;ProbabilityInterpretation.mp4 : video/bvid.mkv video/intro.mp4 audio/baud.wav&#xA;        ffmpeg -i video/intro.mp4 -ss 11 -i video/bvid.mkv \&#xA;                 -ss 10 -i audio/baud.wav \&#xA;                 -filter_complex \&#xA;                "[1]fade=t=in:st=0:d=1:c=white,scale=$(SIZEW):$(SIZEH)[bvid];\&#xA;                 [2]afftdn=nr=20[baud];\&#xA;                 [0:v][0:a][bvid][baud]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" \&#xA;                 -c:v libx264 -c:a libmp3lame $@&#xA;&#xA;stream : ProbabilityInterpretation.mp4&#xA;&#xA;clean:&#xA;        -rm ProbabilityInterpretation.mp4&#xA;        -rm video/intro.mp4&#xA;        -rm audio/clip.wav&#xA;        -rm img/thumb.png&#xA;&#xA;veryclean:&#xA;        make clean&#xA;        -rm video/bvid.mkv&#xA;        -rm audio/baud.wav&#xA;&#xA;

    &#xA;

    Because of lag between my webcam and what appears on screen, I do intentionally start the video and audio at different times so that they can eventually become in sync. However, the end result is a video that starts with the video and audio synced together, but eventually become out of sync, with the video lagging well behind the audio. Here is a link to the video with the end result ; it's long, but notice that the video starts in sync and ends out-of-sync. I should probably also note that the operating system is living in a virtual machine (VirtualBox).

    &#xA;

    Why is this happening and what can I do to prevent or correct ?

    &#xA;