Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (79)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (5536)

  • 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

    


  • pod mobile-ffmpeg-full (4.2.2) : installation issues, does anyone know how to fix this error ?

    11 janvier 2020, par João Paulo

    COMMAND USED
    $ pod install

    ERROR RESULT
    Analyzing dependencies
    Downloading dependencies
    Installing mobile-ffmpeg-full (4.2.2)

    [!] Error installing mobile-ffmpeg-full
    [!] /usr/bin/curl -f -L -o /var/folders/vn/r7ghkzmn67114_hn0knf3jt30000rs/T/d20200111-2077-qf6xcl/file.zip https://github.com/tanersener/mobile-ffmpeg/releases/download/v4.2.2/mobile-ffmpeg-full-4.2.2-ios-framework.zip —create-dirs —netrc-optional —retry 2

    % Total % Received % Xferd AverageDload SpeedUpload TimeTotal TimeSpent TimeLeft CurrentSpeed

    100 633 0 633 0 0 1063 0 — :— :— — :— :— — :— :— 1063

    3 143M 3 5380k 0 0 14074 0 2:57:36 0:06:31 2:51:05 0

    curl : (56) LibreSSL SSL_read : SSL_ERROR_SYSCALL, errno 54

    FORM THAT WAS WRITTEN IN THE PODFILE
    pod ’mobile-ffmpeg-full’, ’ > 4.2.2’

  • Evolution #4789 (Nouveau) : Fonction recuperer_url et header spécifique

    22 mai 2021, par Eric Lupinacci

    Hello,

    Je m’essaye à l’API de Discourse.
    Je suis confronté à un souci avec recuperer_url().
    J’aurais besoin de passer une api key et un username pour l’authentification de la requête et malheureusement, cette API demande à ce que ces données soient fournies non pas dans l’URL mais dans le header.

    En curl ça donne par exemple :

    curl -X GET "http://127.0.0.1:3000/admin/users/list/active.json" \
    
    - H "Api-Key : 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \
    - H "Api-Username : system"

    J’ai regardé la fonction recuperer_url() et a priori la construction final du header se fait dans lancer_requete().
    Et malheureusement il n’y a pas de possibilité de passer des entêtes spécifiques qui viendraient compléter celle par défaut.

    Si il n’y a pas de contre-indication ça serait bien de faire évoluer recuperer_url, init_http et lancer_requete en passant un paramètre supplémentaire à la fin des prototypes qui serait sous la forme d’un tableau [champ-entete] = valeur.
    J’ai une PR prête qui fonctionne et que je vais proposer pour une possible intégration en 4.0.