Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (85)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (9757)

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

  • FFMPEG Transcode H265 video from 10-bit to 8-bit

    6 juin 2020, par Zach

    I'm trying to convert my library from various formats into HEVC 8-bit mainly to shrink my library down. This is generally working but I've run into an issue when trying to convert an existing file from 10-bit H.265 to 8-bit H.265.

    &#xA;&#xA;

    My processor, an Intel Celeron J3455, supports hardware decoding/encoding H.265 at 8-bit but only hardware decoding for 10-bit.

    &#xA;&#xA;

    It seems that ffmpeg is attempting to keep the video as 10-bit to match the source rather than allowing me to convert to 8-bit and this is creating an error.

    &#xA;&#xA;

    Here is a sample command that I'm using :

    &#xA;&#xA;

    ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.10bit.x265.mkv -map 0:0 -c:v:0 hevc_vaapi -vf "scale_vaapi=w=-1:h=1080" -b:v 4027047 -map 0:1 -c:a:0 aac -b:a 384000 -ac 6 -map 0:s -scodec copy -map_metadata:g -1 -metadata JBDONEVERSION=1 -metadata JBDONEDATE=2020-06-06T20:52:36.072Z -map_chapters 0 output.8bit.x265.mkv

    &#xA;&#xA;

    The error I get is :

    &#xA;&#xA;

    [hevc_vaapi @ 0x5568b27fb1c0] No usable encoding entrypoint found for profile VAProfileHEVCMain10 (18).&#xA;&#xA;Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height&#xA;

    &#xA;&#xA;

    From what I can tell ffmpeg looks at the source and selectes VAProfileHEVCMain10 instead of VAProfileHEVCMain. I'd like to force it to output 8-bit.

    &#xA;&#xA;

    I've tried adding -pix_fmt yuv420p but that gives me this error :

    &#xA;&#xA;

    Incompatible pixel format &#x27;yuv420p&#x27; for codec &#x27;hevc_vaapi&#x27;, auto-selecting format &#x27;vaapi_vld&#x27; &#xA;

    &#xA;&#xA;

    I've also tried making this change to the command : "scale_vaapi=w=-1:h=1080,format=yuv420p"

    &#xA;&#xA;

    However that gives me the error :

    &#xA;&#xA;

    Impossible to convert between the formats supported by the filter &#x27;Parsed_scale_vaapi_0&#x27; and the filter &#x27;auto_scaler_0&#x27;&#xA;&#xA;Error reinitializing filters!&#xA;

    &#xA;&#xA;

    Any suggestions ?

    &#xA;