Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (65)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (4371)

  • Download from YouTube as ".wav" instead of ".webm"

    11 août 2022, par Bastian Gerjol

    I am trying to extract an audio from a YouTube Video as an .wav file.
However, the script that I am running keeps giving me .webm files.
The code I am using is the following :

    


    from __future__ import unicode_literals
import youtube_dl

ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'wav',
        'preferredquality': '192'
    }],
    'postprocessor_args': [
        '-ar', '16000'
    ],
    'prefer_ffmpeg': True,
    'keepvideo': True
}

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=2Xq7iJKzhR4'])


    


    Is there a way to change the output and keep the highest possible audio quality ?

    


    I tried setting prefer_ffmpeg': True to False & keepvideo': True to False but that did not change anything.

    


    I would appreciate suggestions and please keep in mind that I never used Python before.

    


  • Should I use aevalsrc or anullsrc ? I got flooded with "cur_dts is invalid st:0" or "Delay between the first packet", encoding stalls at frame 127

    28 avril 2022, par jokoon

    Context : this command is generated with a python script, it aims at concatenating different small videos of different format, with a 0.5s pause, considering some video don't have an audio track.

    


    ffmpeg.exe
-report
-i
input0.mp4
-i
input1.mp4
-i
input2.mp4
-i
input3.mp4
-i
input4.mp4
-i
input5.mp4
-i
input6.mp4
-i
input7.mp4
-i
input8.mp4
-f
lavfi
-i
color=c=black:s=480x270:d=0.5:r=24,format=yuv420p
-f
lavfi
-i
anullsrc
-filter_complex_script
filter_complex_script.txt
-map
[final_video]
-map
[final_audio]
-c:a
aac
concatenated-2022-04-27--23-53.mp4


    


    


    [0]fps=24[fps0];
[fps0]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled0];
[1]fps=24[fps1];
[fps1]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled1];
[2]fps=24[fps2];
[fps2]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled2];
[3]fps=24[fps3];
[fps3]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled3];
[4]fps=24[fps4];
[fps4]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled4];
[5]fps=24[fps5];
[fps5]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled5];
[6]fps=24[fps6];
[fps6]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled6];
[7]fps=24[fps7];
[fps7]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled7];
[8]fps=24[fps8];
[fps8]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled8];
[rescaled0][10:a][9:v][10:a][rescaled1][10:a][9:v][10:a][rescaled2][10:a][9:v][10:a][rescaled3][10:a][9:v][10:a][rescaled4][10:a][9:v][10:a][rescaled5][5:a][9:v][10:a][rescaled6][6:a][9:v][10:a][rescaled7][7:a][9:v][10:a][rescaled8][8:a]concat=n=17:v=1:a=1[final_video][final_audio]


    


    I either have thousands of
[mp4 @ 000002132cefe100] Delay between the first packet and last packet in the muxing queue is 10007800 > 10000000: forcing output

    


    when I use

    


    -f lavfi -i anullsrc
so I tried using -f lavfi -i aevalsrc=0:n=1

    


    instead, I have have thousands of

    


    cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

    


    The encoding "stalls" at frame 127, it keeps doing things, but the frame counter doesn't increment.

    


    Here are the inputs :

    


    I skipped the yuvj420p input as it generated warnings (looks like it's not a big problem)

    


    enter image description here

    


    Here is a log (I trimmed it a bit) : (I think it's a bit large for stackoverflow)

    


    https://bpa.st/HB7A

    


  • libav : How to clear real-time buffer ?

    29 novembre 2018, par user67

    Here’s the c++ code that I’m using to access my webcam.

    int Camera::Init(char* file_name,
                   char* device_name,
                   char* format,
                   char* resolution,
                   char* frame_rate,
                   char* pixel_format)
    {
       av_log(NULL, AV_LOG_INFO, "---INIT STARTED\n");
       avdevice_register_all();
       av_register_all();

       AVDictionary* properties_collection = NULL;
       av_dict_set(&properties_collection, "f", format, NULL);
       av_dict_set(&properties_collection, "video_size", resolution, NULL);
       av_dict_set(&properties_collection, "framerate", frame_rate, NULL);
       av_dict_set(&properties_collection, "pix_fmt", pixel_format, NULL);
       AVInputFormat *input_format = av_find_input_format("dshow");
       char command_line[256];
       sprintf(command_line, "video=%s", device_name);
       AVFormatContext *input_context = avformat_alloc_context();
       //input_context->flags |= AVFMT_FLAG_NOBUFFER;      //DOESN'T HELP
       //input_context->max_picture_buffer = 0;            //ERR

       int err_code = 0;
       err_code = avformat_open_input(&input_context,
                                       command_line,
                                       input_format,
                                       &properties_collection);
       int i = 0;
       while (i++ < 30)
       {
           Sleep(1000);
           //avformat_flush(input_context); //DOESN'T HELP
           //av_free(input_context); //ERR
       }
       system("pause");
       return 0;
    }

    Right after "avformat_open_input()" it starts reading frames to some internal buffer without me even calling "av_read_frame()".
    After about 10 seconds it start’s giving me error messages :

    [dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
    too full or near too full (62% of size: 3041280 [rtbufsize parameter])!
    frame dropped!
    ...
    ...
    ...
    [dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
    too full or near too full (100% of size: 3041280 [rtbufsize parameter])!
    frame dropped!

    How to clear this buffer or avoid using it ?

    Thanks in advance.

    P.S.Please pardon my english.

    P.P.S.Have a good day.