Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (35)

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

  • Error with IO.popen and ffmepg

    6 mars 2015, par Florian Dano Clement

    I received files in mp3 (2 minutes/files) I want to concatenate together and create a bigger file. So I created my model a function to do this using ffmpeg and IO.popen

    FileUtils.mkdir_p "#{Rails.root}/tmp/files"
    imported_dir = "#{Rails.root}/tmp/files/#{SecureRandom.uuid}"
    links.each_with_index do |link, index|
     file_path = "#{imported_dir}_#{index}#{File.extname(link)}"
     File.open(file_path, 'wb') do |file|
       file.write open(link).read
     end
     concat_list << "file '#{file_path}'\n"
    end
    File.open("#{imported_dir}.txt", 'w'){ |f| f.write(concat_list)}
    io = IO.popen("#{Rails.root}/lib/ffmpeg/ffmpeg -f concat -i #{imported_dir}.txt -c copy #{imported_dir}.mp3").readlines
    if sound = Sound.create(user_id: user.id, file: File.open("#{imported_dir}.mp3"), lang: lang, title: title)
     audio = FFMPEG::Movie.new("#{imported_dir}.mp3")
     if !audio.valid?
       puts "//_!_\\\\ Failed reading with ffmpeg (#{sound.id})#{sound.title} //_!_\\\\"
       return false
     end
    end

    the problem is that my .txt file containing the file path

    file '/home/test/apps/example/releases/20150305224026/tmp/files/4dbe9707-cfef-467b-ab2c-a5e1e1165953_0.mp3'

    created files as well but the final file is not created and i got the error message :

    No such file or directory @ rb_sysopen - /home/test/apps/example/releases/20150305224026/tmp/files/4dbe9707-cfef-467b-ab2c-a5e1e1165953.mp3

    If anyone could help me

  • how to add header info to a wav file to get a same result as ffmpeg ?

    30 avril 2023, par Q.Tong

    I'm trying to generate a .wav file with Fastspeech. When I save the data as .pcm file, and transfer it to .wav by ffmpeg, it works well.But when I just add a wav header info and save it into .wav, it sounds very noisy, What's wrong with my code ?

    


    code for pcm :

    


        wav = wav.astype(np.float32)
    wav = wav.tostring()
    with open('test.pcm', 'wb') as f:
        f.write(wav)


    


    ffmpeg command :

    


    ffmpeg -f f32le -ar 16000 -i test.pcm file.wav  # works well


    


    write wav straightly :

    


    import struct

def pcm2wav(sample_rate, pcm_voice):
    if pcm_voice.startswith("RIFF".encode()):
        return pcm_voice
    else:
        sampleNum = len(pcm_voice)
        rHeaderInfo = "RIFF".encode()
        rHeaderInfo += struct.pack('i', sampleNum + 44)
        rHeaderInfo += 'WAVEfmt '.encode()
        rHeaderInfo += struct.pack('i', 16)
        rHeaderInfo += struct.pack('h', 1)
        rHeaderInfo += struct.pack('h', 1)
        rHeaderInfo += struct.pack('i', sample_rate)
        rHeaderInfo += struct.pack('i', sample_rate * int(32 / 8))
        rHeaderInfo += struct.pack("h", int(32 / 8))
        rHeaderInfo += struct.pack("h", 32)
        rHeaderInfo += "data".encode()
        rHeaderInfo += struct.pack('i', sampleNum)
        rHeaderInfo += pcm_voice
        return rHeaderInfo

# .......
# get data with FastSpeech model
wav = wav.astype(np.float32)
wav = wav.tostring()
wav = pcm2wav(16000, wav)
with open('test.wav', 'wb') as f:
    f.write(wav)   # many noisy sounds


    


  • Converting png images series to webm with transparent white background from Daz3d

    25 août 2015, par James

    I’m trying to make a webm video with a transparent background from a Daz3D model.
    My process is export png image series with transparent background from Daz3D, use ffmpeg to convert png series to webm video.
    This was working well in Daz3D 4.6.

    But in Daz3D 4.8 the exported background is black instead of white, so when converted to webm is ok on Chrome as has the transparency, but on Firefox is black and has a halo (as Firefox does not support transparency so displays background).

    So I’m looking for a solution with Daz3D, or tools like ImageMagik.
    I almost got it with ImageMagik,

    convert -alpha extract *.png mask.png
    mogrify -flatten talk*.png
    for /f %x in ('dir /s /b blink*.png') do @composite -compose CopyOpacity mask-0.png %x %x

    But for some reason the final webm has a white background not transparent ...
    Some more info here,

    http://www.daz3d.com/forums/discussion/61237/daz3d-4-8-png-background-is-black

    and here,

    http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=28214

    >
    Doh, okay I figured it out. My images were good, but I somehow have two different versions of ffmpeg on my computer and was using the wrong one that doesn’t seem to support transparency.

    Now it is working.

    My only issue is the last shell line,

    for /f %x in (’dir /s /b blink*.png’) do @composite -compose CopyOpacity mask-0.png %x %x

    This only uses mask-0.png, instead of mask-1 for blink01.png, mask-2 for blink02.png etc.