Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (64)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Submit enhancements and plugins

    13 avril 2011

    If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
    You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.

Sur d’autres sites (6689)

  • How can I improve the up-time of my coffee pot live stream ?

    26 avril 2017, par tww0003

    Some Background on the Project :

    Like most software developers I depend on coffee to keep me running, and so do my coworkers. I had an old iPhone sitting around, so I decided to pay homage to the first webcam and live stream my office coffee pot.

    The stream has become popular within my company, so I want to make sure it will stay online with as little effort possible on my part. As of right now, it will occasionally go down, and I have to manually get it up and running again.

    My Setup :

    I have nginx set up on a digital ocean server (my nginx.conf is shown below), and downloaded an rtmp streaming app for my iPhone.

    The phone is set to stream to example.com/live/stream and then I use an ffmpeg command to take that stream, strip the audio (the live stream is public and I don’t want coworkers to feel like they have to be careful about what they say), and then make it accessible at rtmp://example.com/live/coffee and example.com/hls/coffee.m3u8.

    Since I’m not too familiar with ffmpeg, I had to google around and find the appropriate command to strip the coffee stream of the audio and I found this :

    ffmpeg -i rtmp://localhost/live/stream -vcodec libx264 -vprofile baseline -acodec aac -strict -2 -f flv -an rtmp://localhost/live/coffee

    Essentially all I know about this command is that the input stream comes from, localhost/live/stream, it strips the audio with -an, and then it outputs to rtmp://localhost/live/coffee.

    I would assume that ffmpeg -i rtmp://localhost/live/stream -an rtmp://localhost/live/coffee would have the same effect, but the page I found the command on was dealing with ffmpeg, and nginx, so I figured the extra parameters were useful.

    What I’ve noticed with this command is that it will error out, taking the live stream down. I wrote a small bash script to rerun the command when it stops, but I don’t think this is the best solution.

    Here is the bash script :

    while true;
    do
           ffmpeg -i rtmp://localhost/live/stream -vcodec libx264 -vprofile baseline -acodec aac -strict -2 -f flv -an rtmp://localhost/live/coffee
           echo 'Something went wrong. Retrying...'
           sleep 1
    done

    I’m curious about 2 things :

    1. What is the best way to strip audio from an rtmp stream ?
    2. What is the proper configuration for nginx to ensure that my rtmp stream will stay up for as long as possible ?

    Since I have close to 0 experience with nginx, ffmpeg, and rtmp streaming any help, or tips would be appreciated.

    Here is my nginx.conf file :

    worker_processes  1;

    events {
       worker_connections  1024;
    }


    http {
       include       mime.types;
       default_type  application/octet-stream;

       sendfile        on;

       keepalive_timeout  65;

       server {
           listen       80;
           server_name  localhost;

           location / {
               root   html;
               index  index.html index.htm;
           }

           error_page   500 502 503 504  /50x.html;
           location = /50x.html {
               root   html;
           }

           location /stat {
                   rtmp_stat all;
                   rtmp_stat_stylesheet stat.xsl;
                   allow 127.0.0.1;
           }
           location /stat.xsl {
                   root html;
           }
           location /hls {
                   root /tmp;
                   add_header Cache-Control no-cache;
           }
           location /dash {
                   root /tmp;
                   add_header Cache-Control no-cache;
                   add_header Access-Control-Allow-Origin *;
           }
       }
    }

    rtmp {

       server {

           listen 1935;
           chunk_size 4000;

           application live {
               live on;

               hls on;
               hls_path /tmp/hls;

               dash on;
               dash_path /tmp/dash;
           }
       }
    }

    edit :
    I’m also running into this same issue : https://trac.ffmpeg.org/ticket/4401

  • ffmpeg : Continiously encode and append base64 data chunks into output file

    11 février 2021, par O.O

    I have a .mov file thats being written into by my iphone cam saved as input.mov and I have a script that's reading the currently updating file and I am trying to encode the video and audio codec into a .mkv container.

    


    I have little knowledge of this tool, but looking at similar Q/A's around ffmpeg usage I have found little on using base64 as input. But it is documented by ffmpeg for images, so I assume it is possible and I have also used data:video/mp4 since these file types are very similar.

    


    I have :

    


    const ifRecordingStream = await fs.readStream('input.mov', 'base64', 4095);
ifRecordingStream.open();

ifRecordingStream.onData((chunk) => 
    execute(`ffmpeg -f concat -i "data:video/mp4;base64,${chunk} -c:v h264 -c:a aac output.mkv")
);


    


    onData() currently throws Line {}: unknown keyword {}

    


    Is my command wrong ?

    


    ffmpeg -f concat -i "data:video/mp4;base64,${chunk}" -c:v h264 -c:a aac output.mkv

    


    Any help at all is welcomed.

    


  • ffmpeg stream video file from ubuntu to youtube

    14 mars 2018, par user3010452

    I’m trying to create a stream to youtube. I could see how preview button changes into enable state. However it never actually changes from offline.
    And it gives me several error. What am I doing wrong ?

        ffmpeg -i video.flv -f flv rtmp://a.rtmp.youtube.com/live2/XXXXXX


     ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers

         built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
         configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
         libavutil      54. 31.100 / 54. 31.100
         libavcodec     56. 60.100 / 56. 60.100
         libavformat    56. 40.101 / 56. 40.101
         libavdevice    56.  4.100 / 56.  4.100
         libavfilter     5. 40.101 /  5. 40.101
         libavresample   2.  1.  0 /  2.  1.  0
         libswscale      3.  1.101 /  3.  1.101
         libswresample   1.  2.101 /  1.  2.101
         libpostproc    53.  3.100 / 53.  3.100
       Input #0, flv, from 'video.flv':
         Metadata:
           major_brand     : qt  
           minor_version   : 0
           compatible_brands: qt  
           com.apple.quicktime.creationdate: 2017-07-20T21:44:12+0700
           com.apple.quicktime.make: Apple
           com.apple.quicktime.model: iPhone 6s Plus
           com.apple.quicktime.software: 10.3.2
           encoder         : Lavf57.83.100
         Duration: 00:01:15.24, start: 0.000000, bitrate: 4454 kb/s
           Stream #0:0: Video: flv1, yuv420p, 1920x1080, 200 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
           Stream #0:1: Audio: adpcm_swf, 44100 Hz, mono, s16, 176 kb/s
       Output #0, flv, to 'rtmp://a.rtmp.youtube.com/XXXXXX':
         Metadata:
           major_brand     : qt  
           minor_version   : 0
           compatible_brands: qt  
           com.apple.quicktime.creationdate: 2017-07-20T21:44:12+0700
           com.apple.quicktime.make: Apple
           com.apple.quicktime.model: iPhone 6s Plus
           com.apple.quicktime.software: 10.3.2
           encoder         : Lavf56.40.101
           Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080, q=2-31, 200 kb/s, 29.97 fps, 1k tbn, 29.97 tbc
           Metadata:
             encoder         : Lavc56.60.100 flv
           Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, mono, s16p
           Metadata:
             encoder         : Lavc56.60.100 libmp3lame
       Stream mapping:
         Stream #0:0 -> #0:0 (flv1 (flv) -> flv1 (flv))
         Stream #0:1 -> #0:1 (adpcm_swf (native) -> mp3 (libmp3lame))
       Press [q] to stop, [?] for help
       [flv @ 0x162bac0] Failed to update header with correct duration.ate=4125.4kbits/s    
       [flv @ 0x162bac0] Failed to update header with correct filesize.
       frame= 2255 fps=114 q=31.0 Lsize=   37863kB time=00:01:15.24 bitrate=4122.0kbits/s    
       video:37194kB audio:588kB subtitle:0kB other streams:0kB global

    headers:0kB mixing overhead : 0.213941%