Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (17)

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

  • Issues executing ffmpeg on windows

    4 avril 2017, par Somename

    Installed ffmpeg. Added the PATH in system Environment Variables and can execute ffmpeg from anywhere in the cmd. Installed fluent-ffmpeg. Below is my script :

    var express = require('express');
    var bodyParser = require('body-parser');
    var app = express();
    var ffmpeg = require('fluent-ffmpeg');  

    var proc = new ffmpeg({ source: 'myfile.gif' })
     .withAspect('4:3')
     .withSize('640x480')
     .applyAutopadding(true, 'white')
     .saveToFile('myfile.avi', function(stdout, stderr) {
       console.log('file has been converted succesfully');
     });

    app.listen(3000, function() {  
       console.log("Server Running on 3000");
    });

    Getting error :
    enter image description here

    enter image description here

    Please help.

  • Using aler9/rtsp-simple-server, able to stream HLS from file but not from ffmpeg's stdin

    11 avril 2023, par Powercoder

    UPD : hehe, it actially works, but in chrome, not mozilla

    


    I want to display programmatically generated stream on a webpage in real time. For this I have rtsp-simple-server with RTSP and HLS enabled. I managed to publish a stream from file with command ffmpeg -re -stream_loop -1 -i file.mp4 -vcodec libx264 -f rtsp -rtsp_transport tcp rtsp://localhost:8554/mystream and see it at http://localhost:8888/mystream.

    


    But when I'm trying to do the same with python from the ffmpeg's stdin, I'm getting infinitely loading video instead of stream and browser console says "Uncaught (in promise) DOMException : The fetching process for the media resource was aborted by the user agent at the user's request". Here is my code :

    


    import random
import shlex
import subprocess
import time

import numpy as np


def main():
    width = 1024
    height = 720
    framerate = 1
    frame_duration = 1 / framerate
    cmd = shlex.split(
        f'ffmpeg'
        f' -y'
        f' -f rawvideo'
        f' -vcodec rawvideo'
        f' -s {width}x{height}'
        f' -pix_fmt bgr24'
        f' -r {framerate}'
        f' -i -'
        f' -r {framerate}'
        f' -force_key_frames expr:eq(mod(n,3),0)'
        f' -vcodec libx264'
        f' -crf 18'
        f' -preset ultrafast'
        f' -tune zerolatency'
        f' -f rtsp'
        f' -rtsp_transport tcp'
        f' rtsp://localhost:8554/mystream'
    )
    ffmpeg_process = subprocess.Popen(cmd, stdin=subprocess.PIPE)
    try:
        while True:
            image = np.full(
                (height, width, 3),
                (
                    random.randint(0, 255),
                    random.randint(0, 255),
                    random.randint(0, 255),
                ),
                dtype=np.uint8,
            )
            ffmpeg_process.stdin.write(image.tobytes())
            time.sleep(frame_duration)
    finally:
        ffmpeg_process.stdin.close()
        ffmpeg_process.wait()


if __name__ == '__main__':
    main()



    


    In the server's logs seems like no bad messages instead of single 404 status (is it just about favicon, right ?)

    


    2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] GET /mystream/
2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] [c->s] GET /mystream/ HTTP/1.1
Host: localhost:8888
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: ru,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Cookie: csrftoken=iRZDO5rsJzhh5peyyKhViN9yRslNQbuZ; Webstorm-713207de=ca4f5f1e-40e8-4bfd-97da-1be2f15f6e9e
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0


2023/03/25 13:50:32 INF [HLS] [muxer mystream] created (requested by 172.18.0.1)
2023/03/25 13:50:32 INF [HLS] [muxer mystream] is converting into HLS, 1 track (H264)
2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] [s->c] HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: text/html
Server: rtsp-simple-server

(body of 1240 bytes)
2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] GET /favicon.ico
2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] [c->s] GET /favicon.ico HTTP/1.1
Host: localhost:8888
Accept: image/avif,image/webp,*/*
Accept-Encoding: gzip, deflate, br
Accept-Language: ru,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Cookie: csrftoken=iRZDO5rsJzhh5peyyKhViN9yRslNQbuZ; Webstorm-713207de=ca4f5f1e-40e8-4bfd-97da-1be2f15f6e9e
Referer: http://localhost:8888/mystream/
Sec-Fetch-Dest: image
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0


2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] [s->c] HTTP/1.1 404 Not Found
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Server: rtsp-simple-server


2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] GET /mystream/index.m3u8
2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] [c->s] GET /mystream/index.m3u8 HTTP/1.1
Host: localhost:8888
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: ru,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Cookie: csrftoken=iRZDO5rsJzhh5peyyKhViN9yRslNQbuZ; Webstorm-713207de=ca4f5f1e-40e8-4bfd-97da-1be2f15f6e9e
Referer: http://localhost:8888/mystream/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0


2023/03/25 13:50:32 DEB [HLS] [conn 172.18.0.1] [s->c] HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/x-mpegURL
Server: rtsp-simple-server

(body of 122 bytes)
2023/03/25 13:50:34 DEB [HLS] [conn 172.18.0.1] GET /mystream/index.m3u8
2023/03/25 13:50:34 DEB [HLS] [conn 172.18.0.1] [c->s] GET /mystream/index.m3u8 HTTP/1.1
Host: localhost:8888
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: ru,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Cookie: csrftoken=iRZDO5rsJzhh5peyyKhViN9yRslNQbuZ; Webstorm-713207de=ca4f5f1e-40e8-4bfd-97da-1be2f15f6e9e
Referer: http://localhost:8888/mystream/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0


2023/03/25 13:50:34 DEB [HLS] [conn 172.18.0.1] [s->c] HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/x-mpegURL
Server: rtsp-simple-server

(body of 122 bytes)
2023/03/25 13:50:36 DEB [HLS] [conn 172.18.0.1] GET /mystream/index.m3u8
2023/03/25 13:50:36 DEB [HLS] [conn 172.18.0.1] [c->s] GET /mystream/index.m3u8 HTTP/1.1
Host: localhost:8888
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: ru,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Cookie: csrftoken=iRZDO5rsJzhh5peyyKhViN9yRslNQbuZ; Webstorm-713207de=ca4f5f1e-40e8-4bfd-97da-1be2f15f6e9e
Referer: http://localhost:8888/mystream/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0


2023/03/25 13:50:36 DEB [HLS] [conn 172.18.0.1] [s->c] HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/x-mpegURL
Server: rtsp-simple-server

(body of 122 bytes)



    


    How do I get my stream from python visible on a webpage ?

    


  • swscale/utils : disable full_chr_h_input optimization for odd width

    2 décembre 2024, par Niklas Haas
    swscale/utils : disable full_chr_h_input optimization for odd width
    

    The basic problem here is that the rgb*ToUV_half_* functions hard-code a
    bilinear downsample from src[i] + src[i+1], with no bounds check on the i+1
    access.

    Due to the signature of the function, we cannot easily plumb the "true" width
    into the function body to perform a bounds check. Similarly, we cannot easily
    pre-pad the input because it is typically reading from the (const) input
    frame, which would require a full memcpy to pad. Either of these solutions are
    more trouble than the feature is worth, so just disable it on odd input sizes.

    Fixes : use of uninitialized value
    Fixes : ticket #11265
    Signed-off-by : Niklas Haas <git@haasn.dev>
    Sponsored-by : Sovereign Tech Fund

    • [DH] libswscale/utils.c