Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (45)

  • 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

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

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

  • Render a small video with low delay

    6 septembre 2024, par Makis Christou

    So I have a problem where I need to be able to render a (3s, 180 frame) video on demand and delay is important. I know that video rendering scales linearly but for some reason when using a threadpool in python (moviepy) it doesn't scale linearly at all and the CPU is underutilized. This is how I do it atm :

    


        start_time = time.time()  # Start timing the frame processing
    
    # Process frames in parallel using a persistent thread pool
    processed_frames = []
    with ThreadPoolExecutor(max_workers=num_threads) as executor:
        future_to_chunk = {executor.submit(process_frame_chunk, chunk, config): i for i, chunk in enumerate(frame_chunks)}
        for future in as_completed(future_to_chunk):
            processed_frames.extend(future.result())


    end_time = time.time()  # End timing the frame processing
    print(f"Frame processing took {end_time - start_time:.2f} seconds.")


    


    With 32 and 16 threads I get about the same time which is 2.7s and with 4 I get 3s. With 1 thread I get about 8.5s. How should I go about debugging this ? Is there overhead when starting the threads ?

    


    I tried the above and was expecting a linear speedup or close to it.

    


  • How to extract a small segment of H264 stream from a complete H264 stream ?

    13 août 2024, par 陈炫宇

    I cut a large image into many tiles (150,000), and then encoded it into a .h264 file with FFmpeg at one frame per second and put it on the server. Now I want to randomly decode a picture from the .h264 file for analysis.
My idea for decoding locally is to record their indexes (i, j) when cutting the pictures, and then let the decoder find the corresponding frame in .h264 according to the index, and the effect is pretty good.
Now I put .h264 on the server (minio), and I want to intercept only a section of the code stream and decode it. Is this possible ?

    


    (For example, my .h264 has 10 frames in total, and I want to decode the 5th frame and save it. Can I cache the 4th to 6th frames and then decode them ?)

    


    ----------------------This is the code I used to capture a small portion of the stream from the server.-----------------------------------------------------------

    


    @lru_cache(1024)
def read_small_cached(self, start, length, retry=5):
    ''' read cached and thread safe, but do not read too large'''
    if length == 0:
        return b''
    resp = None
    for _ in range(retry):
        try:
            _client = minio_get_client()
            resp = _client.get_object(
                self.bucket, self.filename, offset=start, length=length)
            oup = resp.read()
            return oup
        except:
            time.sleep(3)
        finally:
            if resp is not None:
                resp.close()
                resp.release_conn()
    raise Exception(f'can not read {self.name}')


    



    


    I tried parameters such as start = 0, length = 10241024100, and I can read part of the picture.

    


    But when I used the function to find IDR frames and get their position, FFmpeg's decoder thought it was an invalid resource.

    


    ---here is my find key_frame 's code-

    


    def get_all_content(file_path, search_bytes):

if not file_path or not search_bytes:
    raise ValueError("file_path 和 search_bytes 不能为空")

search_len = len(search_bytes)
positions = []

with open(file_path, 'rb') as fp:
    fp.seek(0, 2)  # 移动到文件末尾 0表示文件移动的字节数,2表示到末尾,这样是为了获取文件的总大小
    file_size = fp.tell()  # 文件大小
    fp.seek(0)  # 回到文件开始

    pos = 0
    while pos <= (file_size - search_len):
        fp.seek(pos)
        buf = fp.read(search_len)
        if len(buf) < search_len:
            break
        if buf == search_bytes:
            positions.append(pos)
        pos += 1

return positions


    


    I have only recently started to understand H264. Perhaps I have a misunderstanding of bitstream and H264. I hope to get some guidance. Thanks in advance !

    


  • lavu/stereo3d : change the horizontal FOV field to a rational

    23 juin 2024, par Lynne
    lavu/stereo3d : change the horizontal FOV field to a rational
    

    This avoids hardcoding any implementation-specific limitiations as
    part of the API, and allows for future expandability.

    This also allows API users to more conveniently convert the
    values into floats without hardcoding specific conversion constants.

    The API was committed a few days ago, so changing this field now
    is within the realms of acceptable.

    • [DH] fftools/ffprobe.c
    • [DH] libavformat/dump.c
    • [DH] libavformat/mov.c
    • [DH] libavutil/stereo3d.c
    • [DH] libavutil/stereo3d.h
    • [DH] tests/ref/fate/matroska-spherical-mono
    • [DH] tests/ref/fate/matroska-spherical-mono-remux
    • [DH] tests/ref/fate/matroska-stereo_mode
    • [DH] tests/ref/fate/matroska-vp8-alpha-remux
    • [DH] tests/ref/fate/mov-spherical-mono