Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (21)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

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

  • Draw FFmpeg AVFrame data with OpenGL in Go

    27 avril 2018, par nevernew

    I’m making a video player in Go (on Windows) using FFmpeg and OpenGl, with the go wrappers goav and go-gl respectively. I want to set the pixels (stored in AVFrame->data) as a texture to display with OpenGL.

    I have it drawing pixels from a test array I created in Go, but it’s not taking the AVFrame data at all. The gl wrapper is giving me an error panic: reflect: call of reflect.Value.Pointer on uintptr Value with this code, I’ve tried different ways, trying to cast the data to the right type to be accepted but to no avail.

    This is the offending code where f is of type *Frame :

    type Frame C.struct_AVFrame

    dataPtr := (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&f.data))))
    dataAddr := uintptr(unsafe.Pointer(dataPtr))

    glPixelPointer := gl.Ptr(dataAddr) // reflect error happens here, so the pointer is wrong

    Trying to get the data from this C struct :

    #include

    typedef struct AVFrame {
    #define AV_NUM_DATA_POINTERS 8
       uint8_t *data[AV_NUM_DATA_POINTERS];
    }

    I can provide the rest of the code if needed, but there’s a lot of it to get the example running.

  • Draw FFmpeg AVFrame data with OpenGL with Go

    27 avril 2018, par nevernew

    I’m making a video player in Go (on Windows) using FFmpeg and OpenGl, with the go wrappers goav and go-gl respectively. I want to set the pixels (stored in AVFrame->data) as a texture to display with OpenGL.

    I have it drawing pixels from a test array I created in Go, but it’s not taking the AVFrame data at all. The gl wrapper is giving me an error panic: reflect: call of reflect.Value.Pointer on uintptr Value with this code, I’ve tried different ways, trying to cast the data to the right type to be accepted but to no avail.

    This is the offending code where f is of type *Frame :

    type Frame C.struct_AVFrame

    dataPtr := (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&f.data))))
    dataAddr := uintptr(unsafe.Pointer(dataPtr))

    glPixelPointer := gl.Ptr(dataAddr) // reflect error happens here, so the pointer is wrong

    Trying to get the data from this C struct :

    #include

    typedef struct AVFrame {
    #define AV_NUM_DATA_POINTERS 8
       uint8_t *data[AV_NUM_DATA_POINTERS];
    }

    I can provide the rest of the code if needed, but there’s a lot of it to get the example running.

  • Python stream H.264 data over socket

    9 janvier 2017, par Ezra Knobloch

    I am creating a H.264 encoded stream on my Raspberry using the tool ’raspivid’ and sending that stream to stdout.
    What i want is sending that stream to another computer and feed it to ffmpeg which in turn feeds it to MPlayer.

    When i do this using netcat and pipes it does work really good, i have a clean stream without any graphic bugs.

    I try to get the raspivid stdout over the subprocess module, see code below. Im more or less sure the problem lies somewhere there cause i did something similar a while back and it worked without many problems, and the only thing i did different now is using subprocess.

    My question is : does someone see what causes my problems ?

    Some Notes :

    • Using streamObj.get_data(pcktSize) did never work until now (MPlayer and ffmpeg cant open the stream)

    • process.stdout.readline() seems to be a bit faster than just read()

    • this code seems to be slower than just piping and netcat, how would i make it faster ? (while still using python)

    i need to write this sentence cause the code formatting below would be corrupted if i would not.

    import subprocess, socket, sys, time
    from thread import start_new_thread

    class streamObject:
       def __init__(self):
           global data
           data = ""

       def start_stream(self, rot, t, w, h, fps):
           global data

           process = subprocess.Popen(['/usr/bin/raspivid', '-rot', str(rot), '-t', str(t), '-w', str(w), '-h', str(h), '-fps', str(fps), '-o', '-'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

           nodata_counter = 0

           while 1:
               if process.poll() is None:
                   data += process.stdout.readline()
                   #data += process.stdout.read(256)

                   sys.stdout.write("buffered %i bytes.     \r" % len(data))
                   sys.stdout.flush()
               elif nodata_counter < 200:
                   nodata_counter += 1

                   time.sleep(0.1)
               else:
                   break

       def get_alldata(self):
           global data

           return data

       def get_data(self, data_len):
           global data

           if len(data) > data_len:
               temp = data[0:data_len]
               data = data[data_len:len(data)]

               return temp
           else:
               return None

       def clear_cache(self):
           global data

           data = ""

       def poll(self):
           global data

           try:
               if len(data) != 0:
                   return None
               else:
                   return 0
           except:
               return 0

    def socket_connect(ip, port):
       s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
       s.connect((ip, port))

       return s

    def socket_listen(ip, port):
       s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
       s.bind((ip, port))
       s.listen(1)

       conn, addr = s.accept()

       return conn

    def socket_close(sock):
       sock.close()

    def send_stream(sock, streamObj, pcktSize):
       timeout = 0

       while 1:
           if streamObj.poll() is None:
               #data = streamObj.get_data(pcktSize)

               data = streamObj.get_alldata()
               streamObj.clear_cache()

               if data is not None:
                   sock.send(data)
           elif timeout < 200:
               timeout += 1

               time.sleep(0.1)
           else:
               break

    stream = streamObject()

    start_new_thread(stream.start_stream, (180, 0, 1280, 720, 20))

    sock = socket_connect("xxxx.xxxx.xxxx.xxxx", 7777)

    send_stream(sock, stream, 256)

    Here is a short video of the graphic bugs i encounter.

    I am doing this over a direct ethernet connection at this time.