Recherche avancée

Médias (0)

Mot : - Tags -/médias

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

Autres articles (28)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (5017)

  • NodeJs : How to pipe two streams into one spawned process stdin (i.e. ffmpeg) resulting in a single output

    20 juin 2018, par Keyne Viana

    In order to convert PCM audio to MP3 I’m using the following :

    function spawnFfmpeg() {
       var args = [
           '-f', 's16le',
           '-ar', '48000',
           '-ac', '1',
           '-i', 'pipe:0',
           '-acodec', 'libmp3lame',
           '-f', 'mp3',
           'pipe:1'
       ];

       var ffmpeg = spawn('ffmpeg', args);

       console.log('Spawning ffmpeg ' + args.join(' '));

       ffmpeg.on('exit', function (code) {
           console.log('FFMPEG child process exited with code ' + code);
       });

       ffmpeg.stderr.on('data', function (data) {
           console.log('Incoming data: ' + data);
       });

       return ffmpeg;
    }

    Then I pipe everything together :

    writeStream = fs.createWriteStream( "live.mp3" );
    var ffmpeg = spawnFfmpeg();
    stream.pipe(ffmpeg.stdin);
    ffmpeg.stdout.pipe(/* destination */);

    The thing is... Now I want to merge (overlay) two streams into one. I already found how to do it with ffmpeg : How to overlay two audio files using ffmpeg

    But, the ffmpeg command expects two inputs and so far I’m only able to pipe one input stream into the pipe:0 argument. How do I pipe two streams in the spawned command ? Would something like ffmpeg -i pipe:0 -i pipe:0... work ? How would I pipe the two incoming streams with PCM data (since the command expects two inputs) ?

  • Python - check subprocess activity every n seconds

    22 novembre 2017, par hlabor

    I’m trying to make python script (currently on windows) which will open some sub-processes (which will run infinitely) and script should periodically check do all of opened sub-processes still work correctly. So it should be done with while loop, I guess.

    The sub-processes are about FFMPEG livestreaming.

    The problem is when I do time.sleep(n) in my loop, because then every FFMPEG livestream stops, so I suppose time.sleep affect on all of child subprocesses.

    I have no idea how to make it work.

    Here is my python code :

    import os, time, sys, datetime, smtplib, configparser, logging, subprocess, psutil
    import subprocess

    def forwardudpstream(channel_number, ip_input, ip_output):
       try:
           ffmpeg_command = 'ffmpeg -i udp://' + ip_input + ' -vcodec copy -acodec copy -f mpegts "udp://' + ip_output + '?pkt_size=1316"'
           ffmpeg_output = subprocess.Popen(ffmpeg_command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False)
           return str(ffmpeg_output.pid)
       except:
           print ("Exception!")
           return '0'

    while True:
       configuration = 'config.ini'
       channel_list_file = 'CHANNEL_LIST.conf'
       pid_folder = "D:\\Forward_UDP_Stream\\pids\\"
       channel_list = [line.rstrip('\n') for line in open(channel_list_file)]
       for line in channel_list:
           if not line.startswith('#') and ('|' in line):
               channel_number, ip_input, ip_output = line.split('|')
               print('----------')
               print("Channel number = ", channel_number)
               print("IP Input = ", ip_input)
               print("IP Output = ", ip_output)
               pid_file_found = False
               print("Checking if pid file exists...")
               for pidfile in os.listdir(pid_folder):
                   if pidfile.startswith(channel_number + '-'):
                       print("Pid file is found for this channel.")
                       pid_file_found = True
                       pid = int(pidfile.split('-')[1].split('.')[0])
                       print("PID = ", str(pid))
                       print("Checking if corresponding process is active...")
                       if not psutil.pid_exists(pid):
                           print("Process is not active.")
                           print("Removing old pid file.")
                           os.remove(pid_folder + pidfile)
                           print("Starting a new process...")
                           pid_filename = channel_number + '-' + forwardudpstream(channel_number, ip_input, ip_output) + '.pid'
                           pid_file = open(pid_folder + pid_filename, "a")
                           pid_file.write("Process is running.")
                           pid_file.close()
                       else:
                           print("Process is active!")
                       break
               if pid_file_found == False:
                   print("Pid file is not found. Starting a new process and creating pid file...")
                   pid_filename = channel_number + '-' + forwardudpstream(channel_number, ip_input, ip_output) + '.pid'
                   pid_file = open(pid_folder + pid_filename, "a")
                   pid_file.write("Process is running.")
                   pid_file.close()
               time.sleep(10)

    Here is my CHANNEL_LIST.conf file example :

    1|239.1.1.1:10000|239.1.1.2:10000
    2|239.1.1.3:10000|239.1.1.4:10000

    Perhaps there is some other solution to put waiting and sub-processes to work together. Does anyone have an idea ?

    UPDATE :
    I finally make it work when I removed stdout=subprocess.PIPE part from the subprocess command.
    Now it looks like this :

    ffmpeg_output = subprocess.Popen(ffmpeg_command, stderr=subprocess.STDOUT, shell=False)

    So now I’m confused why previous command was making a problem...?
    Any explanation ?

  • How can I bundle ffmpeg in an Electron application

    14 janvier 2024, par jshbrntt

    I'm building an Electron application starting from the electron-webpack boilerplate.

    



    I found this node module @ffmpeg-installer/ffmpeg which installs a compatible precompiled binary into the /node_modules directory then makes the path of that executable accessible through.

    



    const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path


    



    This works fine during development, but when I build the distributable and run it I get an error when attempting to spawn a child process with that path. Presumably, because the path does not point at the binary.

    



    The path is set to the following when running the distributable.

    



    /Users/me/project/dist/mac/AppName.app/Contents/Resources/app.asar/node_modules/@ffmpeg-installer/darwin-x64/ffmpeg


    



    However, when looking in the AppName.app package contents I find the binary in the following path.

    



    /Users/me/project/dist/mac/AppName.app/Contents/Resources/app.asar.unpacked/node_modules/@ffmpeg-installer/darwin-x64/ffmpeg


    



    How should I include binary dependencies in an Electron application using electron-webpack and electron-builder ?