Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (8)

  • 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 (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (4927)

  • 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 !

    



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

    



    Here is the error I get :

    



    [2020-05-28 16:04:33,023] ERROR in app: Exception on /overview [POST]
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/Micha/Documents/GitHub/podprod/app.py", line 109, in overview
    sound = AudioSegment.from_file(filepath)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pydub/audio_segment.py", line 723, in from_file
    raise CouldntDecodeError(
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

b'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'


    



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

    



    @app.route("/overview", methods=["GET", "POST"])
def overview():

    entries = []

    # Open a file
    path = app.config["FILE_UPLOADS"]

    with os.scandir(path) as dirs:
        for entry in dirs:
            entries.append(entry.name)

    if request.method == "POST":
        filename = request.form['filename']

        filepath = os.path.join(app.config["FILE_UPLOADS"], filename)

        # Play the sound
        sound = AudioSegment.from_file(filepath)
        play(sound)

        return render_template('overview.html', entries=entries)


    



    Here is the HTML template :

    



        {% 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 combine/concatenate videos stored in AWS S3 bucket based on title of the file name

    9 juin 2020, par orangecube

    I am using a service that allows me to record videos that get automatically pushed to a folder (submissions) in an S3 bucket. There are multiple videos however they need to be grouped together and concatenated so the output is one video per group.

    &#xA;&#xA;

    So, basically, any tips on how I can take videos based on the title and stitch them together ?

    &#xA;&#xA;

    Example :

    &#xA;&#xA;

    Submissions folder will have :

    &#xA;&#xA;

    a-100-2.mp4&#xA;a-200-6.mp4&#xA;b-123-5.mp4&#xA;

    &#xA;&#xA;

    Expected output in processed folder :

    &#xA;&#xA;

    a.mp4     - (both &#x27;a&#x27; videos get stitched together)&#xA;b.mp4     - (only &#x27;b&#x27; gets sent over since there is only one video.)&#xA;

    &#xA;&#xA;

    Thanks in advance !

    &#xA;&#xA;

    Edit : Some additional and detailed information below if it helps.

    &#xA;&#xA;

    The files will be labeled with :&#xA;name-location-video_token-stream_token.mp4

    &#xA;&#xA;

    Need help creating a script or process that will concatenate the videos using the procedure outlined below :

    &#xA;&#xA;

    Processing rules (back end) :

    &#xA;&#xA;

      &#xA;
    1. Check if videos have same video_token in ‘submissions folder’. If so, keep the newest one and delete old ones.

    2. &#xA;

    3. Take all videos in ‘submissions folder’ with same name and location in title and concatenate the videos. Save output video to a new folder in the bucket labeled as the location for the folder name. &#xA;Output file name : &#xA;name-location-year.mp4.

    4. &#xA;

    &#xA;&#xA;

    EXAMPLE :

    &#xA;&#xA;

    Submissions folder :&#xA;joey-toronto-001-354.mp4

    &#xA;&#xA;

    joey-toronto-001-241.mp4 - this will be deleted

    &#xA;&#xA;

    joey-toronto-103-452.mp4

    &#xA;&#xA;

    alex-montreal-352-232.mp4

    &#xA;&#xA;

    alex-montreal-452-223.mp4

    &#xA;&#xA;

    Resulting output :

    &#xA;&#xA;

    Toronto folder :

    &#xA;&#xA;

    Joey-toronto-2020.mp4

    &#xA;&#xA;

    Montreal folder :

    &#xA;&#xA;

    Alex-montreal-2020.mp4

    &#xA;

  • No sound when running ffmpeg on youtube live

    28 mai 2020, par Bartonsen

    Despite my limited knowledge in ffmpeg, I've managed to livestream my birdbox camera to youtube using ffmpeg running on a raspberry pi. The camera has also audio and by using local vlc in windows with rtsp, the audio is ok.

    &#xA;&#xA;

    However, on youtube there is no sound (same rtsp command as used locally in windows), and I see this "warning" in youtube studio : "The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream."

    &#xA;&#xA;

    How can I get the sound through youtube ?&#xA;This is the command I run. The command was found on the net, and I adopted it for my usage, and got video working straight away :

    &#xA;&#xA;

    pi@raspberrypi:~ $ ffmpeg -f lavfi -i anullsrc -thread_queue_size 512 -rtsp_transport udp -i "rtsp://10.x.x.x:554/user=user&amp;password=password&amp;channel=1&amp;stream=0.sdp?real_stream" -tune zerolatency -vcodec libx264 -use_wallclock_as_timestamps 1 -pix_fmt &#x2B; -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/mykey&#xA;ffmpeg version git-2020-05-01-3c740f2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 6.3.0 (Raspbian 6.3.0-18&#x2B;rpi1&#x2B;deb9u1) 20170516&#xA;  configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree&#xA;  libavutil      56. 43.100 / 56. 43.100&#xA;  libavcodec     58. 82.100 / 58. 82.100&#xA;  libavformat    58. 42.102 / 58. 42.102&#xA;  libavdevice    58.  9.103 / 58.  9.103&#xA;  libavfilter     7. 80.100 /  7. 80.100&#xA;  libswscale      5.  6.101 /  5.  6.101&#xA;  libswresample   3.  6.100 /  3.  6.100&#xA;  libpostproc    55.  6.100 / 55.  6.100&#xA;Input #0, lavfi, from &#x27;anullsrc&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 705 kb/s&#xA;    Stream #0:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s&#xA;Guessed Channel Layout for Input Stream #1.1 : mono&#xA;Input #1, rtsp, from &#x27;rtsp://10.x.x.x:554/user=user&amp;password=password&amp;channel=1&amp;stream=0.sdp?real_stream&#x27;:&#xA;  Metadata:&#xA;    title           : RTSP Session&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;    Stream #1:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 20 fps, 20 tbr, 90k tbn, 180k tbc&#xA;    Stream #1:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s&#xA;Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option &#x27;-c:v copy&#x27; will be used.&#xA;Stream mapping:&#xA;  Stream #1:0 -> #0:0 (copy)&#xA;  Stream #0:0 -> #0:1 (pcm_u8 (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;Output #0, flv, to &#x27;rtmp://a.rtmp.youtube.com/live2/mykey&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.42.102&#xA;    Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 20 fps, 20 tbr, 1k tbn, 90k tbc&#xA;    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc58.82.100 aac&#xA;[flv @ 0x2c43750] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly&#xA;

    &#xA;