Recherche avancée

Médias (91)

Autres articles (75)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (13817)

  • Processing audio of url stream in unspecified format

    21 juillet 2019, par Bar Tzadok

    I’m trying to process url audio streams from list of urls. Each url can have different format and I’m trying to find a library that can handle all the format kinds and give me the raw stream data that I can then process.

    I have a code that can process wav stream. the problem is that some urls are in aac or mp3 formats and I need to handle each one of them correctly.

    This is the code to process wav stream :

    from urllib2 import urlopen
    #to python3.x
    #from urllib.request import urlopen
    import pyaudio

    pyaud = pyaudio.PyAudio()

    srate=44100

    stream = pyaud.open(format = pyaud.get_format_from_width(1),
                   channels = 1,
                   rate = srate,
                   output = True)

    url = "http://myurl/hara.wav"
    u = urlopen(url)

    data = u.read(8192)

    while data:

       stream.write(data)
       data = u.read(8192)

    This code currently fails when the format is not wav. I tried reading about ffmpeg or vlc to format the urls but I haven’t found a working way.

    Any help would be appreciated. :)

  • Android : Playing MP3 files with AudioTrack using ffmpeg

    16 juillet 2012, par Vipul Purohit

    I have integrated ffmpeg lib in my project and I can also get the information of media files. But now i have to play mp3 files using AudioTrack class in android using ffmpeg lib.

    For this I have to pass byte buffer to AudioTrack but I dont know how to get byte buffer from ffmpeg and use it with AudioTrack. I also want to play file instantly without delay.

    Here is my audio track code in java :

    AudioTrack track;
    bufferSize = AudioTrack.getMinBufferSize(44100,AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT)
    track = new AudioTrack(AudioManager.STREAM_MUSIC, 44100, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, bufferSize, mode);

    //Play audio clip
    track.play();

    while(stream_is_over){
    //Copy the decoded raw buffer from native code to "buffer" .....
    ............
    track.write(buffer, 0, readBytes);
    }

    Can anyone please give me the working code to play mp3 files with audio track. I have searched a lot but haven't find any correct answer.

  • NSOperationQueue's threads just don't die

    8 novembre 2013, par u2Fan

    Sorry, it's a bit wordy, but I wanted to make sure I was clear ! ;-)

    I have an iOS app that uses FFMPEG for streaming RTSP. I've multi-threaded FFMPEG using NSOperationQueue such that most its work, other than painting the image to the screen, of course, happens in background threads.
    Works great ! ...except for the fact that threads the NSOperationQueue creates never die !

    I init the Queue in the class' init method with :

    self->opQ = [[NSOperationQueue alloc] init];
    [self->opQ setMaxConcurrentOperationCount:1];

    I add methods to the Queue using blocks :

    [self->opQ addOperationWithBlock:^{
           [self haveConnectedSuccessfullyOperation];
    }];

    Or

    [self->opQ addOperationWithBlock:^{
           if (SOME_CONDITION) {
               [self performSelectorOnMainThread:@selector(DO_SOME_CRAP) withObject:nil waitUntilDone:NO];
           }
       }];

    Later, when I need to tear down the RTSP stream, in addition to telling FFMPEG to shut down, I call :

    [self->opQ cancelAllOperations];

    Which does indeed stop the threads from doing any work , but never actually destroys them. Below, you'll see a screen shot of threads that are doing nothing at all. This is what my threads look like after starting/stoping FFMPEG several times.

    Bad threads

    I seem to remember reading in Apple's documentation that NSOperations and the threads they are run on are destroyed once they are done executing, unless otherwise referenced. This doesn't appear to be the case.

    Do I just need to destroy the NSOperationQueue, then re-init it when I need to start up FFMPEG again (I just realized I haven't tried this) ? Anyone know how I need to kill these extra threads ?

    THANKS !