Recherche avancée

Médias (0)

Mot : - Tags -/latitude

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

Autres articles (25)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (6099)

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


    


  • moviepy output video only has sound in vs code and chrome but not in quicktime (the mac video player)

    24 janvier 2023, par UrLocalGoose

    I am using moviepy to make simple videos that require adding background music to a video. I have built essentially the whole application but I ran into a problem when showing people the videos. I tried emailing myself the video and it didn't have any sound, then I tried to play the video with the built in mac video player, quicktime, and it didn't have any sound, however, when I played the video in vs code's video player it worked perfectly, I also used the file path to view the video in chrome, and that worked too. I suspect that it has something to do with the encoding but I am a novice when it comes to video and audio encoding. This is what my code looks like :

    


    from moviepy.editor import *

background_video = VideoFileClip("./background.mp4")

background_music_audio = AudioFileClip("./music.wav")

comp = background_video.set_audio(background_music_audio)

comp.write_videofile("./test.mp4")


    


    I tried to make a video with background music but it had no sound

    


  • ffmpeg stream to youtube has no sound with bigger mp4 file

    6 janvier 2023, par Alessandro Oliverio

    I want to stream to Youtube from a Ubuntu VPS and it works, but when i set a bigger .mp4 file (220mb) the livestream on Youtube has no sound.

    


    I tried to split the .mp4 file to 5s parts and concat them but without success.

    


    My settings are :

    


    FPS="30"                                       # FPS de la vidéo en sortie
QUAL="superfast"                                  # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"  # URL de base RTMP youtube

              # Source UDP (voir les annonces SAP)
KEY="###-my-key-###"                                     # Clé à récupérer sur>
VSOURCE="parts/files.txt"
ASOURCE="1m.mp3"

ffmpeg \
    -stream_loop -1 -f concat -i "$VSOURCE" -deinterlace \
    -stream_loop  -1 -i "$ASOURCE" \
    -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \
    -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k \
    -f flv "$YOUTUBE_URL/$KEY"


    


    Hope someone can help me :)

    


    I tried to split the .mp4 file to 5s parts and concat them but without success.