Recherche avancée

Médias (1)

Mot : - Tags -/géodiversité

Autres articles (43)

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

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

  • 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/

    


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

    


    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.

    


    
(Skip the beginning becasue there is a code that collects "Request-URL" for each .m4s files in network stream)


#variable "found" is part of the "Request-URL"

def curl_m4s():
    for i in range(1,240): #number of the .m4s segment file is constant at 239
        vid_url = f"https://mediacloud.laftel.net/{found}/video/avc1/2/seg-{i}.m4s"
        aud_url = f"https://mediacloud.laftel.net/{found}/audio/mp4a/eng/seg-{i}.m4s"
        
        if i < 10: #for single digit num
            os.system(f"curl {vid_url} > {location}/vids/vid00{i}.m4s")
            os.system(f"curl {aud_url} > {location}/auds/aud00{i}.m4s")
            sleep(random.randint(1,3))
            
        elif i < 100: #for double digit num
            os.system(f"curl {vid_url} > {location}/vids/vid0{i}.m4s")
            os.system(f"curl {aud_url} > {location}/auds/aud0{i}.m4s")
            sleep(random.randint(1,3))
            
        else: #for three digit num
            os.system(f"curl {vid_url} > {location}/vids/vid{i}.m4s")
            os.system(f"curl {aud_url} > {location}/auds/aud{i}.m4s")
            sleep(random.randint(1,3))

location = os.getcwd()

os.system(f"curl https://mediacloud.laftel.net/{found}/video/avc1/2/init.mp4 > {location}/vids/vid_init.mp4")
os.system(f"curl https://mediacloud.laftel.net/{found}/audio/mp4a/eng/init.mp4 > {location}/auds/aud_init.mp4")
os.system(f"curl https://mediacloud.laftel.net/{found}/stream.mpd > {location}/stream.mpd")

curl_m4s()
#use curl in cmd and downloads each of the .m4s (001 ~ 239)

    


    


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

    


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

    


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

    


    location = os.getcwd()

os.system(f"cd {location}")
os.system("copy /b vid*.m4s vid_full.m4s")


    


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

    


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

    


    # vid_full is merged segment files (seg-1.m4s + ... + seg-239.m4s)
 
1. 
os.system("copy /b init.mp4 + vid*.m4s video_full.m4s")
os.system("ffmpeg -i video_full.m4s -c:a copy video_full.mp4")


2. 
os.system("type vid_init.mp4 index.txt > Filename.mp4")


3. 
import os 

os.system("ffmpeg -i vid_full.m4s -c:a copy vid_full.mp4")
os.system("copy /b vid_init.mp4 + vid_full.mp4 VIDEO.mp4")


    


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

    


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

    


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

    


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

    


      

    1. I tried to merge init.mp4 + merged_segment.m4s but it failed
    2. 


    3. I tried to convert init.mp4 to init.m4s via ffmpeg but it failed
    4. 


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


    


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

    


    Links below are what I used for my test :

    


    [Laftel.net URL]
https://laftel.net/player/40269/46123

    


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

    


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

    


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

    


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

    


  • Get audio (M4A or MP3) file links directly from YouTube

    10 mars 2018, par Alex

    I am developing a PHP script that obtains video download links from YouTube. The ones I am grabbing are MP4 (720p) and MP4 (360p) (no-DASH format).

    My script is similar to this PHP class : https://github.com/Athlon1600/youtube-downloader

    It allows me to download any YouTube video that I want, no matter if it has copyright or not. It handles everything with signature ciphering and deciphering included.

    However, apart from videos, I would like to obtain audio download links from YouTube videos as well, either in MP3 or M4A.

    (M4A files are provided by YouTube, but they are in DASH format, which means, it’s not a complete file, but a collection of files that need to be merged together)

    Is there a way to obtain MP3 audio download links directly from YouTube ?

    I would like to avoid using FFMPEG library as it requires a lot of resources.

    In the case that using a library like that is the only option, what’s the most optimal way to convert MP4 files to MP3 files ?

    Is there any more efficient alternative than FFMPEG ?

    PLEASE avoid comments regarding YouTube TOS

  • Stream to / from FLV

    18 août 2015, par MKN Web Solutions

    Is it possible to stream to an FLV (via exec ffmpeg) and have a client from from that FLV for real time stream (http).

    I’m not sure if this is something of RTMPT, but I’ve seen sites that use FLV to stream. I currently already use HLS and DASH, I’m just trying to experiment with other channels.