Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (102)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6663)

  • FFMPEG FDKAAC and Python

    3 avril 2024, par Eric Barker

    Been banging my head against the wall for days on this. I'm writing a python program to take a 48kHz WAV file, convert it to 44.1kHz and encode it to HE-AAC via FDKAAC. FDK cannot convert to sample rates, so I'm using FFMPEG as the wrapper and piping it through FDKAAC. In a perfect world, I'd make a custom build of FFMPEG with FKD, but I've run into loads of issues on our Windows Server 2019 machine trying to build out FFMPEG, so I'm using vanilla FFMPEG with FDK piped in.

    


    I can get the command to work perfectly from a command prompt :

    


    ffmpeg -progress pipe:2 -i  -f wav -ar 44100 - | fdkaac -p 5 -b 64000 -o 


    


    But when I try to split it in Python for a Popen, it tries to evaluate the arguments and fails because ffmpeg doesn't have a "-p" argument :

    


    cmd = ['ffmpeg', '-progress', 'pipe:2', '-i', inFile, \
    '-f', 'wav', '-ar', '44100', '-', '|', \
    'fdkaac', '-p', '5', '-b', '64000', '-o', outFile]
fdkProcess = subprocess.Popen(cmd,
            stdout=subprocess.PIPE,
            universal_newlines=True)
for line in fdkProcess.stdout:
    print(line)


    


    RESULT :

    


    Unrecognized option 'p'.
Error splitting the argument list: Option not found


    


    I'll admit, I don't fully understand the pipeline process, and how to split commands via the "|" flag, and have them properly feed into stdout for the subprocess function to work correctly. I'm fairly new to python, and very new to programmatically capturing the output of a process like ffmpeg.

    


  • Back on the Salty Track

    12 juin 2011, par Multimedia Mike — General

    After I posted about my initial encounter and frustration with Google’s Native Client (NaCl) SDK and took a deep breath, I realized that I achieved an important proof of concept— I successfully played music using the NaCl SDK audio output interface. Then I started taking a closer read through the (C-based set of) header files and realized I might be able to make a go of it after all. I had much better luck this time and managed to create a proper Native Client interface that allows for controlling playback, presenting metadata, and toggling individual voices (a fascinating tool for studying classic game music).

    I haven’t bothered to post the actual plugin because, really, what’s the point ? I started with NaCl SDK 0.3 which requires Chrome 12, which means terribly limited reach, even among Chrome users. At least, that was true when I restarted this little project. Chrome 12 was formally released this past week. Chrome development really does move at breakneck pace.

    Anyway, here is a static screenshot of what the plugin currently looks like :



    Not pretty, but it does the job.

    Dev Journal
    Various notes based on this outing :

    • Portability : I tested my plugin using Chrome 12 on 64-bit Windows, Mac, and Linux. Mac and Linux both work ; Windows does not.
    • Build System : SDK 0.3 is still lacking in its ability to compile .cpp files (instead of .cc files) ; necessary because libgme is C++ using .cpp files. This requires some build system modification.
    • Getting the interfaces : This is where I got tripped up the first time around. get_browser_interface() from their example actually refers to a parameter passed in through the PPP_InitializeModule() function. The SDK’s template generator renames this to get_browser().
    • Debugging : I feel unstoppable once I have a printf() mechanism available to me during development. To that end, console.log() from JavaScript outputs to Chrome’s built-in JavaScript console log while putting printf() statements in the actual NaCl plugin causes the messages to show up in /.xsession-errors on Linux/X.
    • Size Matters : The binaries generated with the NaCl 0.3 SDK are ridiculously huge. The basic "Hello World" example in C compiles to binaries that are 6.7 MB and 7.8 MB for the 32- and 64-bit builds, respectively. This made me apprehensive to build a full version of SaltyGME that contains all the bells and whistles offered by the library. However, all of the GME code compiled into the binary adds very little size. Curiously, the C++ version of "Hello World" only ranges from 1.8-2.0 MB for 32- and 64-bit. Is there some kind of C tax happening here ? Note that running ’strip’ on the resulting .nexe files (they’re ELF files, after all) brings the sizes down into the C++ range, but at the cost of causing them to not work (more specifically, not even load).
    • No Messaging : The NaCl SDK is supposed to have a messaging interface which allows the NaCl plugin to send asynchronous messages up to the hosting page. When I try to instantiate it, I get a NULL. I’m stuck with the alternative of polling from the JavaScript side to, e.g., determine when a song has finished loading via the network.

    That’s all I can think of for now. I may work on this a little more (I’d like to at least see some audio visualization). Maybe Google will enable NaCl per default sometime around Chrome 21 and this program will be ready for prime time by then.

    See Also :

  • ffmpeg do stream copy together with draw text

    8 mars 2016, par Haris

    I need to record an RTSP stream, before storing it I need draw some text on the video.

    And the below command works fine for recording stream only(no text write).

    openRTSP -D 10 -v -t -c -b 800000 rtsp://video_link.mov | ./ffmpeg -r 15 -i - -codec copy -hls_list_size 65535 -hls_time 2 "./video/live.m3u8"

    But I also need to draw some text on the video before recording. So I re-write the above command like

    openRTSP -D 10 -v -t -c -b 800000 rtsp://video_link.mov | ./ffmpeg -r 15 -i - -vf drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf: text='Stack Overflow': fontcolor=white: fontsize=24: box=1: boxcolor=black: x=(w-text_w)/2: y=(h-text_h-line_h)/2" -codec copy -hls_list_size 65535 -hls_time 2 "./video/live.m3u8"

    But giving the error like,

    input #0, h264, from 'pipe:':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: h264 (High), yuv420p, 704x480, 25 fps, 25 tbr, 1200k tbn, 50 tbc
    Filtergraph 'drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf: text='Stack Overflow': fontcolor=white: fontsize=24: box=1: boxcolor=black: x=(w-text_w)/2: y=(h-text_h-line_h)/2' was defined for video output stream 0:0 but codec copy was selected.
    Filtering and streamcopy cannot be used together.

    I understand that both recording and drawing cannot perform together.
    Any method exist similar, to solve the above problem ?.