Recherche avancée

Médias (91)

Autres articles (44)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (5953)

  • Manipulating one video into multi outputs with FFmpeg results in no audio in the last output

    27 octobre 2015, par my name is

    Using FFmpeg, I’m trying to do some filtering operations on one input video to scale it (out1), scale and trim it (out2).
    This is the command I’m using :

    ffmpeg -y \
    -i "Robotica_1080.mkv" \
    -filter_complex "[0:v]split=2[v1][v2]; \
    [v1]scale=640:360,setpts=PTS-STARTPTS[vout1]; \
    [v2]trim=10:15,scale=640:360,setpts=PTS-STARTPTS[vout2]; \
    [0:a]asplit=2[a1][a2]; \
    [a1]anull,asetpts=PTS-STARTPTS[aout1]; \
    [a2]atrim=10:15,asetpts=PTS-STARTPTS[aout2]; \
    [vout1][aout1]concat=n=1:v=1:a=1[out1]; \
    [vout2][aout2]concat=n=1:v=1:a=1[out2]" \
    -map "[out1]" "1.mp4" \
    -map "[out2]" "2.mp4"

    1.mp4 is ok while 2.mp4 lasts 5 seconds as expected but without audio at all (the QuickTime inspector doesn’t write the audio codec)

    I tried to remove the trim/atrim filters, so the filter_complex parameter looked like this :

    -filter_complex "[0:v]split=2[v1][v2]; \
    [v1]scale=640:360[vout1]; \
    [v2]scale=640:360[vout2]; \
    [0:a]asplit=2[a1][a2]; \
    [a1]anull[aout1]; \
    [a2]anull[aout2]; \
    [vout1][aout1]concat=n=1:v=1:a=1[out1]; \
    [vout2][aout2]concat=n=1:v=1:a=1[out2]" \

    but still no audio on 2.mp4

    Can anyone give me a hint ?

    —EDIT—
    This is the output from first ffmpeg command :


    Mac-mini:~ Luca$ /Applications/XAMPP/xamppfiles/htdocs/MediaGallery/ffmpeg/ffmpeg -y \
    > -i "/Users/Luca/Desktop/_TEMP UPLOAD/Video/Robotica_1080.mkv" \
    > -filter_complex "[0:v]split=2[v1][v2]; \
    > [v1]scale=640:360,setpts=PTS-STARTPTS[vout1]; \
    > [v2]trim=10:15,scale=640:360,setpts=PTS-STARTPTS[vout2]; \
    > [0:a]asplit=2[a1][a2]; \
    > [a1]anull,asetpts=PTS-STARTPTS[aout1]; \
    > [a2]atrim=10:15,asetpts=PTS-STARTPTS[aout2]; \
    > [vout1][aout1]concat=n=1:v=1:a=1[out1]; \
    > [vout2][aout2]concat=n=1:v=1:a=1[out2]" \
    > -map "[out1]" "/Users/Luca/Downloads/1.mp4" \
    > -map "[out2]" "/Users/Luca/Downloads/2.mp4"
    ffmpeg version N-72460-gc5a07f1-tessus Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
     configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
     libavutil      54. 23.101 / 54. 23.101
     libavcodec     56. 40.100 / 56. 40.100
     libavformat    56. 33.101 / 56. 33.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from '/Users/Luca/Desktop/_TEMP UPLOAD/Video/Robotica_1080.mkv':
     Metadata:
       encoder         : libDivXMediaFormat 4.0.0.0578
     Duration: 00:00:20.04, start: 0.000000, bitrate: 4282 kb/s
       Stream #0:0(eng): Video: hevc (Main), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
       Stream #0:1(en): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
    [swscaler @ 0x7fb4d181c400] deprecated pixel format used, make sure you did set range correctly
    [swscaler @ 0x7fb4d185be00] deprecated pixel format used, make sure you did set range correctly
    No pixel format specified, yuvj420p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
       Last message repeated 1 times
    [libx264 @ 0x7fb4d183f400] using SAR=1/1
    [libx264 @ 0x7fb4d183f400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
    [libx264 @ 0x7fb4d183f400] profile High, level 3.0
    [libx264 @ 0x7fb4d183f400] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x7fb4d184e400] using SAR=1/1
    [libx264 @ 0x7fb4d184e400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
    [libx264 @ 0x7fb4d184e400] profile High, level 3.0
    [libx264 @ 0x7fb4d184e400] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to '/Users/Luca/Downloads/1.mp4':
     Metadata:
       encoder         : Lavf56.33.101
       Stream #0:0: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128 kb/s (default)
       Metadata:
         encoder         : Lavc56.40.100 libvo_aacenc
       Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128 kb/s
       Metadata:
         encoder         : Lavc56.40.100 libvo_aacenc
       Stream #0:2: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc56.40.100 libx264
    Output #1, mp4, to '/Users/Luca/Downloads/2.mp4':
     Metadata:
       encoder         : Lavf56.33.101
       Stream #1:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc56.40.100 libx264
    Stream mapping:
     Stream #0:0 (hevc) -> split
     Stream #0:1 (aac) -> asplit
     concat:out:a0 -> Stream #0:0 (libvo_aacenc)
     concat:out:a0 -> Stream #0:1 (libvo_aacenc)
     concat:out:v0 -> Stream #0:2 (libx264)
     concat:out:v0 -> Stream #1:0 (libx264)
    Press [q] to stop, [?] for help
    frame=  501 fps= 26 q=-1.0 Lq=-1.0 size=    1512kB time=00:00:19.97 bitrate= 620.1kbits/s    
    video:1385kB audio:392kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [libx264 @ 0x7fb4d183f400] frame I:3     Avg QP:19.30  size:  3879
    [libx264 @ 0x7fb4d183f400] frame P:321   Avg QP:24.53  size:  3024
    [libx264 @ 0x7fb4d183f400] frame B:177   Avg QP:26.20  size:   825
    [libx264 @ 0x7fb4d183f400] consecutive B-frames: 40.7% 34.7%  5.4% 19.2%
    [libx264 @ 0x7fb4d183f400] mb I  I16..4: 24.8% 65.9%  9.3%
    [libx264 @ 0x7fb4d183f400] mb P  I16..4:  7.5% 10.5%  2.5%  P16..4: 22.9%  7.4%  2.7%  0.0%  0.0%    skip:46.5%
    [libx264 @ 0x7fb4d183f400] mb B  I16..4:  0.4%  0.6%  0.3%  B16..8: 17.2%  2.9%  0.7%  direct: 0.9%  skip:77.1%  L0:37.2% L1:51.8% BI:11.0%
    [libx264 @ 0x7fb4d183f400] 8x8 transform intra:51.6% inter:69.2%
    [libx264 @ 0x7fb4d183f400] coded y,uvDC,uvAC intra: 40.2% 24.2% 1.1% inter: 8.5% 4.0% 0.0%
    [libx264 @ 0x7fb4d183f400] i16 v,h,dc,p:  9% 65%  1% 25%
    [libx264 @ 0x7fb4d183f400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 29% 16%  4%  6%  6%  7%  6%  6%
    [libx264 @ 0x7fb4d183f400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 34% 12%  3%  7%  6%  7%  4%  4%
    [libx264 @ 0x7fb4d183f400] i8c dc,h,v,p: 63% 25% 11%  1%
    [libx264 @ 0x7fb4d183f400] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x7fb4d183f400] ref P L0: 69.3% 11.5% 12.5%  6.7%
    [libx264 @ 0x7fb4d183f400] ref B L0: 82.4% 16.7%  0.8%
    [libx264 @ 0x7fb4d183f400] ref B L1: 98.6%  1.4%
    [libx264 @ 0x7fb4d183f400] kb/s:450.44
    [libx264 @ 0x7fb4d184e400] frame I:1     Avg QP:22.23  size:  6699
    [libx264 @ 0x7fb4d184e400] frame P:78    Avg QP:24.94  size:  2998
    [libx264 @ 0x7fb4d184e400] frame B:46    Avg QP:27.93  size:  1036
    [libx264 @ 0x7fb4d184e400] consecutive B-frames: 32.0% 56.0%  2.4%  9.6%
    [libx264 @ 0x7fb4d184e400] mb I  I16..4: 53.5% 26.6% 19.9%
    [libx264 @ 0x7fb4d184e400] mb P  I16..4:  9.8%  7.6%  3.1%  P16..4: 25.0%  8.0%  2.8%  0.0%  0.0%    skip:43.8%
    [libx264 @ 0x7fb4d184e400] mb B  I16..4:  0.8%  0.5%  0.4%  B16..8: 22.4%  3.5%  0.8%  direct: 1.1%  skip:70.4%  L0:41.1% L1:48.0% BI:10.9%
    [libx264 @ 0x7fb4d184e400] 8x8 transform intra:36.1% inter:66.1%
    [libx264 @ 0x7fb4d184e400] coded y,uvDC,uvAC intra: 33.5% 24.6% 1.8% inter: 8.5% 3.8% 0.0%
    [libx264 @ 0x7fb4d184e400] i16 v,h,dc,p:  4% 82%  1% 13%
    [libx264 @ 0x7fb4d184e400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 40% 18%  3%  4%  4%  7%  3%  5%
    [libx264 @ 0x7fb4d184e400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 40% 13%  3%  5%  5%  6%  3%  4%
    [libx264 @ 0x7fb4d184e400] i8c dc,h,v,p: 54% 36%  8%  2%
    [libx264 @ 0x7fb4d184e400] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x7fb4d184e400] ref P L0: 60.6% 10.5% 17.5% 11.4%
    [libx264 @ 0x7fb4d184e400] ref B L0: 77.6% 22.0%  0.4%
    [libx264 @ 0x7fb4d184e400] ref B L1: 99.1%  0.9%
    [libx264 @ 0x7fb4d184e400] kb/s:461.15
  • ffmpeg-mp4box-mpeg dash plays only few segments

    30 octobre 2015, par Idris

    Need help in debugging the segment dash files

    The input was an MP4 with these details. This was recorded from a video camera, the output from the camera was mkv and we converted into MP4 after editing the audio via adobe

    • Size : 7.51 GB Frame rate : 25 frames/ second
    • Data rate : 25326kbps
    • Total bitrate : 25525kbps

    Converted this to another mp4 with this command

    ffmpeg -i "input.mp4" -s 1280x720 -c:v libx264 -b:v 750k -bf 2 -g 75 -sc_threshold 0 -an video_1280x720_750k.mp4

    ffmpeg -i "input.mp4"  -c:a aac -strict experimental -b:a 96k -ar 32000 -vn audio_96k.mp4

    The output video has

    • fps : 25
    • Data rate : 761kbps
    • bitrate : 761kbps

    Then, created the segmented dash through MP4Box

    MP4Box -dash 10000 -frag 10000 -rap -segment-name video_0_1280000\segment_ video_1280x720_750k.mp4

    MP4Box -dash 3000 -frag 10000 -rap -segment-name audio_0_96000\segment_ audio_96k.mp4

    The MPD generated was validated online and its perfect

    UPDATE ! Included the MPD file

    <?xml version="1.0"?>

    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H2M0.000S" maxsegmentduration="PT0H0M10.000S" profiles="urn:mpeg:dash:profile:full:2011">
    <programinformation moreinformationurl="http://gpac.sourceforge.net">
     
    </programinformation>

    <period duration="PT0H2M0.000S">
      <adaptationset segmentalignment="true" lang="eng">
        <representation mimetype="audio/mp4" codecs="mp4a.40.2" audiosamplingrate="32000" startwithsap="1" bandwidth="98434">
          <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
          <segmentlist timescale="32000" duration="319999">
            <initialization sourceurl="audio_0_96000/segment_init.mp4"></initialization>
            <segmenturl media="audio_0_96000/segment_1.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_2.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_3.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_4.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_5.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_6.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_7.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_8.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_9.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_10.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_11.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_12.m4s"></segmenturl>
            <segmenturl media="audio_0_96000/segment_13.m4s"></segmenturl>
          </segmentlist>
        </representation>
      </adaptationset>
     <adaptationset segmentalignment="true" maxwidth="1280" maxheight="720" maxframerate="25" par="16:9" lang="eng">
      <representation mimetype="video/mp4" codecs="avc3.64001f" width="1280" height="720" framerate="25" sar="1:1" startwithsap="1" bandwidth="764668">
       <segmentlist timescale="12800" duration="125866">
        <initialization sourceurl="video_0_1280000/segment_init.mp4"></initialization>
        <segmenturl media="video_0_1280000/segment_1.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_2.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_3.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_4.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_5.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_6.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_7.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_8.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_9.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_10.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_11.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_12.m4s"></segmenturl>
        <segmenturl media="video_0_1280000/segment_13.m4s"></segmenturl>
       </segmentlist>
      </representation>
     </adaptationset>

    </period>
    </mpd>

    Played the video through dashjs.. I believe it just plays the initial segment and errors out as MEDIA_ERR_DECODE..MEDIA_ERR_SRC_NOT_SUPPORTED.. or some message which says start not found..

    Through chrome debugging I see that atleast 4 segments are correctly loading.. I am not sure whats going on..

    Any help in debugging the issue is really appreciated. I really can’t understand if this is a problem with the file or ffmpeg or mp4box or chrome.

    Output from chrome debugging tool

    [dash.js 1.5.1] new MediaPlayer instance has been created
    dash.all.js:11 Playback initiated!
    dash.all.js:11 Parsing complete: ( xml2json: 5ms, objectiron: 10ms, total: 0.015s)
    dash.all.js:11 Manifest has been refreshed at Mon Oct 26 2015 10:19:22 GMT-0400 (Eastern Daylight Time)[1445869162092]  
    dash.all.js:11 SegmentTimeline detected using calculated Live Edge Time
    dash.all.js:11 MediaSource is open!
    dash.all.js:11 [object Event]
    dash.all.js:11 Duration successfully set to: 120
    dash.all.js:11 Added 0 inline events
    dash.all.js:11 video codec: video/mp4;codecs="avc3.64001f"
    dash.all.js:11 [video] stop
    dash.all.js:11 audio codec: audio/mp4;codecs="mp4a.40.2"
    dash.all.js:11 [audio] stop
    dash.all.js:11 No text data.
    dash.all.js:11 No fragmentedText data.
    dash.all.js:11 No muxed data.
    dash.all.js:11 [video] start
    dash.all.js:11 [video] Getting the request for time: 0
    dash.all.js:11 [video] Index for time 0 is 0
    dash.all.js:11 [video] SegmentList: 0 / 120
    dash.all.js:11 [audio] start
    dash.all.js:11 [audio] Getting the request for time: 0
    dash.all.js:11 [audio] Index for time 0 is 0
    dash.all.js:11 [audio] SegmentList: 0 / 120
    dash.all.js:11 [video] Getting the request for time: 9.83328125
    dash.all.js:11 [video] Index for time 9.83328125 is 0
    dash.all.js:11 [video] SegmentList: 0 / 120
    dash.all.js:11 [video] SegmentList: 9.83328125 / 120
    dash.all.js:11 [audio] Getting the request for time: 9.99996875
    dash.all.js:11 [audio] Index for time 9.99996875 is 0
    dash.all.js:11 [audio] SegmentList: 0 / 120
    dash.all.js:11 [audio] SegmentList: 9.99996875 / 120
    dash.all.js:11 loaded audio:Media Segment:0 (200, 20ms, 6ms)
    dash.all.js:11 loaded video:Media Segment:0 (200, 153ms, 43ms)
    dash.all.js:11 loaded video:Initialization Segment:NaN (200, 0ms, 32ms)
    dash.all.js:11 [video] Initialization finished loading
    dash.all.js:11 loaded audio:Initialization Segment:NaN (200, 0ms, 34ms)
    dash.all.js:11 [audio] Initialization finished loading
    dash.all.js:11 [video] Getting the request for time: 19.6665625
    dash.all.js:11 [video] Index for time 19.6665625 is 1
    dash.all.js:11 [video] SegmentList: 9.83328125 / 120
    dash.all.js:11 [video] SegmentList: 19.6665625 / 120
    dash.all.js:11 [audio] Getting the request for time: 19.9999375
    dash.all.js:11 [audio] Index for time 19.9999375 is 1
    dash.all.js:11 [audio] SegmentList: 9.99996875 / 120
    dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
    dash.all.js:11 [video] Stalling Buffer
    dash.all.js:11 [video] Waiting for more buffer before starting playback.
    dash.all.js:11 [video] Getting the request for time: 0
    dash.all.js:11 [video] Index for time 0 is 0
    dash.all.js:11 [audio] Stalling Buffer
    dash.all.js:11 [audio] Waiting for more buffer before starting playback.
    dash.all.js:11 [audio] Getting the request for time: 0
    dash.all.js:11 [audio] Index for time 0 is 0
    dash.all.js:11 <video> loadedmetadata
    dash.all.js:11 Starting playback at offset: 0
    dash.all.js:11 [video] Getting the request for time: 29.499843750000004
    dash.all.js:11 [video] Index for time 29.499843750000004 is 2
    dash.all.js:11 [video] SegmentList: 19.6665625 / 120
    dash.all.js:11 [video] SegmentList: 29.499843750000004 / 120
    dash.all.js:11 [video] Got enough buffer to start.
    dash.all.js:11 [video] seek: 0
    dash.all.js:11 [audio] Getting the request for time: 29.999906250000002
    dash.all.js:11 [audio] Index for time 29.999906250000002 is 2
    dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
    dash.all.js:11 [audio] SegmentList: 29.999906250000002 / 120
    dash.all.js:11 [audio] Got enough buffer to start.
    dash.all.js:11 [audio] seek: 0
    dash.all.js:11 loaded audio:Media Segment:9.99996875 (200, 67ms, 24ms)
    dash.all.js:11 loaded video:Media Segment:9.83328125 (200, 71ms, 31ms)
    dash.all.js:11 [audio] Buffered Range: 0.032 - 9.984
    dash.all.js:11 [audio] Getting the request for time: 0
    dash.all.js:11 [audio] Index for time 0 is 0
    dash.all.js:11 Start Event Controller
    dash.all.js:11 [audio] Buffered Range: 0.032 - 19.999968
    dash.all.js:11 [audio] Getting the request for time: 0
    dash.all.js:11 [audio] Index for time 0 is 0
    dash.all.js:11 <video> play
    dash.all.js:11 [video] start
    dash.all.js:11 [video] Getting the request for time: 0
    dash.all.js:11 [video] Index for time 0 is 0
    dash.all.js:11 [video] SegmentList: 0 / 120
    dash.all.js:11 [video] SegmentList: 9.83328125 / 120
    dash.all.js:11 [video] SegmentList: 19.6665625 / 120
    dash.all.js:11 [audio] start
    dash.all.js:11 <video> playing
    dash.all.js:11 [video] Buffered Range: 0 - 9
    dash.all.js:11 [video] Getting the request for time: 0
    dash.all.js:11 [video] Index for time 0 is 0
    dash.all.js:11 Do seek: 0.032
    dash.all.js:11 <video> seek
    dash.all.js:11 [video] Getting the request for time: 29.499843750000004
    dash.all.js:11 [video] Index for time 29.499843750000004 is 2
    dash.all.js:11 [video] SegmentList: 19.6665625 / 120
    dash.all.js:11 [video] SegmentList: 29.499843750000004 / 120
    dash.all.js:11 [video] seek: 0.032
    dash.all.js:11 [audio] seek: 0.032
    dash.all.js:11 [video] Getting the request for time: 9
    dash.all.js:11 [video] Index for time 9 is 0
    dash.all.js:11 [video] SegmentList: 0 / 120
    dash.all.js:11 [video] SegmentList: 9.83328125 / 120
    dash.all.js:11 [video] SegmentList: 19.6665625 / 120
    dash.all.js:11 [video] SegmentList: 29.499843750000004 / 120
    dash.all.js:11 [video] Buffered Range: 0 - 18
    dash.all.js:11 [video] Getting the request for time: 0
    dash.all.js:11 [video] Index for time 0 is 0
    dash.all.js:11 loaded video:Media Segment:19.6665625 (200, 42ms, 33ms)
    dash.all.js:11 <video> seeked
    dash.all.js:11 Start Event Controller
    dash.all.js:11 <video> playing
    dash.all.js:11 [video] Buffered Range: 0 - 28
    dash.all.js:11 [video] Getting the request for time: 0
    dash.all.js:11 [video] Index for time 0 is 0
    dash.all.js:11 [audio] Getting the request for time: 19.999968
    dash.all.js:11 [audio] Index for time 19.999968 is 1
    dash.all.js:11 [audio] SegmentList: 9.99996875 / 120
    dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
    dash.all.js:11 [audio] Getting the request for time: 29.999906250000002
    dash.all.js:11 [audio] Index for time 29.999906250000002 is 2
    dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
    dash.all.js:11 [audio] SegmentList: 29.999906250000002 / 120
    dash.all.js:11 loaded audio:Media Segment:19.9999375 (200, 102ms, 2ms)
    dash.all.js:11 [audio] Buffered Range: 0.032 - 29.983968
    dash.all.js:11 [audio] Getting the request for time: 0
    dash.all.js:11 [audio] Index for time 0 is 0
    dash.all.js:11 loaded audio:Media Segment:29.999906250000002 (200, 26ms, 2ms)
    dash.all.js:11 [audio] Buffered Range: 0.032 - 39.999968
    dash.all.js:11 [audio] Getting the request for time: 0
    dash.all.js:11 [audio] Index for time 0 is 0
    dash.all.js:11 loaded video:Media Segment:29.499843750000004 (200, 47ms, 7ms)
    dash.all.js:11 Video Element Error: MEDIA_ERR_DECODE
    dash.all.js:11 [video] stop
    dash.all.js:11 [audio] stop
    dash.all.js:11 Video Element Error: MEDIA_ERR_SRC_NOT_SUPPORTED
    dash.all.js:11 <video> play
    </video></video></video></video></video></video></video>
  • Documentation #3374 (Nouveau) : "PHP Warning : Cannot modify header information" récurrentes

    14 janvier 2015, par Eric Camus

    Sur une machine Windows + IIS 6, avec des SPIP 3.0.17 + Sarka 3.2.28.

    On subit à longueur de journée des erreurs :
    [13-Jan-2015 10:29:07 Europe/Paris] PHP Warning:  Cannot modify header information - headers already sent by (output started at D:\wwwwww\yyyyyyy\ecrire\public.php:154) in D:\ wwwwww\yyyyyyy \ecrire\inc\headers.php on line 152

    Après une analyse du code et des essais en production, j’ai identifié que ces erreurs proviennent toutes (quel que soit le site SPIP sur les 180 actuellement en production) de l’écriture du fichier " tmp/cache/chemin.txt" qui termine le calcul de la page. Ci-dessous un debug_backtrace() :

    Array
    (
        [0] => Array
            (
                [file] => D :\wwwwww\yyyyyyy\ecrire\inc\flock.php
                [line] => 233
                [function] => http_status
                [args] => Array
                    (
                        [0] => 401
                    )
    

    )

    [1] => Array
    (
    [file] => D :\wwwwww\yyyyyyy\ecrire\inc\flock.php
    [line] => 193
    [function] => raler_fichier
    [args] => Array
    (
    [0] => tmp/cache/chemin.txt
    )

    )

    [2] => Array
    (
    [file] => D :\wwwwww\yyyyyyy\ecrire\inc\utils.php
    [line] => 1032
    [function] => ecrire_fichier
    [args] => Array
    (
    [0] => tmp/cache/chemin.txt
    [1] => a:2 :s:32 :"6f0bd1a59e3585679ea73508e8a166ba"...
    )

    )

    [3] => Array
    (
    [file] => D :\wwwwww\yyyyyyy\ecrire\public.php
    [line] => 184
    [function] => save_path_cache
    [args] => Array
    (
    )

    )

    [4] => Array
    (
    [file] => D :\wwwwww\yyyyyyy\spip.php
    [line] => 24
    [args] => Array
    (
    [0] => D :\wwwwww\yyyyyyy\ecrire\public.php
    )

    [function] => include
    )

    )

    Ayant placé ce code dans la fonction " http_status " :

    if(headers_sent())   // APmodif debug mode
        $f=$_SERVER[’DOCUMENT_ROOT’].’\debug_header.txt’ ;
        $out=date(’******************[d/m/Y H:i:s]’)."\r\n" ;
        $out.=’PHP_SELF=’.$_SERVER[’PHP_SELF’]."\r\n" ;
        $out.=’QUERY_STRING=’.$_SERVER[’QUERY_STRING’]."\r\n" ;
        $out.=’-----ob_get_contents---------------------------------------------’."\r\n".ob_get_contents()."\r\n".
              ’-----headers_list------------------------------------------------’."\r\n" ;
        $out.=print_r(headers_list(),true)."\r\n".
              ’-----------------------------------------------------------------’."\r\n" ;
        $out.=’STATUS_STRING=’.$status_string[$status]."\r\n" ;
        $out.=’*****FIN*********************************************************’."\r\n" ;
        file_put_contents($f,$out,FILE_APPEND) ;
        file_put_contents($_SERVER[’DOCUMENT_ROOT’].’\debug_backtrace.txt’,print_r(debug_backtrace(),true)) ;
    
    else 
        if ($php_cgi)
            header("Status : ".$status_string[$status]) ;
        else
            header("HTTP/1.0 ".$status_string[$status]) ;
    
    

    Un extrait de "debug_header.txt" :

    ******************[14/01/2015 08:40:53]
    PHP_SELF=/yyyyyyy/spip.php
    QUERY_STRING=page=style.css

    ob_get_contents---------------------------------------------


    headers_list------------------------------------------------
    Array
    (
    [0] => X-Powered-By : PHP/5.4.35
    [1] => Composed-By : SPIP @ www.spip.net
    [2] => X-Spip-Cache : 7776000
    [3] => Content-Type : text/css ; charset=iso-8859-15
    [4] => Vary : Accept-Encoding
    [5] => Last-Modified : Wed, 14 Jan 2015 07:40:52 GMT
    )


    STATUS_STRING=401 Unauthorized
    *****FIN*********************************************************

    Cette analyse montre que ces erreurs passent toutes par l’appel de la fonction "raler_fichier" dans " ecrire_fichier" du fichier "flock.php" :

        if (!$ignorer_echec) 
            include_spip(’inc/autoriser’) ;
            if (autoriser(’chargerftp’))
                raler_fichier($fichier) ;
            spip_unlink($fichier) ;
        
    

    Maintenant les questions :

    - Pourquoi seuls les administrateurs affichent cette erreur qui en plus arrête le processus par un "exit" dans "raler_fichier", donc les codes suivant ne sont pas exécuter (suppression et log SPIP) ? Sans compter que l’on ne voit rien car la plupart du temps elle arrive dans un fichier de CSS !!!
    - Pourquoi supprimer un fichier qui n’est pas obligatoirement en erreur car c’est probablement un problème de LOCK (deux processus en même temps) ?
    - Peut-on désactivé cette portion de code sans risque de problème ?

    Pour la part, je prends sur moi de supprimer cette portion de code.