Recherche avancée

Médias (91)

Autres articles (53)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (4326)

  • How to set ffmpeg reconnect or quit when rtsp stream connection breaks

    8 février, par hate29

    I use ffmpeg to save rtsp stream from my wi-fi camera. It works fine but when connection dies, I don't get any notice or it doesn't reconnect automatically. Here's my command :

    


    screen -S garage ffmpeg -hide_banner -y -loglevel error -rtsp_transport tcp -use_wallclock_as_timestamps 1 -i rtsp://user:password@192.168.XXX.XXX:XXX/stream1 -vcodec copy -acodec copy -f segment -reset_timestamps 1 -segment_time 14400 -segment_format mkv -segment_atclocktime 1 -strftime 1 garage%Y%m%dT%H%M%S.mkv


    


    I found this code from this site (if I remember correctly), tinkered a little (added screen -S) and got it working fine. Now I check my stream every morning by looking saved files and are they in realtime. If yes, then I know that stream is working. Needless to say that this is quite cumbersome technique.

    


    So what I need is that the stream reconnects if it fails to connect. This would be best. Second best option would be that it kills screen. Now it just seems do its job even if its not recording anything. I think the connection breaks from time to time because wi-fi is what it is. For that I can't do anything.

    


  • Program not working as expected on DigitalOcean Ubuntu

    22 mai 2022, par Stardust

    Currently, I am writing a discord bot on python and tried to put it on my droplet of Digital Ocean to make it run 24/7 ; however, my play method and radio method will not produce sound in the environment. When I tested on my local python interpreter everything works fine but the statement seems to have no effect when it was run on the server.

    


        @commands.command(name="radio")
    async def radio(self, ctx, url: str = 'https://listen.moe/fallback'):
    print("radio received!")
    channel = ctx.message.author.voice.channel
    self.is_radio = True
    try:
        self.vc = await channel.connect()

    except Exception:
        pass
    if self.vc is None:
        await ctx.send("Sorry but I cannot find where are you...")
    else:
        await ctx.send("Take a look at this! Hope you will like it~")
        self.vc.play(FFmpegPCMAudio('https://listen.moe/fallback'))


    


    I uses the ubuntu provided by the Digital Ocean droplet, and uses git clone to copy the file into the server, then uses python3 main.py to run the code.

    


  • Python FFMPEG Heroku|Remove audio from video with Byte to Byte. No web processes running Error

    15 mai 2021, par samoel

    I'm trying to get a .mp4 file from an address and remove the sound from it.I also want the data sent to FFMPEG to be bytes and return the result in byte

    


    i tried different command for my code like using -movflags frag_keyframe+empty_moov.
When I run this code in Heroku and receive the log...

    


    def from_bytes_to_byte(input_bytes):
    command = f"ffmpeg -f mp4 -i /dev/stdin -vcodec copy -an -f mp4 -movflags frag_keyframe+empty_moov -"
    convert_cmd = subprocess.Popen(
        shlex.split(command),
        stdin=subprocess.PIPE,
        stdout=subprocess.PIPE,
        shell=False
    )
    b = b''
    convert_cmd.stdin.write(input_bytes)
    convert_cmd.stdin.close()
    while True:
        output = convert_cmd.stdout.read()
        if len(output) > 0:
            b += output
        else:
            error_msg = convert_cmd.poll()
            if error_msg is not None:
                break
    print("----------FINISHED------------")
    return b


result=requests.get("https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4") #.MP4 File
byterecieved=from_bytes_to_byte(result.content)


    


    heroku logs :

    


    ffmpeg version N-57204-gc7c138e411-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil      57.  0.100 / 57.  0.100
libavcodec     59.  0.100 / 59.  0.100
libavformat    59.  0.100 / 59.  0.100
libavdevice    59.  0.100 / 59.  0.100
libavfilter     8.  0.101 /  8.  0.101
libswscale      6.  0.100 /  6.  0.100
libswresample   4.  0.100 /  4.  0.100
libpostproc    56.  0.100 / 56.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/stdin':
Metadata:
major_brand     : mp42
minor_version   : 0
compatible_brands: mp42mp41isomavc1
creation_time   : 2015-08-07T09:13:02.000000Z
Duration: 00:00:30.53, start: 0.000000, bitrate: N/A
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 301 kb/s, 30 fps, 30 tbr, 30 tbn (default)
Metadata:
creation_time   : 2015-08-07T09:13:02.000000Z
handler_name    : L-SMASH Video Handler
vendor_id       : [0][0][0][0]
encoder         : AVC Coding
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 112 kb/s (default)
Metadata:
creation_time   : 2015-08-07T09:13:02.000000Z
handler_name    : L-SMASH Audio Handler
vendor_id       : [0][0][0][0]
Output #0, mp4, to 'pipe:':
Metadata:
major_brand     : mp42
minor_version   : 0
compatible_brands: mp42mp41isomavc1
encoder         : Lavf59.0.100
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 301 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
Metadata:
creation_time   : 2015-08-07T09:13:02.000000Z
handler_name    : L-SMASH Video Handler
vendor_id       : [0][0][0][0]
encoder         : AVC Coding
Stream mapping:
**2021-05-14T21:32:09.639203+00:00** app[worker.1]: Stream #0:0 -> #0:0 (copy)
**2021-05-14T22:12:36.527864+00:00** heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=desolate-inlet-50581.herokuapp.com request_id=cc985185-6ba7-4530-95f8-f4512f465039 fwd="5.122.192.170" dyno= connect= service= status=503 bytes= protocol=https
2021-05-14T22:12:37.303089+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=desolate-inlet-50581.herokuapp.com request_id=f26b18a5-30ac-41e2-9b63-8f945b746b12 fwd="5.122.192.170" dyno= connect= service= status=503 bytes= protocol=https
2021-05-14T22:13:39.737155+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=desolate-inlet-50581.herokuapp.com request_id=12a28261-d746-4067-ab4b-05d3e2e8c379 fwd="5.122.192.170" dyno= connect= service= status=503 bytes= protocol=https
2021-05-14T22:13:40.372446+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=desolate-inlet-50581.herokuapp.com request_id=c2e2ebc8-9fb2-4d30-8876-2fede3dfd141 fwd="5.122.192.170" dyno= connect= service= status=503 bytes= protocol=https