Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (44)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (5796)

  • %a and %%a suddenly don't work in Win 10 cmd and batch file respectively ?

    14 janvier 2017, par cobaltB12

    I was trying to batch convert a folder of .flac to .mp3 using FFMPEG, but when i ran my batch file I got the "%F is unexpected at this time" error, even though i used "%%F" in the batch file. To test what was really the problem, i proceeded to type variations of %F into cmd directly, but could not get it to work either. Did something change in windows 10 regarding the use of variable names in the for loop ?

    cmd commands I tried :

    C:\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy>for "%F" in     (*.flac) echo %F
    "%F" was unexpected at this time.

    C:\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy>for %F in     (*.flac) echo %F
    echo was unexpected at this time.

    C:\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy>for "%%F" in     (*.flac) echo %%F
    "%%F" was unexpected at this time.

    C:\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy>for "%f" in     (*.flac) echo %f
    "%f" was unexpected at this time.

    C:\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy>for "%g" in     (*.flac) echo %g
    "%g" was unexpected at this time.

    C:\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy>for "%g" in     ("*.*") echo %g
    "%g" was unexpected at this time.

    C:\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy>for "%g" in     ("*.*") do echo %g
    "%g" was unexpected at this time.

    original batch file for FFMPEG

    cd "\Users\yt\Music\Joe Hisaishi (Classical Guitar) - Copy"
    echo in directory "%cd%"
    pause
    for "%%F" in ("*.flac") do (
    echo converting "%%F"
    "C:\Users\yt\Downloads\OtherApps\FFMPEG\bin\ffmpeg.exe" -i "%%F"     -codec:a libmp3lame -qscale:a 2 "%%~nF.mp3"
    echo del "%%F"
    )
    cd "%~dp0"
  • Writing A Dreamcast Media Player

    6 janvier 2017, par Multimedia Mike — Sega Dreamcast

    I know I’m not the only person to have the idea to port a media player to the Sega Dreamcast video game console. But I did make significant progress on an implementation. I’m a little surprised to realize that I haven’t written anything about it on this blog yet, given my propensity for publishing my programming misadventures.


    3 Dreamcast consoles in a row

    This old effort had been on my mind lately due to its architectural similarities to something else I was recently brainstorming.

    Early Days
    Porting a multimedia player was one of the earliest endeavors that I embarked upon in the multimedia domain. It’s a bit fuzzy for me now, but I’m pretty sure that my first exposure to the MPlayer project in 2001 arose from looking for a multimedia player to port. I fed it through the Dreamcast development toolchain but encountered roadblocks pretty quickly. However, this got me looking at the MPlayer source code and made me wonder how I could contribute, which is how I finally broke into practical open source multimedia hacking after studying the concepts and technology for more than a year at that point.

    Eventually, I jumped over to the xine project. After hacking on that for awhile, I remembered my DC media player efforts and endeavored to compile xine to the console. The first attempt was to simply compile the codebase using the Dreamcast hobbyist community’s toolchain. This is when I came to fear the multithreaded snake pit in xine’s core. Again, my memories are hazy on the specifics, but I remember the engine having a bunch of threading hacks with comments along the lines of “this code deadlocks sometimes, so on shutdown, monitor this lock and deliberately break it if it has been more than 3 seconds”.

    Something Workable
    Eventually, I settled on a combination of FFmpeg’s libavcodec library for audio and video decoders, xine’s demuxer library, and xine’s input API, combined with my own engine code to tie it all together along with video and output drivers provided by the KallistiOS hobbyist OS for Dreamcast. Here is a simple diagram of the data movement through this player :


    Architecture diagram for a Sega Dreamcast media player

    Details and Challenges
    This is a rare occasion when I actually got to write the core of a media player engine. I made some mistakes.

    xine’s internal clock ran at 90000 Hz. At least, its internal timestamps were all in reference to a 90 kHz clock. I got this brilliant idea to trigger timer interrupts at 6000 Hz to drive the engine. Whatever the timer facilities on the Dreamcast, I found that 6 kHz was the greatest common divisor with 90 kHz. This means that if I could have found an even higher GCD frequency, I would have used that instead.

    So the idea was that, for a 30 fps video, the engine would know to render a frame on every 200th timer interrupt. I eventually realized that servicing 6000 timer interrupts every second would incur a ridiculous amount of overhead. After that, my engine’s philosophy was to set a timer to fire for the next frame while beginning to process the current frame. I.e., when rendering a frame, set a timer to call back in 1/30th of a second. That worked a lot better.

    As I was still keen on 8-bit paletted image codecs at the time (especially since they were simple and small for bootstrapping this project), I got to use output palette images directly thanks to the Dreamcast’s paletted textures. So that was exciting. The engine didn’t need to convert the paletted images to a different colorspace before rendering. However, I seem to recall that the Dreamcast’s PowerVR graphics hardware required that 8-bit textures be twiddled/swizzled. Thus, it was still required to manipulate the 8-bit image before rendering.

    I made good progress on this player concept. However, a huge blocker for me was that I didn’t know how to make a proper user interface for the media player. Obviously, programming the Dreamcast occurred at a very low level (at least with the approach I was using), so there were no UI widgets easily available.

    This was circa 2003. I assumed there must have been some embedded UI widget libraries with amenable open source licenses that I could leverage. I remember searching and checking out a library named libSTK. I think STK stood for “set-top toolkit” and was positioned specifically for doing things like media player UIs on low-spec embedded computing devices. The domain hosting the project is no longer useful but this appears to be a backup of the core code.

    It sounded promising, but the libSTK developers had a different definition of “low-spec embedded” device than I did. I seem to recall that they were targeting something along with likes of a Pentium III clocked at 800 MHz with 128 MB RAM. The Dreamcast, by contrast, has a 200 MHz SH-4 CPU and 16 MB RAM. LibSTK was also authored in C++ and leveraged the Boost library (my first exposure to that code), and this all had the effect of making binaries quite large while I was trying to keep the player in lean C.

    Regrettably, I never made any serious progress on a proper user interface. I think that’s when the player effort ran out of steam.

    The Code
    So, that’s another project that I never got around to finishing or publishing. I was able to find the source code so I decided to toss it up on github, along with 2 old architecture outlines that I was able to dig up. It looks like I was starting small, just porting over a few of the demuxers and decoders that I knew well.

    I’m wondering if it would still be as straightforward to separate out such components now, more than 13 years later ?

    The post Writing A Dreamcast Media Player first appeared on Breaking Eggs And Making Omelettes.

  • How improves Video Player processing using Qt and FFmpeg ?

    13 septembre 2016, par Eric Menezes

    A time ago, I started to develop a video player/analyser. For beeing an analyser as well, the application should have inside its buffer the next frames and the previous as well. That’s where the complication begins.

    For that, we started to use an VideoProducer that decodes the frames and audio from video (using ffmpeg), added it into a buffer from where the video and audio consumers retrieve that objects (VideoFrame and AudioChunk). For this job, we have some QThreads which is one producer, 2 consumers and (the biggest trouble maker) 2 workers that is used to retrieve objects from producer’s buffer and insert them into a circular buffer (that because of previous frames). These workers are important because of the backwards buffering job (this player should play backwards too).

    So, now the player is running well, but not so good. It’s notable that is losing performance. Like removing producer buffer and using just the circular. But still, some questions remains :

    • Should I continue using QThread with reimplemented run() ? I read that works better with Signals & Slots ;

    • If Signals & Slots worth it, the producer still needs to reimplement QThread::run(), right ?

    • Cosidering that buffer must have some previous frames and bad quality videos will be reproduced, is that (VideoProducer insert objects into a Buffer, AudioConsumer and FrameConsumer retrieve these objects from Buffer and display/reproducer them) the better way ?

    • What is the best way to sync audio and video ? The sync using audio pts is doing well, but some troubles appear sometimes ; and

    • For buffering backwards, ffmpeg does not provide frames this way, so I need to seek back, decode older frames, reorder them and prepend to the buffer. This job has been done by that Workers, another QThread the keep consuming from Producer buffer and, if buffering backwards, asks for seek and do the reorder job. I can just guess that it is bad. And I assume that do this reorder job should be done at Producer level. Is that any way to do this better ?

    I know it’s a lot of questions, and I’m sorry for that, but I don’t know where to find these answers.

    Thanks for helping.

    For better understanding, heres how its been done :

    • VideoProducer -> Decoder QThread. Runs in a loop decoding and enqueuing frames into a Buffer.

    • FrameConsumer -> Video consumer. Retrieves frames from frame CircularBuffer in a loop using another QThread. Display the frame and sleep few mseconds based on video fps and AudioConsumer clock time.

    • AudioConsumer -> Audio consumer and video’s clock. Works with signals using QAudioOutput::notify() to retrieve chunks of audio from audio CircularBuffer and insert them into QAudioOutput buffer. When decodes the first frame, its pts is used to start the clock. (if a seek has been called, the next audio frame will mark the clock start time)

    • Worker -> Each stream (audio and video) has one. It’s a QThread running in a loop (run() reimplemented) retrieving objects from Buffer and inserting (backwards or forward) to CircularBuffer.

    And another ones that manage UI, filters, some operations with frames/chunks...