Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (69)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (11679)

  • MP4Box does not create final segment

    5 janvier 2019, par Dhruva

    MP4Box is not creating the final segment of video when I dash it. If I run this command on the command line I get only 15 segments out of 16(there is no error) and running it in Google’s Shaka player gives me a 404 at the end of the video saying that the 16th video segment is not found. I am running MP4Box version 0.5.2.

    MP4Box -dash 4000 -rap -frag-rap -sample-groups-traf -profile dashavc264:live -bs-switching multi -url-template video-700k-encrypted.mp4 video-1000k-encrypted.mp4 video-1500k-encrypted.mp4 video-2000k-encrypted.mp4 audio-encrypted.mp4 -out "dash_protected/manifest.mp4"

    .mpd file

    <?xml version="1.0"?>

    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H1M0.096S" maxsegmentduration="PT0H0M4.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011,http://dashif.org/guidelines/dash264">
    <programinformation moreinformationurl="http://gpac.sourceforge.net">
     
    </programinformation>

    <period duration="PT0H1M0.096S">
     <adaptationset segmentalignment="true" bitstreamswitching="true" maxwidth="1024" maxheight="576" maxframerate="24" par="16:9" lang="eng">
      <segmenttemplate initialization="manifest_set1_init.mp4"></segmenttemplate>
      <contentprotection schemeiduri="urn:mpeg:dash:mp4protection:2011" value="cenc"></contentprotection>
      <representation mimetype="video/mp4" codecs="avc3.64002a" width="852" height="480" framerate="24" sar="1:1" startwithsap="1" bandwidth="1477735">
       <segmenttemplate timescale="12288" media="source-video-1500k-encrypted_dash_track1_$Number$.m4s" startnumber="1" duration="49152"></segmenttemplate>
      </representation>
      <representation mimetype="video/mp4" codecs="avc3.64002a" width="512" height="288" framerate="24" sar="1:1" startwithsap="1" bandwidth="689308">
       <segmenttemplate timescale="12288" media="source-video-700k-encrypted_dash_track1_$Number$.m4s" startnumber="1" duration="49152"></segmenttemplate>
      </representation>
      <representation mimetype="video/mp4" codecs="avc3.64002a" width="1024" height="576" framerate="24" sar="1:1" startwithsap="1" bandwidth="1968345">
       <segmenttemplate timescale="12288" media="source-video-2000k-encrypted_dash_track1_$Number$.m4s" startnumber="1" duration="49152"></segmenttemplate>
      </representation>
      <representation mimetype="video/mp4" codecs="avc3.64002a" width="640" height="360" framerate="24" sar="1:1" startwithsap="1" bandwidth="994771">
       <segmenttemplate timescale="12288" media="source-video-1000k-encrypted_dash_track1_$Number$.m4s" startnumber="1" duration="49152"></segmenttemplate>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" lang="eng">
      <contentprotection schemeiduri="urn:mpeg:dash:mp4protection:2011" value="cenc"></contentprotection>
      <representation mimetype="audio/mp4" codecs="mp4a.40.2" audiosamplingrate="22050" startwithsap="1" bandwidth="69486">
       <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
       <segmenttemplate timescale="22050" media="source-audio-encrypted_dash$Number$.m4s" startnumber="1" duration="88045" initialization="source-audio-encrypted_dashinit.mp4"></segmenttemplate>
      </representation>
     </adaptationset>
    </period>
    </mpd>
  • ffmpeg out of sync after split and put together

    5 septembre 2017, par LaborC

    Looking for the correct way to encode a given input video in multiple bitrates and then package it for dash and hls. I thought this is a basic task, but as it turns out, I could not find a best practise on how to achieve this.
    So the way I do it is (but with these I get an out of sync video/audio) :

    First I split my video (mp4) into video and audio.

    ffmpeg -c:v copy -an video_na.mp4 -i source_input.mp4
    ffmpeg -c:a aac -ac 2 -async 1 -vn audio.mp4 -i source_input.mp4

    Then I encode the video with the following commands :

       ffmpeg.exe -i video_na.mp4 -an -c:v libx264 -crf 18 \
    -preset fast -profile:v high -level 4.2 -b:v 2000k -minrate 2000k \
    -maxrate 2000k -bufsize 4000k -g 96 -keyint_min 96 -sc_threshold 0 \
    -filter:v "scale='trunc(oh*a/2)*2:576'" -movflags +faststart \
    -pix_fmt yuv420p -threads 4 -f mp4 video-2000k.mp4

       ffmpeg.exe -i video_na.mp4 -an -c:v libx264 -crf 18 \
    -preset fast -profile:v high -level 4.2 -b:v 1500k -minrate 1500k \
    -maxrate 1500k -bufsize 3000k -g 96 -keyint_min 96 -sc_threshold 0 \
    -filter:v "scale='trunc(oh*a/2)*2:480'" -movflags +faststart \
    -pix_fmt yuv420p -threads 4 -f mp4 video-1500k.mp4

    After that I fragment the videos.

    mp4fragment --fragment-duration 4000 --timescale 10000 video-2000k.mp4 \
    video-2000k-f.mp4

    mp4fragment --fragment-duration 4000 --timescale 10000 video-1500k.mp4 \
    video-1500k-f.mp4

    And finally package everything together again for dash.

    mp4dash --media-prefix=out  \
         --use-segment-timeline  \
         video-2000k-f.mp4  \
         video-1500k-f.mp4  \
        --out dash

    Now there is a difference between audio and video.

    I think that the problem is with my parameters for encoding. But which one I have no idea.
    What am I doing wrong ?

  • Not able to merge init.mp4 and seg-*.m4s with ffmpeg and python due to its file format difference

    1er février 2023, par XiBBaL

    I'm developing video downloader (only for free videos) for korean anime streaming site https://laftel.net/

    &#xA;

    I guess laftel.net uses mpeg-dash for their streaming.&#xA;I found "init.mp4" file and "segments-number.m4s" files in chrome developer tools.

    &#xA;

    Code below downloads seg-1.m4s (name of the first segment) to seg-239.m4s (name of the last segment) file and init.mp4 file and it works.

    &#xA;

    &#xA;(Skip the beginning becasue there is a code that collects "Request-URL" for each .m4s files in network stream)&#xA;&#xA;&#xA;#variable "found" is part of the "Request-URL"&#xA;&#xA;def curl_m4s():&#xA;    for i in range(1,240): #number of the .m4s segment file is constant at 239&#xA;        vid_url = f"https://mediacloud.laftel.net/{found}/video/avc1/2/seg-{i}.m4s"&#xA;        aud_url = f"https://mediacloud.laftel.net/{found}/audio/mp4a/eng/seg-{i}.m4s"&#xA;        &#xA;        if i &lt; 10: #for single digit num&#xA;            os.system(f"curl {vid_url} > {location}/vids/vid00{i}.m4s")&#xA;            os.system(f"curl {aud_url} > {location}/auds/aud00{i}.m4s")&#xA;            sleep(random.randint(1,3))&#xA;            &#xA;        elif i &lt; 100: #for double digit num&#xA;            os.system(f"curl {vid_url} > {location}/vids/vid0{i}.m4s")&#xA;            os.system(f"curl {aud_url} > {location}/auds/aud0{i}.m4s")&#xA;            sleep(random.randint(1,3))&#xA;            &#xA;        else: #for three digit num&#xA;            os.system(f"curl {vid_url} > {location}/vids/vid{i}.m4s")&#xA;            os.system(f"curl {aud_url} > {location}/auds/aud{i}.m4s")&#xA;            sleep(random.randint(1,3))&#xA;&#xA;location = os.getcwd()&#xA;&#xA;os.system(f"curl https://mediacloud.laftel.net/{found}/video/avc1/2/init.mp4 > {location}/vids/vid_init.mp4")&#xA;os.system(f"curl https://mediacloud.laftel.net/{found}/audio/mp4a/eng/init.mp4 > {location}/auds/aud_init.mp4")&#xA;os.system(f"curl https://mediacloud.laftel.net/{found}/stream.mpd > {location}/stream.mpd")&#xA;&#xA;curl_m4s()&#xA;#use curl in cmd and downloads each of the .m4s (001 ~ 239)&#xA;&#xA;    &#xA;

    &#xA;

    So in the vids folder i have "init.mp4" for video and "seg-1.m4s seg-239.m4s" for video&#xA;and in the auds folder i have "init.mp4" for audio and "seg-1.m4s seg-239.m4s" for audio

    &#xA;

    Problem is, I cannot merge init file and segment files.&#xA;I have no idea about combining .mp4 and .m4s together.&#xA;There are a lot of example codes for merging init.m4s + seg-.m4s but I couldn't find init.mp4 + seg-.mp4 codes.

    &#xA;

    I tried to merge segments together first, like this and it works.

    &#xA;

    location = os.getcwd()&#xA;&#xA;os.system(f"cd {location}")&#xA;os.system("copy /b vid*.m4s vid_full.m4s")&#xA;

    &#xA;

    and now, i want to merge init.mp4 becasue it has very much information about whole video files.&#xA;But how ??

    &#xA;

    I tried these and none of them worked (looks like Successfull merge but it do not contain any watchable video)

    &#xA;

    # vid_full is merged segment files (seg-1.m4s &#x2B; ... &#x2B; seg-239.m4s)&#xA; &#xA;1. &#xA;os.system("copy /b init.mp4 &#x2B; vid*.m4s video_full.m4s")&#xA;os.system("ffmpeg -i video_full.m4s -c:a copy video_full.mp4")&#xA;&#xA;&#xA;2. &#xA;os.system("type vid_init.mp4 index.txt > Filename.mp4")&#xA;&#xA;&#xA;3. &#xA;import os &#xA;&#xA;os.system("ffmpeg -i vid_full.m4s -c:a copy vid_full.mp4")&#xA;os.system("copy /b vid_init.mp4 &#x2B; vid_full.mp4 VIDEO.mp4")&#xA;

    &#xA;

    All problem occurs the format of the init file is .mp4. If it was .m4s I guess I could merge it.

    &#xA;

    and I guess i must merge init file and segments files together both in .m4s format. Is it right ?&#xA;Via ffmpeg, i couldn't encode init.mp4 to init.m4s so this is the problme also.

    &#xA;

    So, Please help me merge init.mp4 and segments.m4s

    &#xA;

    All methods are wellcome at least it is based on python.

    &#xA;

      &#xA;
    1. I tried to merge init.mp4 + merged_segment.m4s but it failed
    2. &#xA;

    3. I tried to convert init.mp4 to init.m4s via ffmpeg but it failed
    4. &#xA;

    5. I tried to convert all the segments to .mp4 files and merge into init.mp4 but it failed
    6. &#xA;

    &#xA;

    I want to merge init file and segment files and make playable video.&#xA;Pleas Teach me how to do this.

    &#xA;

    Links below are what I used for my test :

    &#xA;

    [Laftel.net URL]&#xA;https://laftel.net/player/40269/46123

    &#xA;

    [Request URL for init.mp4 (video)]&#xA;https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/video/avc1/2/init.mp4

    &#xA;

    [Request URL for init.mp4 (audio)]&#xA;https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/audio/mp4a/eng/init.mp4

    &#xA;

    [Request URL for seg-1.m4s (video)]&#xA;https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/video/avc1/2/seg-1.m4s

    &#xA;

    [Request URL for seg-1.m4s (audio)]&#xA;https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/audio/mp4a/eng/seg-1.m4s

    &#xA;