Recherche avancée

Médias (91)

Autres articles (25)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (4428)

  • I received connection refused error while trying to stream live video through RTMP with FFMPEG

    25 septembre 2020, par Femzy

    I am working on a nodeJs app that can send camera stream to third party plartform i.e Facebook and Youtube using the RTMP protoco ;.. It works well on my localhost but once i deploy to the server, it only give me errors. The error I get is below on this content..
Here is my codes

    


    server.js

    


    

    

    const child_process = require('child_process'); // To be used later for running FFmpeg
const express = require('express');
const http = require('http');
const WebSocketServer = require('ws').Server;

const app = express();
const server = http.createServer(app).listen(4000, () => {
  console.log('Listening...');
});

// Serve static files out of the www directory, where we will put our HTML page
app.use(express.static(__dirname + '/www'));


const wss = new WebSocketServer({
  server: server
});
wss.on('connection', (ws, req) => {
  
  
  
  const rtmpUrl = 'rtmp://a.rtmp.youtube.com/live2/MyStreamId';
  console.log('Target RTMP URL:', rtmpUrl);
  
  // Launch FFmpeg to handle all appropriate transcoding, muxing, and RTMP.
  // If 'ffmpeg' isn't in your path, specify the full path to the ffmpeg binary.
  const ffmpeg = child_process.spawn('ffmpeg', [
    // Facebook requires an audio track, so we create a silent one here.
    // Remove this line, as well as `-shortest`, if you send audio from the browser.
    //'-f', 'lavfi', '-i', 'anullsrc',
    
    // FFmpeg will read input video from STDIN
    '-i', '-',
    
    // Because we're using a generated audio source which never ends,
    // specify that we'll stop at end of other input.  Remove this line if you
    // send audio from the browser.
    //'-shortest',
    
    // If we're encoding H.264 in-browser, we can set the video codec to 'copy'
    // so that we don't waste any CPU and quality with unnecessary transcoding.
    // If the browser doesn't support H.264, set the video codec to 'libx264'
    // or similar to transcode it to H.264 here on the server.
    '-vcodec', 'copy',
    
    // AAC audio is required for Facebook Live.  No browser currently supports
    // encoding AAC, so we must transcode the audio to AAC here on the server.
    '-acodec', 'aac',
    
    // FLV is the container format used in conjunction with RTMP
    '-f', 'flv',
    
    // The output RTMP URL.
    // For debugging, you could set this to a filename like 'test.flv', and play
    // the resulting file with VLC.  Please also read the security considerations
    // later on in this tutorial.
    rtmpUrl 
  ]);
  
  // If FFmpeg stops for any reason, close the WebSocket connection.
  ffmpeg.on('close', (code, signal) => {
    console.log('FFmpeg child process closed, code ' + code + ', signal ' + signal);
    ws.terminate();
  });
  
  // Handle STDIN pipe errors by logging to the console.
  // These errors most commonly occur when FFmpeg closes and there is still
  // data to write.  If left unhandled, the server will crash.
  ffmpeg.stdin.on('error', (e) => {
    console.log('FFmpeg STDIN Error', e);
  });
  
  // FFmpeg outputs all of its messages to STDERR.  Let's log them to the console.
  ffmpeg.stderr.on('data', (data) => {
    console.log('FFmpeg STDERR:', data.toString());
  });

  // When data comes in from the WebSocket, write it to FFmpeg's STDIN.
  ws.on('message', (msg) => {
    console.log('DATA', msg);
    ffmpeg.stdin.write(msg);
  });
  
  // If the client disconnects, stop FFmpeg.
  ws.on('close', (e) => {
    ffmpeg.kill('SIGINT');
  });
  
});

    


    


    



    On the server.js file i create a websocket to receive stream data from the client side and then use FFMPEG to send the stream data over to youtube via the RTMP url

    


    Here is my client.js code

    


    

    

    const ws = new WebSocket(
             'wss://my-websocket-server.com'

        );
         ws.addEventListener('open', (e) => {
             console.log('WebSocket Open', e);
             drawVideosToCanvas();
             mediaStream = getMixedVideoStream(); // 30 FPS
             mediaRecorder = new MediaRecorder(mediaStream, {
               mimeType: 'video/webm;codecs=h264',
               //videoBitsPerSecond : 3000000000
               bitsPerSecond: 6000000
             });

             mediaRecorder.addEventListener('dataavailable', (e) => {
               ws.send(e.data);
             });
             mediaRecorder.onstop = function() {
              ws.close.bind(ws);
              isRecording = false;
              actionBtn.textContent = 'Start Streaming';
              actionBtn.onclick = startRecording;
             }
             mediaRecorder.onstart = function() {
              isRecording = true;
              actionBtn.textContent = 'Stop Streaming';
              actionBtn.onclick = stopRecording;
              screenShareBtn.onclick = startSharing;
              screenShareBtn.disabled = false;
             }
             //mediaRecorder.addEventListener('stop', ws.close.bind(ws));

             mediaRecorder.start(1000); // Start recording, and dump data every second

           });

    


    


    



    On my client.js file, i captured users camera and then open the websocket server to send the data to the server.. Every thing works fine on local host expect for when i deploy it to live server..
i am wondering if there is a bad configuration on the server.. The server is Centos 7.8 and the app was runing on Apache software
Here is how i configured the virtual host for the websocket domain

    


    

    

    ServerName my-websocket.com

  RewriteEngine on
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteCond %{HTTP:Connection} upgrade [NC]
  RewriteRule .* "ws://127.0.0.1:3000/$1" [P,L]

  ProxyPass "/" "http://127.0.0.1:3000/$1"
  ProxyPassReverse "/" "http://127.0.0.1:3000/$1"
  ProxyRequests off

    


    


    



    I don't know much about server configuration but i just thought may be the configuration has to do with why FFMPEg can not open connection to RTMP protocol on the server.

    


    here is the error am getting

    


    

    

    FFmpeg STDERR: Input #0, lavfi, from &#x27;anullsrc&#x27;:&#xA;  Duration:&#xA;FFmpeg STDERR: N/A, start: 0.000000, bitrate: 705 kb/s&#xA;    Stream #0:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s&#xA;&#xA;DATA <buffer 1a="1a">&#xA;DATA <buffer 45="45" df="df" a3="a3" 42="42" 86="86" 81="81" 01="01" f7="f7" f2="f2" 04="04" f3="f3" 08="08" 82="82" 88="88" 6d="6d" 61="61" 74="74" 72="72" 6f="6f" 73="73" 6b="6b" 87="87" 0442="0442" 85="85" 02="02" 18="18" 53="53" 80="80" 67="67" ff="ff" 53991="53991" more="more" bytes="bytes">&#xA;DATA <buffer 40="40" c1="c1" 81="81" 00="00" f0="f0" 80="80" 7b="7b" 83="83" 3e="3e" 3b="3b" 07="07" d6="d6" 4e="4e" 1c="1c" 11="11" b4="b4" 7f="7f" cb="cb" 5e="5e" 68="68" 9b="9b" d5="d5" 2a="2a" e3="e3" 06="06" c6="c6" f3="f3" 94="94" ff="ff" 29="29" 16="16" b2="b2" 60="60" 04ac="04ac" 37="37" fb="fb" 1a="1a" 15="15" ea="ea" 39="39" a0="a0" cd="cd" 02="02" b8="b8" 56206="56206" more="more" bytes="bytes">&#xA;FFmpeg STDERR: Input #1, matroska,webm, from &#x27;pipe:&#x27;:&#xA;  Metadata:&#xA;    encoder         :&#xA;FFmpeg STDERR: Chrome&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;    Stream #1:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)&#xA;    Stream #1:1(eng): Video: h264 (Constrained Baseline), yuv420p(progressive), 1366x768, SAR 1:1 DAR 683:384, 30.30 fps, 30 tbr, 1k tbn, 60 tbc (default)&#xA;&#xA;FFmpeg STDERR: [tcp @ 0xe5fac0] Connection to tcp://a.rtmp.youtube.com:1935 failed (Connection refused), trying next address&#xA;[rtmp @ 0xe0fb80] Cannot open connection tcp://a.rtmp.youtube.com:1935&#xA;&#xA;FFmpeg STDERR: rtmp://a.rtmp.youtube.com/live2/mystreamid: Network is unreachable&#xA;&#xA;FFmpeg child process closed, code 1, signal null</buffer></buffer></buffer>

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

    I will really appreciate if I could get some insight on what may be causing this issue or what i can do to solve it..Thanks in advance..

    &#xA;

  • Join us at MatomoCamp 2024 world tour edition

    13 novembre 2024, par Daniel Crough — Uncategorized

    Join us at MatomoCamp 2024 world tour edition, our online conference dedicated to Matomo Analytics—the leading open-source web analytics platform that prioritises data privacy.

    • 🗓️ Date : 14 November 2024
    • 🌐 Format : 24-hour virtual conference accessible worldwide
    • 💰 Cost : Free and no need to register

    Event highlights

    Opening ceremony

    Begin the day with a welcome from Ronan Chardonneau, co-organiser of MatomoCamp and customer success manager at Matomo.

    View session | iCal link

    Keynote : “Matomo by its creator”

    Attend a special session with Matthieu Aubry, the founder of Matomo Analytics. Learn about the platform’s evolution and future developments.

    View session | iCal link

    Explore MatomoCamp 2024’s diverse tracks and topics

    MatomoCamp 2024 offers a wide range of topics across several tracks, including using Matomo, integration, digital analytics, privacy, plugin development, system administration, business, other free analytics, use cases, and workshops and panel talks.

    Featured sessions

    1. Using AI to fetch raw data with Python

    Speaker : Ralph Conti
    Time : 14 November, 12:00 PM UTC

    Discover how to combine AI and Matomo’s API to create unique reporting solutions. Leverage Python for advanced data analysis and unlock new possibilities in your analytics workflow.

    View session | iCal link

    2. Supercharge Matomo event tracking with custom reports

    Speaker : Thomas Steur
    Time : 14 November, 2:00 PM UTC

    Learn how to enhance event tracking and simplify data analysis using Matomo’s custom reports feature. This session will help you unlock the full potential of your event data.

    View session | iCal link

    3. GDPR with AI and AI Act

    Speaker : Stefanie Bauer
    Time : 14 November, 4:00 PM UTC

    Navigate the complexities of data protection requirements for AI systems under GDPR. Explore the implications of the new AI Act and receive practical tips for compliance.

    View session | iCal link

    4. A new data mesh era !

    Speaker : Jorge Powers
    Time : 14 November, 4:00 PM UTC

    Explore how Matomo supports the data mesh approach, enabling decentralised data ownership and privacy-focused analytics. Learn how to empower teams to manage and analyse data without third-party reliance.

    View session | iCal link

    5. Why Matomo has to create a MTM server side : The future of data privacy and user tracking

    Panel discussion
    Time : 14 November, 6:00 PM UTC

    Join experts in a discussion on the necessity of server-side tag management for enhanced privacy and compliance. Delve into the future of data privacy and user tracking.

    View session | iCal link

    6. Visualisation of Matomo data using external tools

    Speaker : Leticia Rodríguez Morado
    Time : 14 November, 8:00 PM UTC

    Learn how to create compelling dashboards using Grafana and Matomo data. Enhance your data visualisation skills and gain better insights.

    View session | iCal link

    7. Keep it simple : Tracking what matters with Matomo

    Speaker : Scott Fillman
    Time : 14 November, 9:00 PM UTC

    Discover how to focus on essential metrics and simplify your analytics setup for more effective insights. Learn tactics for a powerful, streamlined Matomo configuration.

    View session | iCal link

    Stay connected

    Stay updated with the latest news and announcements :

    Don’t miss out

    MatomoCamp 2024 world tour edition is more than a conference ; it’s a global gathering shaping the future of ethical analytics. Whether you aim to enhance your skills, stay informed about industry trends, or network with professionals worldwide, this event offers valuable opportunities.

    For any enquiries, please contact us at info@matomocamp.org. We look forward to your participation.

  • compiling ffmpeg for Mac OSX High Sierra 10.13

    29 juillet 2021, par Martin

    Hello I made an electron app that uses ffmpeg to combine audio and renders video, it works fine on windows, linux, and modern mac osx computers, but a user has reported to me that on an older version of mac osx such as High Sierra 10.13, the way that I have setup ffmpeg does not work.

    &#xA;

    I have a virtual machine with High Sierra v10.13 where I install RenderTune-mac.dmg from my RenderTune releases page, then I download 2 audio files and the image from this link. I open RenderTune, and try render a video. My command to combine the audio files into a single mp3 works fine, but when I try to combine that mp3 with the image file, the ffmpeg build I have packaged with my electron app fails with this error :

    &#xA;

    Command was killed with SIGABRT (Aborted): /Applications/RenderTune.app/Contents/Resources/ffmpeg -loop 1 -framerate 2 -i /Users/martin/Downloads/R-3777978-1344032418-8379.jpeg.jpg -i /Users/martin/Downloads/output-871140.mp3 -y -acodec copy -b:a 320k -vcodec libx264 -b:v 8000k -maxrate 8000k -minrate 8000k -bufsize 3M -filter:v scale=w=1920:h=1954 -preset medium -tune stillimage -crf 18 -pix_fmt yuv420p -shortest /Users/martin/Downloads/concatVideo-871140.mp4&#xA;ffmpeg version git-2021-03-24-13335df Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)&#xA;  configuration: --pkgconfigdir=/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace/lib/pkgconfig --prefix=/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace --pkg-config-flags=--static --extra-cflags=&#x27;-I/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace/include -mmacosx-version-min=10.10&#x27; --extra-ldflags=&#x27;-L/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace/lib -mmacosx-version-min=10.10&#x27; --extra-libs=&#x27;-lpthread -lm&#x27; --enable-static --disable-securetransport --disable-debug --disable-shared --disable-ffplay --disable-lzma --disable-doc --enable-version3 --enable-pthreads --enable-runtime-cpudetect --enable-avfilter --enable-filters --disable-libxcb --enable-gpl --enable-nonfree --disable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libx264&#xA;  libavutil      56. 66.100 / 56. 66.100&#xA;  libavcodec     58.128.100 / 58.128.100&#xA;  libavformat    58. 69.100 / 58. 69.100&#xA;  libavdevice    58. 12.100 / 58. 12.100&#xA;  libavfilter     7.107.100 /  7.107.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;  libpostproc    55.  8.100 / 55.  8.100&#xA;Input #0, image2, from &#x27;/Users/martin/Downloads/R-3777978-1344032418-8379.jpeg.jpg&#x27;:&#xA;  Duration: 00:00:00.50, start: 0.000000, bitrate: 1758 kb/s&#xA;  Stream #0:0: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 590x600 [SAR 1:1 DAR 59:60], 2 fps, 2 tbr, 2 tbn, 2 tbc&#xA;Input #1, mp3, from &#x27;/Users/martin/Downloads/output-871140.mp3&#x27;:&#xA;  Metadata:&#xA;    title           : My Little Grass Shack&#xA;    album           : Our Hawaii - A Collection Of Personal Favorites&#xA;    artist          : Society Of Seven&#xA;    track           : 11&#xA;    encoder         : Lavf58.69.100&#xA;  Duration: 00:06:25.59, start: 0.025057, bitrate: 320 kb/s&#xA;  Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc58.12&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))&#xA;  Stream #1:0 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;[swscaler @ 0x7fbad9167600] deprecated pixel format used, make sure you did set range correctly&#xA;[libx264 @ 0x7fbad9040400] using SAR=2681/2679&#xA;dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin&#xA;  Referenced from: /Applications/RenderTune.app/Contents/Resources/ffmpeg&#xA;  Expected in: /usr/lib/libSystem.B.dylib&#xA;&#xA;dyld: Symbol not found: ____chkstk_darwin&#xA;  Referenced from: /Applications/RenderTune.app/Contents/Resources/ffmpeg&#xA;  Expected in: /usr/lib/libSystem.B.dylib&#xA;&#xA;    at makeError (/Applications/Render…eca/lib/error.js:59)&#xA;    at handlePromise (/Applications/Render…/execa/index.js:114)&#xA;    at async file:/Applicat…js/newindex.js:1323&#xA;

    &#xA;

    These files will render fine on windows/linux and recent mac versions. In order to package ffmpeg in my electron app on mac computers I had to build a custom sandboxed version with no dynamically linked libraries. I have a .sh file that automatically downloads ffmpeg and builds it with all the necessary flags for mac computers.&#xA;https://github.com/MartinBarker/RenderTune/blob/master/buildffmpeg.sh&#xA;Inside this .sh file is where I compile ffmpeg using these flags :

    &#xA;

    ./configure \&#xA;    --pkgconfigdir="$WORKSPACE/lib/pkgconfig" \&#xA;    --prefix=${WORKSPACE} \&#xA;    --pkg-config-flags="--static" \&#xA;    --extra-cflags="-I$WORKSPACE/include -mmacosx-version-min=${MACOS_MIN}" \&#xA;    --extra-ldflags="-L$WORKSPACE/lib -mmacosx-version-min=${MACOS_MIN}" \&#xA;    --extra-libs="-lpthread -lm" \&#xA;        --enable-static \&#xA;        --disable-securetransport \&#xA;        --disable-debug \&#xA;        --disable-shared \&#xA;        --disable-ffplay \&#xA;        --disable-lzma \&#xA;        --disable-doc \&#xA;        --enable-version3 \&#xA;        --enable-pthreads \&#xA;        --enable-runtime-cpudetect \&#xA;        --enable-avfilter \&#xA;        --enable-filters \&#xA;        --disable-libxcb \&#xA;        --enable-gpl \&#xA;        --enable-nonfree \&#xA;        --disable-libass \&#xA;        --enable-libfdk-aac \&#xA;        --enable-libmp3lame \&#xA;        --enable-libx264 &#xA;

    &#xA;

    If I try to run this script in my High Sierra VM, it fails with this message :

    &#xA;

    Unknown option "-extra-libs=-lpthread"

    &#xA;

    if I remove that flag it fails with a different message :

    &#xA;

    Unknown option "--enable-static"

    &#xA;

    I need this flag in order to release my electron app on the mac apple store, can anyone help me compile a static version of ffmpeg that works on old versions like High Sierra 10.13 as well as works on modern mac os systems ?

    &#xA;