Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (32)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (4204)

  • why ffmpeg is not working in new installation

    3 août 2013, par Hitesh Gupta

    I was working on live encoding from FFmpeg from last few days. One day I re-installed my OS and tried to run FFmpeg commands again after configuration. My publish points get in starting but could not started. Why ? Am I missing any configuration required ?

    The command I am trying to run is :

    ffmpeg -y -re -i D:\video2.mp4 -pix_fmt yuv420p -movflags isml+frag_keyframe -f ismv -threads 0 -c:v libx264 -preset fast -profile:v baseline -map 0:v -b:v:0 800k http://localhost/PPS/PublishPoint.isml/Streams(Encode
    r1)

    Output what I got in command prompt is :

    ffmpeg version N-54772-g53c853e Copyright (c) 2000-2013 the FFmpeg developers
     built on Jul 16 2013 22:25:42 with gcc 4.7.3 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
    amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
    enable-libxvid --enable-zlib
     libavutil      52. 40.100 / 52. 40.100
     libavcodec     55. 18.102 / 55. 18.102
     libavformat    55. 12.102 / 55. 12.102
     libavdevice    55.  3.100 / 55.  3.100
     libavfilter     3. 81.101 /  3. 81.101
     libswscale      2.  3.100 /  2.  3.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\video2.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.10.100
     Duration: 00:00:12.12, start: 0.072562, bitrate: 945 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 704x396 [
    SAR 1:1 DAR 16:9], 882 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 64
    kb/s
       Metadata:
         handler_name    : SoundHandler
    [libx264 @ 00000000047e0860] using SAR=1/1
    [libx264 @ 00000000047e0860] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264 @ 00000000047e0860] profile Constrained Baseline, level 3.0
    [libx264 @ 00000000047e0860] 264 - core 135 r2345 f0c1c53 - H.264/MPEG-4 AVC cod
    ec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 r
    ef=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed
    _ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pski
    p=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 deci
    mate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyi
    nt=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=abr mbtree=1
    bitrate=800 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1
    :1.00
    Output #0, ismv, to 'http://localhost/My_SSMN_PPS/saturday.isml/Streams(Encoder1
    )':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.12.102
       Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 7
    04x396 [SAR 1:1 DAR 16:9], q=-1--1, 800 kb/s, 10000k tbn, 29.97 tbc
       Metadata:
         handler_name    : VideoHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> libx264)
    Press [q] to stop, [?] for help
    frame=   13 fps=0.0 q=0.0 size=       2kB time=00:00:00.00 bitrate=N/A dup=2 dro
    frame=   29 fps= 29 q=0.0 size=       2kB time=00:00:00.00 bitrate=N/A dup=2 dro
    av_interleaved_write_frame(): Unknown error

    Advanced Thanks.

  • ffmpeg Error : Too many packets buffered for output stream

    7 octobre 2023, par Martin

    I am working on an electron app that uses ffmpeg, I am developing on a win10 machine so I am using command prompt and I have installed the npm package 'ffmpeg-ffprobe-static'. I can run ffmpeg commands in the terminal by calling the package like so :

    


    C:\Users\martin\myproject\node_modules\ffmpeg-ffprobe-static>ffmpeg.exe -h
ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200621
....


    


    I have an ffmpeg command to combine two flac files into a single mp3 file that has been working fine until I encountered this error :

    


    [mjpeg @ 0000022537ace640] bits 85 is invalid
Error while decoding stream #0:1: Invalid data found when processing input
Too many packets buffered for output stream 0:0.
[libmp3lame @ 0000022537ac3480] 3 frames left in the queue on closing
Conversion failed!


    


    The same command works for other flac files, so there's something about these Billy Martin songs that can be played perfectly fine in vlc but cause ffmpeg to crash :

    


    //running this command:


ffmpeg.exe -i "G:\RenderTune broken files\broken flac example\05 - Billy Martin - Phillie Dog.flac" -i "G:\RenderTune broken files\broken flac example\08 - Billy Martin - Stax.flac" -y -filter_complex concat=n=2:v=0:a=1 -c:a libmp3lame -b:a 320k "G:\RenderTune broken files\broken flac example\COMBINED_FILES.mp3"


//results in this output:
[mjpeg @ 0000022537ace640] bits 85 is invalid
Error while decoding stream #0:1: Invalid data found when processing input
Too many packets buffered for output stream 0:0.
[libmp3lame @ 0000022537ac3480] 3 frames left in the queue on closing
Conversion failed!


    


    I uploaded the broken flac files here : https://www.mediafire.com/folder/0v9hbfrap727y/broken+flac

    


    If I run this same command with other flac files it works fine :

    


    ffmpeg.exe -i "G:\RenderTune broken files\working flac example\5. Gossip.flac" -i "G:\RenderTune broken files\working flac example\6. Let The Children Play.flac" -y -filter_complex concat=n=2:v=0:a=1 -c:a libmp3lame -b:a 320k "G:\RenderTune broken files\working flac example\COMBINED_FILES.mp3"


    


    I have tried adding -max_muxing_queue_size 9999 to my ffmpeg command like many posts suggest but that does not fix it, does anybody know how to prevent this error ?

    


    [edit]
I tried one of the posted solutions :

    


    ffmpeg.exe -y -i "G:\RenderTune broken files\working flac example\5. Gossip.flac" -i "G:\RenderTune broken files\working flac example\6. Let The Children Play.flac" -filter_complex "[0:a][1:a]concat=n=2:v=0:a=1[a]" -map "[a]" -c:a libmp3lame -b:a 320k "G:\RenderTune broken files\working flac example\COMBINED_FILES.mp3"


    


    which crashed with a different error :

    


    [libmp3lame @ 000002453725f3c0] Queue input is backward in time.9x
... lots of these [mp3 @ ..] messages
[mp3 @ 0000024537344400] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2449071 >= 2445999
[mp3 @ 0000024537344400] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2449071 >= 2447151
[mp3 @ 0000024537344400] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2449071 >= 2448303
[flac @ 00000245372d4140] invalid residual315.7kbits/s speed=59.7x
[flac @ 00000245372d4140] decode_frame() failed
Error while decoding stream #1:0: Invalid data found when processing input
size=   24871kB time=00:10:37.09 bitrate= 319.8kbits/s speed=60.5x
video:0kB audio:24869kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.004673%


    


  • Checking if a video has a sound even if it has an audio codec ?

    19 janvier 2023, par Sreenivasan

    I am new to intermediate python and I am trying to find if a downloaded video has sound, every video I download has an audio codec but I want to get the decibel of sound that audio has in that particular video.

    


    For example, this 'FFmpeg' command line script allows me to get the full info :

    


    ffmpeg -hide_banner -i testvideo.mp4 -af volumedetect -vn -f null - 2>&1


    


    this yields the below result in my command prompt(windows user here with win 11)

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testvideo.mp4':

Metadata:

major_brand : mp42

minor_version : 0

compatible_brands: mp42mp41isomavc1

creation_time : 2022-04-12T23:21:45.000000Z

Duration: 00:00:40.58, start: 0.000000, bitrate: 4104 kb/s

Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 3846 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)

Metadata:

creation_time : 2022-04-12T23:21:45.000000Z

handler_name : L-SMASH Video Handler

vendor_id : [0][0][0][0]

encoder : AVC Coding

Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)

Metadata:

creation_time : 2022-04-12T23:21:45.000000Z

handler_name : L-SMASH Audio Handler

vendor_id : [0][0][0][0]

Stream mapping:

Stream #0:1 -> #0:0 (aac (native) -> pcm_s16le (native))

Press [q] to stop, [?] for help

Output #0, null, to 'pipe:':

Metadata:

major_brand : mp42

minor_version : 0

compatible_brands: mp42mp41isomavc1

encoder : Lavf59.35.100

Stream #0:0(und): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)

Metadata:

creation_time : 2022-04-12T23:21:45.000000Z

handler_name : L-SMASH Audio Handler

vendor_id : [0][0][0][0]

encoder : Lavc59.56.100 pcm_s16le

size=N/A time=00:00:40.55 bitrate=N/A speed=1.22e+03x

video:0kB audio:7608kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

[Parsed_volumedetect_0 @ 0000026609be08c0] n_samples: 3895296

[Parsed_volumedetect_0 @ 0000026609be08c0] mean_volume: -91.0 dB

[Parsed_volumedetect_0 @ 0000026609be08c0] max_volume: -91.0 dB

[Parsed_volumedetect_0 @ 0000026609be08c0] histogram_91db: 3895296


    


    As you can see there are 'parsed_volumedetect' values with dB which has a mean value of -91 dB which means the audio has no sound, i.e., the video has audio but there is no sound.

    


    Now I am trying to do the same in python and I want to get just the mean volume value to be stored in a variable so that I can check if the video has any sound in it.

    


    I have seen the subprocess codes so far but when I try to run my code in VS-Code - python 3.11 :

    


    import subprocess    
result = subprocess.run(["ffmpeg", "-hide_banner", "-af", "volumedetect", "-vn", "-f", "null", "testvideo1.mp4"],
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT,
    shell=True)
    print(result.stdout)


    


    It says that :

    


    PS C:\Users\balaj\OneDrive\Documents\Programming language\python files> c:; cd 'c:\Users\balaj\OneDrive\Documents\Programming language\python files'; & 'C:\Python311\python.exe' 'c:\Users\balaj\.vscode\extensions\ms-python.python-2022.20.2\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '51760' '--' 'c:\Users\balaj\OneDrive\Documents\Programming language\python files\devproject\sample.py'

b"Output #0, null, to 'testvideo1.mp4':\r\nOutput file #0 does not contain any stream\r\n"


    


    Any help is much appreciated. Sorry for the long post... TIA !!!

    


    Just a quick update :
The result is the same for video files that have sound(I tested in VLC) and don't have sound.

    


    Another update :
I have changed the subprocess.runcode to the exact same as I called in the cmd windows :

    


    result = subprocess.run(["ffmpeg", "-hide_banner","-i","testvideo-sound.mp4", "-af", "volumedetect", "-vn", "-f", "null", "-2>&1"]


    


    Now the result is this :

    


    b'The handle could not be duplicated\r\nduring redirection of handle 1.\r\n'