Recherche avancée

Médias (91)

Autres articles (40)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

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

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (3966)

  • ClassX installation "codec not found" due to dependencies [migrated]

    25 mars 2014, par khateeb

    ClassX is an interactive lecture streaming system developed in the Electrical Engineering Department at Stanford University.
    Unlike conventional lecture capturing systems, ClassX requires very simple consumer-grade equipment and minimal human operation.

    I faced problems during installing it, I hope you have a solution.

    BTW : I successfully installed it 2 years ago, but now I think the problem as the dependencies and Ubuntu versions are different than the versions we used two years ago.

    Detailed description of the problem :

    • I’m using Ubuntu 12.04
    • I followed the instructions @ ClassX installation guide, and all steps till step 4 are successfully done (the encoder bin file generated).
    • When trying to encode the video using the classX web system, it shows the encoding completed after few seconds.However, there are no tiles generated.
    • I tried to execute the command at CX_log.txt, and the following error appears.

      mahmoud@Mahmoud-HP-Pavilion-dv5-Notebook-PC : $ sudo perl /var/www/ClassXWebSystem/system/publishers/web/actions/encode.pl "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251" "/var/www/ClassXWebSystem/content/streaming/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/system/publishers/bin" classx y n n
      [sudo] password for mahmoud :
      00068.jpg
      ..
      .
      00068.mp4
      Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/00068.mp4’ :
      Metadata :
      major_brand : isom
      minor_version : 512
      compatible_brands : isomiso2avc1mp41
      encoder : Lavf52.39.0
      Duration : 00:02:30.05, start : 0.000000, bitrate : 8141 kb/s
      Stream #0.0(und) : Video : h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 8007 kb/s, 29.95 fps, 29.97 tbr, 2997 tbn, 59.94 tbc
      Stream #0.1(und) : Audio : aac, 44100 Hz, stereo, s16, 128 kb/s
      Output #0, mp4, to ’/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/stream0.mp4’ :
      Stream #0.0 : Video : [0][0][0][0] / 0x0000, yuv420p, 640x360, q=32-36, 64 kb/s, 90k tbn, 14.99 tbc
      codec not found

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

    


  • File type not recognized when using ffprobe with Python

    28 novembre 2017, par Damian

    This is my python script :

    #!/usr/bin/python3
    import os, sys, subprocess, shlex, re
    from subprocess import call

    def probe_file(filename):
       cmnd = ['ffprobe', '-show_packets', '-show_frames', '-print_format', filename]
       p = subprocess.Popen(cmnd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
       print filename
       out, err =  p.communicate()
       print "Output:"
       print out
       if err:
           print "Error:"
           print err

    probe_file(sys.argv[1])

    Being run with this command :

    python parse_frames_and_packets.py mux_test.ts

    And I’m getting the following error output :

    Unknown output format with name 'mux_test.ts'

    Can you not use .ts file types when using ffprobe with Python ? Because I’ve run ffprobe alone using this exact file and it worked correctly.

    Does anyone have any tips ?

    Edit :
    it seems to not recognize all types of video, not just transport stream (I just tried it with .avi and got the same response).