Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (93)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (6819)

  • Ffmpeg stereo buffer size issue

    8 janvier 2020, par grunt

    When using ffmpeg library (c++), when audio is stereo (channels = 2) there is a problem in data_size : in the case of code below, fwrite line will crash on access violation reading. The channels parameter doubles the data_size when stereo. There is no problem when c->channels is replaced with 1.

    The channels parameter is set to 2 in the avcodec_decode_audio4 function (and I indeed use a stereo file [joint stereo]. when I use a mono file channels is set to 1).

    If I dump input_packet’s to a file it plays ok.

    What could be the reason for this ? My code is very much similar to code examples on the net.

    while (input_packet.size > 0)
    {
     len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &input_packet);
     if (got_frame)
     {
       int data_size = av_samples_get_buffer_size(NULL, c->channels,
                                                      decoded_frame->nb_samples,
                                                      c->sample_fmt, 1);
       fwrite(decoded_frame->data[0], 1, data_size, outfile); // access violation reading loction
       // outArr.insert(outArr.end(), decoded_frame->data[0], decoded_frame->data[0] + data_size); // This will crash in same manner. outArr is vector<byte>.
     }
    }
    </byte>
  • FFMPEG, resize and pad a video by and odd number of pixels ?

    18 février 2018, par Jules

    I’m trying to resize and pad a video from 1917 x 1080 to 1920 x 1080.

    I’ve tried various syntax, which works but doesn’t change the size.

    ffmpeg -i input.mp4 -filter:v scale=1920:1080,pad=1920:1080 -c:a copy output.mp4

    However, I have go to this point by resize, joint audio and rotate. The initial size is 640 x 1136, I believe this is the source of the problem.

    ffmpeg -i input.mp4 -filter:v scale=900:1200 -c:a copy output.mp4

    ffmpeg \
    -i input.m4a \
    -i resize.mp4 -acodec copy -vcodec copy -shortest \
    output.mp4

    ffmpeg -i input.mp4" -vf "transpose=2" output/mp4

    So I’m wondering if I should do something different earlier

  • Trying to convert an mp3 file to a Numpy Array, and ffmpeg just hangs

    29 mai 2021, par Rich

    I'm working on a music classification methodology with Scikit-learn, and the first step in that process is converting a music file to a numpy array.

    &#xA;&#xA;

    After unsuccessfully trying to call ffmpeg from a python script, I decided to simply pipe the file in directly :

    &#xA;&#xA;

    FFMPEG_BIN = "ffmpeg"&#xA;cwd = (os.getcwd())&#xA;dcwd = (cwd &#x2B; "/temp")&#xA;if not os.path.exists(dcwd): os.makedirs(dcwd)&#xA;&#xA;folder_path = sys.argv[1]&#xA;f = open("test.txt","a")&#xA;&#xA;for f in glob.glob(os.path.join(folder_path, "*.mp3")):&#xA;    ff = f.replace("./", "/")&#xA;    print("Name: " &#x2B; ff)&#xA;    aa = (cwd &#x2B; ff)&#xA;&#xA;    command = [ FFMPEG_BIN,&#xA;        &#x27;-i&#x27;,  aa,&#xA;        &#x27;-f&#x27;, &#x27;s16le&#x27;,&#xA;        &#x27;-acodec&#x27;, &#x27;pcm_s16le&#x27;,&#xA;        &#x27;-ar&#x27;, &#x27;22000&#x27;, # ouput will have 44100 Hz&#xA;        &#x27;-ac&#x27;, &#x27;1&#x27;, # stereo (set to &#x27;1&#x27; for mono)&#xA;        &#x27;-&#x27;]&#xA;&#xA;    pipe = sp.Popen(command, stdout=sp.PIPE, bufsize=10**8)&#xA;    raw_audio = pipe.proc.stdout.read(88200*4)&#xA;    audio_array = numpy.fromstring(raw_audio, dtype="int16")&#xA;    print (str(audio_array))&#xA;    f.write(audio_array &#x2B; "\n")&#xA;

    &#xA;&#xA;

    The problem is, when I run the file, it starts ffmpeg and then does nothing :

    &#xA;&#xA;

    [mp3 @ 0x1446540] Estimating duration from bitrate, this may be inaccurate&#xA;Input #0, mp3, from &#x27;/home/don/Code/Projects/MC/Music/Spaz.mp3&#x27;:&#xA;  Metadata:&#xA;    title           : Spaz&#xA;    album           : Seeing souns&#xA;    artist          : N*E*R*D&#xA;    genre           : Hip-Hop&#xA;    encoder         : Audiograbber 1.83.01, LAME dll 3.96, 320 Kbit/s, Joint Stereo, Normal quality&#xA;    track           : 5/12&#xA;    date            : 2008&#xA;  Duration: 00:03:50.58, start: 0.000000, bitrate: 320 kb/s&#xA;    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s&#xA;Output #0, s16le, to &#x27;pipe:&#x27;:&#xA;  Metadata:&#xA;    title           : Spaz&#xA;    album           : Seeing souns&#xA;    artist          : N*E*R*D&#xA;    genre           : Hip-Hop&#xA;    date            : 2008&#xA;    track           : 5/12&#xA;    encoder         : Lavf56.4.101&#xA;    Stream #0:0: Audio: pcm_s16le, 22000 Hz, mono, s16, 352 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc56.1.100 pcm_s16le&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))&#xA;Press [q] to stop, [?] for help&#xA;

    &#xA;&#xA;

    It just sits there, hanging, for far longer than the song is. What am I doing wrong here ?,

    &#xA;