Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (71)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

Sur d’autres sites (9675)

  • swscale/x86/output : add AVX2 version of yuv2nv12cX

    26 avril 2020, par Nelson Gomez
    swscale/x86/output : add AVX2 version of yuv2nv12cX
    

    256 bits is just wide enough to fit all the operands needed to vectorize
    the software implementation, but AVX2 is needed to for a couple of
    instructions like cross-lane permutation.

    Output is bit-for-bit identical to C.

    Signed-off-by : Nelson Gomez <nelson.gomez@microsoft.com>

    • [DH] libswscale/x86/output.asm
    • [DH] libswscale/x86/swscale.c
  • Are there people interested in converting ffmpeg source to Go ?

    30 septembre 2018, par No One

    After seeing that Go compiler have been converted from C to Go I thought same for ffmpeg ? Don’t want to go deep into reasons as I think they are obvious. It was very hard to be so close to the have rich library as ffmpeg in other language. It was even hard to make bindings for that scale of library. I’m not enough advanced to start something like this myself, so is there anybody else interested in this ? If yes then where this question worth to be addressed, so people interested in this may have discussion ?

    (Seems not enough obvious so adding some details.)

    For applications which use large amount of commands with different complexity it is hard to read the code as it’s not actually a code. Instead, it’s commands which you will need to understand by reading docs from ffmpeg’s docs page. I had used ffmpeg before in Nodejs and there was lots of logic of manipulating command string. Also sometimes in windows it was ending with cmd limitations error. When you are working with some language it is nice to see whole logic in that language. So you know go ? than you know everything that is happening with this code without even going off from code and reading docs of another application.

    There may be some benefits from executing stuff in goroutines so you can handle concurrency in the way you want not in the way it is implemented in ffmpeg.

    Build faster with Go.

    Less code.

    Possibility to split code into smaller packages.

    Also if you are familiar why community converted compiler from C to Go than I think some reasons will fit too.

  • FFMPEG on AWS Lambda works selectively

    20 novembre 2020, par Arindam Baral

    I am using FFMpeg on AWS Lambda to convert mp4 files to m3u8 format.

    &#xA;

    Here's my code :

    &#xA;

    ENCODE_SIZE = {&#xA;    &#x27;360p&#x27;: (&#x27;360:640&#x27;, &#x27;1000000&#x27;),&#xA;    &#x27;540p&#x27;: (&#x27;540:960&#x27;, &#x27;2000000&#x27;),&#xA;    &#x27;720p&#x27;: (&#x27;720:1280&#x27;, &#x27;5000000&#x27;)&#xA;}&#xA;@app.route(&#x27;/encode&#x27;, methods=[&#x27;GET&#x27;])&#xA;@token_required&#xA;def encodeVideo(current_user):&#xA;    try:&#xA;        userEmail = current_user.emailID&#xA;        &#xA;        courseID = request.args.get(&#x27;courseID&#x27;)&#xA;        fileKey = request.args.get(&#x27;fileKey&#x27;)&#xA;        print (&#x27;Input file key received &#x27;, fileKey)&#xA;        convType = &#x27;all&#x27;&#xA;        if &#x27;convType&#x27; in request.args:&#xA;            convType = request.args.get(&#x27;convType&#x27;)&#xA;        print (&#x27;Conv Type::::&#x27;, convType)&#xA;        instiID = Course.query.filter_by(id=courseID).first().instiID&#xA;        adminEmail = Institute.query.filter_by(id=instiID).first().adminEmail&#xA;        if adminEmail != userEmail:&#xA;            return jsonify({&#x27;message&#x27;: &#x27;Not authorized&#x27;}), 403&#xA;        &#xA;        bucket = app.config[&#x27;S3_CONTENT_FOLDER&#x27;]&#xA;        folder = &#x27;/&#x27;.join(fileKey.split(&#x27;/&#x27;)[:-1])&#xA;        &#xA;        os.system(&#x27;cp /var/task/ffmpeg /tmp/; chmod 755 /tmp/ffmpeg;&#x27;)&#xA;        FFMPEG_STATIC = &#x27;/tmp/ffmpeg&#x27; #"/opt/bin/ffmpeg" # &#xA;        # FFMPEG_STATIC = &#x27;ffmpeg&#x27; #"/opt/bin/ffmpeg" # &#xA;        &#xA;        preSignURL = getPreSignedS3URL(fileKey, bucket)&#xA;        print (preSignURL)&#xA;        &#xA;        outputFlag = []&#xA;        &#xA;        # outFileName = &#x27;final_out.m3u8&#x27;&#xA;        outFileName = &#x27;/tmp/final_out.m3u8&#x27;&#xA;        with open(outFileName, &#x27;a&#x27;) as outFile:&#xA;            outFile.write(&#x27;#EXTM3U\n&#x27;)&#xA;            &#xA;            if convType == &#x27;all&#x27;:&#xA;                for ver in ENCODE_SIZE:&#xA;                    print (&#x27;Starting for ver &#x27;, ver)&#xA;                    outFileNameM3 = &#x27;/tmp/%s_out.m3u8&#x27; %(ver) &#xA;                    # outFileNameM3 = &#x27;%s_out.m3u8&#x27; %(ver) &#xA;                    &#xA;                    subprocess.call([FFMPEG_STATIC, &#x27;-i&#x27;, preSignURL, &#x27;-c:a&#x27;, &#x27;aac&#x27;, &#x27;-c:v&#x27;, &#x27;libx264&#x27;, &#x27;-s&#x27;, ENCODE_SIZE[ver][0], &#x27;-f&#x27;, &#x27;hls&#x27;, &#x27;-hls_list_size&#x27;, &#x27;0&#x27;, &#x27;-hls_time&#x27;, &#x27;10&#x27;, outFileNameM3])&#xA;                    &#xA;                    outFile.write(&#x27;#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=%s %s\n&#x27; %(&#xA;                        ENCODE_SIZE[ver][1], outFileName&#xA;                    ))&#xA;                    # ret = os.system(commandStr)&#xA;                    # outputFlag.append(ret)&#xA;                    print (&#x27;Encoding completed for ver &#x27;, ver)&#xA;            else:&#xA;                ver = convType&#xA;                outFileNameM3 = &#x27;/tmp/%s_out.m3u8&#x27; %(ver) &#xA;                # outFileNameM3 = &#x27;%s_out.m3u8&#x27; %(ver) &#xA;&#xA;                subprocess.call([FFMPEG_STATIC, &#x27;-i&#x27;, preSignURL, &#x27;-c:a&#x27;, &#x27;aac&#x27;, &#x27;-c:v&#x27;, &#x27;libx264&#x27;, &#x27;-s&#x27;, ENCODE_SIZE[ver][0], &#x27;-f&#x27;, &#x27;hls&#x27;, &#x27;-hls_list_size&#x27;, &#x27;0&#x27;, &#x27;-hls_time&#x27;, &#x27;10&#x27;, outFileNameM3])  &#xA;                    &#xA;                outFile.write(&#x27;#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=%s %s\n&#x27; %(&#xA;                        ENCODE_SIZE[ver][1], outFileName&#xA;                ))&#xA;                # ret = os.system(commandStr)&#xA;                # outputFlag.append(ret)&#xA;        outFile.close()&#xA;        print (&#x27;File Key Generated&#x27;)&#xA;        #Upload files to s3&#xA;        streamFiles = glob.glob(&#x27;/tmp/*.ts&#x27;)&#xA;        print (streamFiles)&#xA;        for fl in streamFiles:&#xA;            finFileName = fl.split(&#x27;/&#x27;)[-1]&#xA;            fileKeyName = folder &#x2B; &#x27;/&#x27; &#x2B; finFileName&#xA;            uploadFileToS3(fl, fileKeyName, app.config[&#x27;S3_CONTENT_FOLDER&#x27;])&#xA;        # m3u8Files = glob.glob(&#x27;/tmp/*.m3u8&#x27;)&#xA;        # print (m3u8Files)&#xA;        # for fl in m3u8Files:&#xA;        #     finFileName = fl.split(&#x27;/&#x27;)[-1]&#xA;        #     fileKeyName = folder &#x2B; &#x27;/&#x27; &#x2B; finFileName&#xA;        #     uploadFileToS3(fl, fileKeyName, app.config[&#x27;S3_CONTENT_FOLDER&#x27;])&#xA;        # print (&#x27;S3 upload completed&#x27;)&#xA;        &#xA;        # files = glob.glob(&#x27;/tmp/*&#x27;)&#xA;        # for f in files:&#xA;        #     os.remove(f)&#xA;        return jsonify({&#x27;message&#x27;: &#x27;Completed file encoding&#x27;}), 201&#xA;    except:&#xA;        print (traceback.format_exc())&#xA;        return jsonify({&#x27;message&#x27;: &#x27;Error in encoding file&#x27;}), 504&#xA;if __name__ == &#x27;__main__&#x27;:&#xA;    app.run(debug=True,host="0.0.0.0", port=5000)&#xA;&#xA;

    &#xA;

    When I request for "540p", the m3u8 file gets converted perfectly.&#xA;However, when I request for "360p" and "720p", I see only the first 1 second of the video.

    &#xA;

    Please note - All the tls files are generated in all the cases. The problem is only in creation of the m3u8 playlist file.

    &#xA;

    Can someone please help in this regard ?

    &#xA;

    EDIT 1 : I am quite new to FFMPEG. So any help here will be very welcome

    &#xA;

    The log files are present here :&#xA;https://drive.google.com/file/d/1QFgi-4jDIN3f6mWLoR999mlXzZ-Ij83R/view?usp=sharing

    &#xA;