Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (39)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (6355)

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

  • modprobe snd-dummy on linux server, ffmpeg -f alsa is recording noise

    20 mars 2021, par booksword

    Some people say that the parameter fake_buffer can remove the noise, but I tried it and there is still noise

    


    


    modprobe snd-dummy fake_buffer=0

    


    


    #modprobe snd-dummy fake_buffer=0 
# lsmod |grep snd
snd_dummy              24576  0
snd_pcm_oss            61440  0
snd_mixer_oss          28672  1 snd_pcm_oss
snd_pcm               118784  2 snd_pcm_oss,snd_dummy
snd_timer              36864  1 snd_pcm
snd                    94208  5 snd_timer,snd_pcm_oss,snd_pcm,snd_dummy,snd_mixer_oss
soundcore              16384  1 snd
# modinfo snd_dummy
filename:       /lib/modules/4.14.129-bbrplus/kernel/sound/drivers/snd-dummy.ko
license:        GPL
description:    Dummy soundcard (/dev/null)
author:         Jaroslav Kysela <perex@perex.cz>
depends:        snd-pcm,snd
retpoline:      Y
intree:         Y
name:           snd_dummy
vermagic:       4.14.129-bbrplus SMP mod_unload modversions 
parm:           index:Index value for dummy soundcard. (array of int)
parm:           id:ID string for dummy soundcard. (array of charp)
parm:           enable:Enable this dummy soundcard. (array of bool)
parm:           model:Soundcard model. (array of charp)
parm:           pcm_devs:PCM devices # (0-4) for dummy driver. (array of int)
parm:           pcm_substreams:PCM substreams # (1-128) for dummy driver. (array of int)
parm:           fake_buffer:Fake buffer allocations. (bool)
parm:           hrtimer:Use hrtimer as the timer source. (bool)

#aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
dummy
default:CARD=Dummy
    Dummy, Dummy PCM
    Default Audio Device
sysdefault:CARD=Dummy
    Dummy, Dummy PCM
    Default Audio Device
dmix:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct sample mixing device
dsnoop:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct sample snooping device
hw:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct hardware device without any conversions
plughw:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Hardware device with all software conversions


# ffmpeg -f alsa  -i hw:0 -t 5  /dev/shm/out.mp3 -y
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:0':
  Duration: N/A, start: 1616225206.353453, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to '/dev/shm/out.mp3':
  Metadata:
    TSSE            : Lavf57.83.100
    Stream #0:0: Audio: mp3 (libmp3lame), 48000 Hz, stereo, s16p
    Metadata:
      encoder         : Lavc57.107.100 libmp3lame
size=      79kB time=00:00:05.01 bitrate= 129.0kbits/s speed=   1x     
video:0kB audio:79kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.293899%




    


    i use alsamixer to set all Volume to 0 ,and there is still noise
I searched in google for a long time and did not find other people have this problem , where am I doing it wrong