Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (103)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (16001)

  • FFMPEG php HLS and DASH conversion

    21 juillet 2020, par Angus Simons

    I'm using this repo https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming to encode video in hls and then reproduce on the front end.

    


    After creating all the hls segments correctly the php script fail to execute the command below.
The command getting error is the next one :

    


    '/usr/bin/ffmpeg' '-y' '-i' 'source.mp4' '-c:v' 'libx264' '-c:a' 'aac' '-bf' '1' '-keyint_min' '25' '-g' '250' '-sc_threshold' '40' '-use_timeline' '1' '-use_template' '1' '-init_seg_name' 'dash_init_$RepresentationID$.$ext$' '-media_seg_name' 'dash_chunk_$RepresentationID$_$Number%05d$.$ext$' '-seg_duration' '10' '-hls_playlist' '0' '-f' 'dash' '-adaptation_sets' 'id=0,streams=v id=1,streams=a' '-map' '0' '-s:v:0' '256x144' '-b:v:0' '830k' '-map' '0' '-s:v:1' '426x240' '-b:v:1' '969k' '-map' '0' '-s:v:2' '640x360' '-b:v:2' '1162k' '-map' '0' '-s:v:3' '854x480' '-b:v:3' '1453k' '-map' '0' '-s:v:4' '1280x720' '-b:v:4' '1938k' '-map' '0' '-s:v:5' '1920x1080' '-b:v:5' '2907k' '-strict' '-2' '-threads' '12' 'dash.mpd'


    


    Here there is the error printed executing the command with CLI :

    


        ffmpeg version 4.3-2~16.04.york1 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
    configuration: --prefix=/usr --extra-version='2~16.04.york1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
    libavutil      56. 51.100 / 56. 51.100
    libavcodec     58. 91.100 / 58. 91.100
    libavformat    58. 45.100 / 58. 45.100
    libavdevice    58. 10.100 / 58. 10.100
    libavfilter     7. 85.100 /  7. 85.100
    libavresample   4.  0.  0 /  4.  0.  0
    libswscale      5.  7.100 /  5.  7.100
    libswresample   3.  7.100 /  3.  7.100
    libpostproc    55.  7.100 / 55.  7.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'source.mp4':
    Metadata:
        major_brand     : mp42
        minor_version   : 0
        compatible_brands: mp42mp41
        creation_time   : 2020-07-10T09:13:47.000000Z
    Duration: 01:03:27.36, start: 0.000000, bitrate: 3298 kb/s
        Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 2977 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
        Metadata:
        creation_time   : 2020-07-10T09:13:47.000000Z
        handler_name    : ?Mainconcept Video Media Handler
        encoder         : AVC Coding
        Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
        Metadata:
        creation_time   : 2020-07-10T09:13:48.000000Z
        handler_name    : #Mainconcept MP4 Sound Media Handler
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Stream #0:0 -> #0:2 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:3 (aac (native) -> aac (native))
    Stream #0:0 -> #0:4 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:5 (aac (native) -> aac (native))
    Stream #0:0 -> #0:6 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:7 (aac (native) -> aac (native))
    Stream #0:0 -> #0:8 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:9 (aac (native) -> aac (native))
    Stream #0:0 -> #0:10 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:11 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [libx264 @ 0x55de2d5e6c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x55de2d5e6c80] profile High, level 2.0
    [libx264 @ 0x55de2d5e6c80] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=830 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x55de2d09fcc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x55de2d09fcc0] profile High, level 2.1
    [libx264 @ 0x55de2d09fcc0] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=969 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x55de2d0a4240] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x55de2d0a4240] profile High, level 3.0
    [libx264 @ 0x55de2d0a4240] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1162 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x55de2d0a8380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x55de2d0a8380] profile High, level 3.0
    [libx264 @ 0x55de2d0a8380] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1453 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x55de2d085c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x55de2d085c80] profile High, level 3.1
    [libx264 @ 0x55de2d085c80] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1938 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x55de2d089d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x55de2d089d40] profile High, level 4.0
    [libx264 @ 0x55de2d089d40] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2907 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [dash @ 0x55de2cf50900] Opening 'dash_init_0.m4s' for writing
    [dash @ 0x55de2cf50900] Opening 'dash_init_1.m4s' for writing
    [dash @ 0x55de2cf50900] Opening 'dash_init_2.m4s' for writing
    [dash @ 0x55de2cf50900] Conflicting stream par values in Adaptation Set 1
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Error initializing output stream 0:10 -- 
    [libx264 @ 0x55de2d5e6c80] final ratefactor: 16.04
    [aac @ 0x55de2d09eb80] Qavg: 65536.000
    [aac @ 0x55de2d09eb80] 2 frames left in the queue on closing
    [libx264 @ 0x55de2d09fcc0] final ratefactor: 19.18
    [aac @ 0x55de2d0a2b00] Qavg: 65536.000
    [aac @ 0x55de2d0a2b00] 2 frames left in the queue on closing
    [libx264 @ 0x55de2d0a4240] final ratefactor: 21.16
    [aac @ 0x55de2d0a6c40] Qavg: 65536.000
    [aac @ 0x55de2d0a6c40] 2 frames left in the queue on closing
    [libx264 @ 0x55de2d0a8380] final ratefactor: 21.67
    [aac @ 0x55de2d084540] Qavg: 65536.000
    [aac @ 0x55de2d084540] 2 frames left in the queue on closing
    [libx264 @ 0x55de2d085c80] final ratefactor: 22.63
    [aac @ 0x55de2d088600] Qavg: 65536.000
    [aac @ 0x55de2d088600] 2 frames left in the queue on closing
    [libx264 @ 0x55de2d089d40] final ratefactor: 22.67
    [aac @ 0x55de2d08c5c0] Qavg: 65536.000
    [aac @ 0x55de2d08c5c0] 2 frames left in the queue on closing
    Conversion failed!


    


    I checked if I have MPEG DASH support enable and it is enabled in FFMPEG

    


  • What makes the bitrate of dash stream output low as compared to bitrate of input mp4 video

    7 janvier 2021, par Chinmaey Shende

    I used ffmpeg to convert bbb.mp4 to dash stream. I used the ffprobe to get the bitrates of input and output (shown below)
For the same resolution video 1920x1080 input has bit rate 2998 kb/s where as output has bitate of 20 kb/s.
My profile is set to "-b:v:0 200K -s:v:0 640x360 -b:v:1 600K -s:v:1 852x480 -b:v:2 4000K -s:v:2 1920x1080".
I am trying to understand what determines the output bit rate for the dash stream ?
Why does my output different from the input profile set in ffmpeg command

    



    Input video stream - bbb.mp4

    



    '''  Duration: 00:10:34.53, start: 0.000000, bitrate: 3481 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2998 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)'''


    



    Output :

    



    '''  Duration: 00:10:34.60, start: 630.000000, bitrate: 20 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 20 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)

    major_brand     : iso5
    minor_version   : 512
    compatible_brands: iso5iso6mp41
    encoder         : Lavf58.42.100
  Duration: 00:10:34.60, start: 630.000000, bitrate: 4 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 852x480 [SAR 640:639 DAR 16:9], 4 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)

    major_brand     : iso5
    minor_version   : 512
    compatible_brands: iso5iso6mp41
    encoder         : Lavf58.42.100
  Duration: 00:10:34.60, start: 630.000000, bitrate: 1 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 1 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
'''


    



    I tried to look in ffprobe documentation I could not find the definition of the bit_rate field output in ffprobe.

    



    Can you please help me to understand this ?

    


  • Transcription via OpenAi's whisper : AssertionError : incorrect audio shape

    1er avril 2024, par muratowski

    I'm trying to use OpenAI's open source Whisper library to transcribe audio files.

    


    Here is my script's source code :

    


    import whisper

model = whisper.load_model("large-v2")

# load the entire audio file
audio = whisper.load_audio("/content/file.mp3")
#When i write that code snippet here ==> audio = whisper.pad_or_trim(audio) the first 30 secs are converted and without any problem they are converted.

# make log-Mel spectrogram and move to the same device as the model
mel = whisper.log_mel_spectrogram(audio).to(model.device)

# detect the spoken language
_, probs = model.detect_language(mel)
print(f"Detected language: {max(probs, key=probs.get)}")

# decode the audio
options = whisper.DecodingOptions(fp16=False)
result = whisper.decode(model, mel, options)

# print the recognized text if available
try:
    if hasattr(result, "text"):
        print(result.text)
except Exception as e:
    print(f"Error while printing transcription: {e}")

# write the recognized text to a file
try:
    with open("output_of_file.txt", "w") as f:
        f.write(result.text)
        print("Transcription saved to file.")
except Exception as e:
    print(f"Error while saving transcription: {e}")


    


    In here :

    


    # load the entire audio file
audio = whisper.load_audio("/content/file.mp3")


    


    when I write below : " audio = whisper.pad_or_trim(audio) ", the first 30 secs of the sound file is transcribed without any problem and language detection works as well,

    


    but when I delete it and want the whole file to be transcribed, I get the following error :

    


    


    AssertionError : incorrect audio shape

    


    


    What should I do ? Should I change the structure of the sound file ? If yes, which library should I use and what type of script should I write ?