Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (61)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (7689)

  • error : ‘CODEC_TYPE_AUDIO’ undeclared when make m3u8-segmenter

    28 février 2012, par why

    I want to make m3u8-segmenter for Http Live Stream : https://github.com/johnf/m3u8-segmenter

    There are errors when I make, the errors are :

    gcc -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -Werror m3u8-segmenter.c -o m3u8-segmenter -lavformat -lavcodec -lavutil
    m3u8-segmenter.c: In function ‘add_output_stream’:
    m3u8-segmenter.c:82:14: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
    m3u8-segmenter.c:82:14: note: each undeclared identifier is reported only once for each function it appears in
    m3u8-segmenter.c:94:14: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    m3u8-segmenter.c: In function ‘main’:
    m3u8-segmenter.c:338:5: error: ‘av_open_input_file’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1090) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:352:5: error: implicit declaration of function ‘guess_format’ [-Werror=implicit-function-declaration]
    m3u8-segmenter.c:352:5: error: nested extern declaration of ‘guess_format’ [-Werror=nested-externs]
    m3u8-segmenter.c:352:10: error: assignment makes pointer from integer without a cast [-Werror]
    m3u8-segmenter.c:371:18: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    m3u8-segmenter.c:376:18: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
    m3u8-segmenter.c:387:5: error: ‘av_set_parameters’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1434) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:392:5: error: ‘dump_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1559) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:406:5: error: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:279) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:411:5: error: ‘av_write_header’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1492) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:444:67: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
    m3u8-segmenter.c:455:13: error: ‘put_flush_packet’ is deprecated (declared at /usr/local/include/libavformat/avio.h:293) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:456:13: error: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:280) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:476:13: error: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:279) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:482:13: error: ‘av_write_header’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1492) [-Werror=deprecated-declarations]
    m3u8-segmenter.c:514:5: error: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:280) [-Werror=deprecated-declarations]
    cc1: all warnings being treated as errors

    make: *** [all] Error 1
  • Why subprocess.run() have unexpected behavior in try else block ?

    25 novembre 2023, par Nikita Savenkov

    Trying to make "to mp4" converter function using ffmpeg that is going to convert a file to mp4, delete original file and return True or False for specific conditions.
But I get some unexpected behavior of a subprocess.

    


    Initially I used this construction :

    


    def to_mp4_converter(file):

    input_file = file
    output_file = f"{re.sub(r'\..+$', "", file)}.mp4"

    try:
        subprocess.run(['ffmpeg', '-i', input_file, output_file])
    except subprocess.SubprocessError as e:
        print(f"Subprocess Error: {e}")
        return False
    else:
        try:
            os.remove(path=file)
        except OSError as e:
            print(f"Can't remove {file} file: {e}")
        finally:
            return True


    


    Original file is removed, but output file is half of the expected size and quality of video is low.

    


    But if I place subprocess.run() and os.remove() into separate try else blocks like that :

    


    def to_mp4_converter(file):

    input_file = file
    output_file = f"{re.sub(r'\..+$', "", file)}.mp4"

    try:
        subprocess.run(['ffmpeg', '-i', input_file, output_file])
    except subprocess.SubprocessError as e:
        print(f"Subprocess Error: {e}")
        return False
    else:
        pass

    try:
        os.remove(path=file)
    except OSError as e:
        print(f"Can't remove {file} file: {e}")
    finally:
        return True


    


    Everything works fine.

    


    Isn't subprocess.run() should be a blocking operation, so the else statement in 1st example is unreachable until conversion is done ?

    


  • avfilter/af_channelmap : Fix double-free of AVFilterChannelLayouts on error

    7 août 2020, par Andreas Rheinhardt
    avfilter/af_channelmap : Fix double-free of AVFilterChannelLayouts on error
    

    The query_formats function of the channelmap filter tries to allocate
    a list of channel layouts which on success are attached to more permanent
    objects (an AVFilterLink) for storage afterwards. If attaching succeeds,
    the link becomes one of the common owners (in this case, the only owner)
    of the list. Yet if the list has been successfully attached to the link
    and an error happens lateron, the list was manually freed, which is wrong,
    because it is owned by its link so that the link's pointer to the list will
    become dangling and there will be a double-free/use-after-free when the link
    is later cleaned up automatically.

    This commit fixes this by removing the custom freeing code ; this will
    temporarily add a leaking codepath (if attaching the list fails, the list
    will leak), but this will be fixed soon by making sure that an
    AVFilterChannelLayouts without owner will be automatically freed when
    attaching it to an AVFilterLink fails.

    Reviewed-by : Nicolas George <george@nsup.org>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavfilter/af_channelmap.c