Recherche avancée

Médias (91)

Autres articles (10)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

Sur d’autres sites (3149)

  • How does FFmpeg determine the “attached pic” and “timed thumbnails” dispositions of an MP4 track ?

    6 mars, par obskyr

    The Issue

    


    FFmpeg has a concept of “dispositions” – a property that describes the purpose of a stream in a media file. For example, here are the streams in a file I have lying around, with the dispositions emphasized :

    


      Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo,&#xA;fltp, 251 kb/s <strong><em>(default)</em></strong>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Audio&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:1[0x2](und): Video: mjpeg (Baseline) (jpeg / 0x6765706A),&#xA;yuvj420p(pc, bt470bg/unknown/unknown), 1024x1024, 0 kb/s, 0.0006 fps, 3.08 tbr,&#xA;600 tbn <strong><em>(default) (attached pic) (timed thumbnails)</em></strong>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Video&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:2[0x3](und): Data: bin_data (text / 0x74786574)&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Text&#xA;&#xA;  Stream #0:3[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/&#xA;unknown), 1024x1024 [SAR 144:144 DAR 1:1], 90k tbr, 90k tbn <strong><em>(attached pic)</em></strong>

    &#xA;

    However, if I make any modification to this file’s chapter markers using the C++ library MP4v2 (even just re-saving the existing ones : auto f = MP4Modify("test.m4a"); MP4Chapter_t* chapterList; uint32_t chapterCount; MP4GetChapters(f, &amp;chapterList, &amp;chapterCount); MP4SetChapters(f, chapterList, chapterCount); MP4Close(f);), some of these dispositions are removed :

    &#xA;

      Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo,&#xA;fltp, 251 kb/s <strong><em>(default)</em></strong>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Audio&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:1[0x2](und): Video: mjpeg (Baseline) (jpeg / 0x6765706A),&#xA;yuvj420p(pc, bt470bg/unknown/unknown), 1024x1024, 0 kb/s, 0.0006 fps, 3.08 tbr,&#xA;600 tbn <strong><em>(default)</em></strong> <kbd>← “attached pic” and “timed thumbnails” removed!</kbd>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Video&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:2[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/&#xA;unknown), 1024x1024 [SAR 144:144 DAR 1:1], 90k tbr, 90k tbn <strong><em>(attached pic)</em></strong>&#xA;&#xA;  Stream #0:3[0x4](und): Data: bin_data (text / 0x74786574)&#xA;  <kbd>This stream was moved to the end, but that’s intended behavior. It contains chapter titles, and we just edited the chapters.</kbd>&#xA;      Metadata:&#xA;        creation_time   : 2025-03-05T09:56:31.000000Z

    &#xA;

    It also renders the file unplayable in MPC-HC (but not in VLC !), which is apparently a bug in MP4v2. I’m currently investigating that bug to report and potentially fix it, but that’s a separate issue – in my journey there, I’m wracking my brain trying to understand what it is that MP4v2 changes to make FFmpeg stop reporting the “attached pic” and “timed thumbnails” dispositions. I’ve explored the before-and-afters in MP4 Box, and I can’t for the life of me find which atom it is that differs in a relevant way.

    &#xA;

    (I’d love to share the files, but unfortunately the contents are under copyright – if anyone knows of a way to remove the audio from an MP4 file without changing anything else, let me know and I’ll upload dummied-out versions. Without them, I can’t really ask about the issue directly. I can at least show you the files’ respective atom trees, but I’m not sure how relevant that is.)

    &#xA;

    The Question

    &#xA;

    I thought I’d read FFmpeg’s source code to find out how it determines dispositions for MP4 streams, but of course, FFmpeg is very complex. Could someone who’s more familiar with C and/or FFmpeg’s codebase help me sleuth out how FFmpeg determines dispositions for MP4 files (in particular, “attached pic” and “timed thumbnails”) ?

    &#xA;

    Some Thoughts…

    &#xA;

      &#xA;
    • I figure searching for “attached_pic” might be a good start ?
    • &#xA;

    • Could the MP4 muxer movenc.c be helpful ?
    • &#xA;

    • I’d imagine what we’d really like to look at is the MP4 demuxing process, as it’s during demuxing that FFmpeg determines dispositions from the data in the file. After poring over the code for hours, however, I’ve been utterly unable to find where that happens.
    • &#xA;

    &#xA;

  • Problem playing a sound with pydub Error : pydub.exceptions.CouldntDecodeError : Decoding failed. ffmpeg returned error code : 1

    28 mai 2020, par studioDKR

    I have a problem getting a file played in the browser with pydub. I think the function is working, but I just don't get the right file path to it, or something else is missing. Would love to get your help !

    &#xA;&#xA;

    I get the pydob error message : pydub.exceptions.CouldntDecodeError : Decoding failed. ffmpeg returned error code : 1

    &#xA;&#xA;

    Here is the error I get :

    &#xA;&#xA;

    [2020-05-28 16:04:33,023] ERROR in app: Exception on /overview [POST]&#xA;Traceback (most recent call last):&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app&#xA;    response = self.full_dispatch_request()&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request&#xA;    rv = self.handle_user_exception(e)&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception&#xA;    reraise(exc_type, exc_value, tb)&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise&#xA;    raise value&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request&#xA;    rv = self.dispatch_request()&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request&#xA;    return self.view_functions[rule.endpoint](**req.view_args)&#xA;  File "/Users/Micha/Documents/GitHub/podprod/app.py", line 109, in overview&#xA;    sound = AudioSegment.from_file(filepath)&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pydub/audio_segment.py", line 723, in from_file&#xA;    raise CouldntDecodeError(&#xA;pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1&#xA;&#xA;Output from ffmpeg/avlib:&#xA;&#xA;b&#x27;ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers\n  built with Apple clang version 11.0.3 (clang-1103.0.32.59)\n  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack\n  libavutil      56. 31.100 / 56. 31.100\n  libavcodec     58. 54.100 / 58. 54.100\n  libavformat    58. 29.100 / 58. 29.100\n  libavdevice    58.  8.100 / 58.  8.100\n  libavfilter     7. 57.100 /  7. 57.100\n  libavresample   4.  0.  0 /  4.  0.  0\n  libswscale      5.  5.100 /  5.  5.100\n  libswresample   3.  5.100 /  3.  5.100\n  libpostproc    55.  5.100 / 55.  5.100\n/Users/Micha/documents/github/podprod/uploads/test2.wav: Invalid data found when processing input\n&#x27;&#xA;

    &#xA;&#xA;

    This is the Flask route with the function I am writing.

    &#xA;&#xA;

    @app.route("/overview", methods=["GET", "POST"])&#xA;def overview():&#xA;&#xA;    entries = []&#xA;&#xA;    # Open a file&#xA;    path = app.config["FILE_UPLOADS"]&#xA;&#xA;    with os.scandir(path) as dirs:&#xA;        for entry in dirs:&#xA;            entries.append(entry.name)&#xA;&#xA;    if request.method == "POST":&#xA;        filename = request.form[&#x27;filename&#x27;]&#xA;&#xA;        filepath = os.path.join(app.config["FILE_UPLOADS"], filename)&#xA;&#xA;        # Play the sound&#xA;        sound = AudioSegment.from_file(filepath)&#xA;        play(sound)&#xA;&#xA;        return render_template(&#x27;overview.html&#x27;, entries=entries)&#xA;

    &#xA;&#xA;

    Here is the HTML template :

    &#xA;&#xA;

        {% extends &#x27;main_template.html&#x27; %}&#xA;&#xA;    {% block title %}PodProd Podcast Overview{% endblock %}&#xA;&#xA;    {% block main %}&#xA;&#xA;    <div class="container">&#xA;&#xA;        <h1>Here is an overview of your files</h1>&#xA;&#xA;        <table class="table table-striped">&#xA;            <tr>&#xA;                <th>Filename</th>&#xA;                <th>Action</th>&#xA;            </tr>&#xA;        {% for result in entries %}&#xA;            {% if ".wav" in result %}&#xA;                <tr>&#xA;                    <td>{{ result }}</td>&#xA;                    <td><form action="" method="POST"> <button type="submit" class="btn btn-primary" value="{{" result="result">Play</button></form>&#xA;                </td></tr>&#xA;            {% endif %}&#xA;        {% endfor %}&#xA;        </table>&#xA;&#xA;    </div>&#xA;&#xA;    {% endblock %}&#xA;

    &#xA;

  • How to sell Piwik services without any confusion ?

    10 octobre 2017, par InnoCraft — Plugins

    As you may know, Piwik is a Free software under the GPL license which guarantees you :

    • The freedom to run the program for any purpose.
    • The freedom to study how it works and change it.
    • The freedom to improve the program, and release your changes.
    • The freedom to redistribute it under the GPL license, and to sell it if you wish.

    In this article we will focus on the Free aspect of Piwik, which is how to rebrand Piwik, how to offer your clients a better experience, and possibly how to make a profit from it ?

    How to sell Piwik services as an agency ?

    As a web analytics software, Piwik is often installed by web agencies when it comes to designing a brand new website for a given customer.
    Most of the time agencies are using Piwik for the following reasons :

    • free of charge
    • data ownership
    • user privacy compliance
    • feature rich while easy to use
    • open source

    Most of the agencies are charging their customers for the installation process, tracking code implementation, analysing reports to get insights about users… but do you know that you could also sell the software as your own brand ? This is where the “White Label” plugin, developed by the InnoCraft company, comes into play.

    White labelling for Piwik

    Creating a “white label” plugin came into the mind of InnoCraft founders when they realized that on any modern Piwik installation, the following components were visible :

    • Piwik branded widgets within the dashboards
    • Piwik marketplace plugin teasers on the admin page
    • Piwik help and support pages
    • the “Piwik” word in general
    • Piwik Mobile app banners
    Piwik branded widget examples

    Example of Piwik branded widgets

    In order to remove all those mentions of Piwik and to start selling this web analytics under your own name, you can either hack Piwik on your own (it is going to take you some precious time and money) or have a look at the White Label plugin on the marketplace where InnoCraft has solved all the challenges already for you.

    The White Label plugin is straightforward. Once downloaded and installed, you will have access to a dedicated interface where you will be able to change the Piwik name by a new custom brand of your choice :

    Piwik white label plugin settings

    Piwik White Label settings

    Once you click Save, all “Piwik” mentions will be substituted by your company name/service :

    Piwik name changed

    Here the Piwik version is changed by the name of the company

    How to make your installation even more customized ?

    Few Piwik users know about this trick, but since 2014 the Piwik templates can be customized through Themes. You are free to design your own template, installing existing ones, or even monetize them through the marketplace :

    Custom theme sample

    A simple example of how Piwik can be easily customized, here fonts and colours are changed

    If you want to know how you can tweak your existing template and make it match your brand and image, just follow our theme documentation. A simple theme with your colors can be built in a few minutes simply by defining different color codes. You can also browse the public themes on the Marketplace.

    Tell us your story

    If you are an agency or any business related in selling Piwik services, we recommend having a look at our FAQ for rebranding, selling, reusing, re-licensing, and including Piwik in my offering. Are you interested or already re-selling Piwik services ? We would love to hear your story and write a blog post about it.

    Do not hesitate to contact the Piwik core team, we’re looking forward to hearing from you.