Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (112)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (15906)

  • How to apply audio equalization using NAudio

    19 mai 2021, par Raheel Khan

    I have a WPF app that does the following :

    


      

    1. Imports video files.
    2. 


    3. Extracts audio from the using FFmpeg.
    4. 


    5. Resamples the audio using NAudio to conform to a Speech-to-Text engine (16kHz/16bit/Mono).
    6. 


    7. Plays back the video for users with overlayed subtitles.
    8. 


    9. Allows users to correct mistakes that the STT engine might have made.
    10. 


    


    Simple resampling with NAudio :

    


    using (var reader = new WaveFileReader(fileAudioTemp.FullName))
{
    var outFormat = new WaveFormat(16000, 16, 1);
    //var outFormat = WaveFormat.CreateIeeeFloatWaveFormat(16000, 1);

    using (var resampler = new MediaFoundationResampler(reader, outFormat))
    {
        resampler.ResamplerQuality = 60; // Highest Quality in MF.
        WaveFileWriter.CreateWaveFile(fileAudio.FullName, resampler);
    }
}


    


    The problem is that these videos have extremely bad audio quality. The sound is muffled, bassy, and makes it very difficult to make out names of people, places, etc. This makes it difficult and time-consuming for users to proof the text. Please do note that the STT engine has no problem with this and is surprisingly accurate considering the quality.

    


    What I would like to do is apply an equalization present to this audio. I found that the built-in SKA preset in VLC seems to make it 'slightly' easier for users to understand what is being said.

    


    VLC Equalizer Settings

    


    Is there a way to use either FFmpeg (Xabe) or preferably NAudio to apply such a filter ? Is so how ? I have seen many examples out there about manipulation of sound buffers but was looking for an easier way such as a preset file or parameters that could be passed into the resamplers.

    


    Any pointers would be appreciated.

    


  • Merge commit '9c1e111406bd4cbb04d8e8611b71bebf203bec5e'

    7 novembre 2017, par James Almer
    Merge commit '9c1e111406bd4cbb04d8e8611b71bebf203bec5e'
    

    * commit '9c1e111406bd4cbb04d8e8611b71bebf203bec5e' :
    flac : Convert to the new bitstream reader
    bitstream : Avoid undefined behavior in bitstream_skip()

    This commit is a noop, see
    https://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209609.html

    Merged-by : James Almer <jamrial@gmail.com>

  • RTMP Server forward to ffmpeg

    7 janvier 2021, par Reza Hashemi

    I'm looking into for a solution to accept rtmp connections and after demux forward to ffmpeg pipe.&#xA;Here is the solution I tried, I just put the part of Handeling Connection since its a long code based on :&#xA;https://github.com/gwuhaolin/livego

    &#xA;

    func (s *Server) handleConn(conn *core.Conn) error {&#xA;    if err := conn.HandshakeServer(); err != nil {&#xA;        conn.Close()&#xA;        log.Println("handleConn HandshakeServer err: ", err)&#xA;        return err&#xA;    }&#xA;    connServer := core.NewConnServer(conn)&#xA;&#xA;    if err := connServer.ReadMsg(); err != nil {&#xA;        conn.Close()&#xA;        log.Println("handleConn read msg err: ", err)&#xA;        return err&#xA;    }&#xA;    appname, name, url := connServer.GetInfo()&#xA;        if connServer.IsPublisher() {&#xA;        //todo: check token if is valid&#xA;        connServer.PublishInfo.Name = appname&#xA;        reader := NewVirReader(connServer)&#xA;        s.handler.HandleReader(reader)&#xA;        log.Println("new publisher: %&#x2B;v", reader.Info())&#xA;&#xA;        if s.getter != nil {&#xA;            writeType := reflect.TypeOf(s.getter)&#xA;            log.Println("handleConn:writeType=%v", writeType)&#xA;            writer := s.getter.GetWriter(reader.Info())&#xA;            s.handler.HandleWriter(writer)&#xA;        }&#xA;        flvWriter := new(flvBus.Bus)&#xA;        flvWriter.SetBackend(q)&#xA;        s.handler.HandleWriter(flvWriter.GetWriter(reader.Info()))&#xA;       } else {&#xA;        writer := NewVirWriter(connServer)&#xA;        log.Println("new player: %&#x2B;v", writer.Info())&#xA;        s.handler.HandleWriter(writer)&#xA;    }&#xA;&#xA;    return nil&#xA;}&#xA;

    &#xA;

    then on flv bus :&#xA;assume that ctx is the pipe0 of ffmpeg.

    &#xA;

    package flvBus&#xA;&#xA;import (&#xA;    "github.com/gwuhaolin/livego/av"&#xA;    "github.com/gwuhaolin/livego/protocol/amf"&#xA;    "github.com/gwuhaolin/livego/utils/pio"&#xA;    "github.com/gwuhaolin/livego/utils/uid"&#xA;    "time"&#xA;)&#xA;&#xA;var (&#xA;    flvHeader = []byte{0x46, 0x4c, 0x56, 0x01, 0x05, 0x00, 0x00, 0x00, 0x09}&#xA;)&#xA;&#xA;const (&#xA;    headerLen = 11&#xA;)&#xA;&#xA;type FLVWriter struct {&#xA;    Uid string&#xA;    av.RWBaser&#xA;    app, title, url string&#xA;    buf             []byte&#xA;    closed          chan struct{}&#xA;    ctx             Writer&#xA;}&#xA;&#xA;func NewFLVWriter(app, title, url string, ctx Writer) *FLVWriter {&#xA;    ret := &amp;FLVWriter{&#xA;        Uid:     uid.NewId(),&#xA;        app:     app,&#xA;        title:   title,&#xA;        url:     url,&#xA;        ctx:     ctx,&#xA;        RWBaser: av.NewRWBaser(time.Second * 10),&#xA;        closed:  make(chan struct{}),&#xA;        buf:     make([]byte, headerLen),&#xA;    }&#xA;&#xA;    ret.ctx.Write(flvHeader)&#xA;    pio.PutI32BE(ret.buf[:4], 0)&#xA;    ret.ctx.Write(ret.buf[:4])&#xA;    return ret&#xA;}&#xA;&#xA;func (writer *FLVWriter) Write(p *av.Packet) error {&#xA;    writer.RWBaser.SetPreTime()&#xA;    h := writer.buf[:headerLen]&#xA;&#xA;    typeID := av.TAG_VIDEO&#xA;    if !p.IsVideo {&#xA;        if p.IsMetadata {&#xA;            var err error&#xA;            typeID = av.TAG_SCRIPTDATAAMF0&#xA;            p.Data, err = amf.MetaDataReform(p.Data, amf.DEL)&#xA;            if err != nil {&#xA;                return err&#xA;            }&#xA;        } else {&#xA;            typeID = av.TAG_AUDIO&#xA;        }&#xA;    }&#xA;    dataLen := len(p.Data)&#xA;    timestamp := p.TimeStamp&#xA;    timestamp &#x2B;= writer.BaseTimeStamp()&#xA;    writer.RWBaser.RecTimeStamp(timestamp, uint32(typeID))&#xA;&#xA;    preDataLen := dataLen &#x2B; headerLen&#xA;    timestampbase := timestamp &amp; 0xffffff&#xA;    timestampExt := timestamp >> 24 &amp; 0xff&#xA;&#xA;    pio.PutU8(h[0:1], uint8(typeID))&#xA;    pio.PutI24BE(h[1:4], int32(dataLen))&#xA;    pio.PutI24BE(h[4:7], int32(timestampbase))&#xA;    pio.PutU8(h[7:8], uint8(timestampExt))&#xA;&#xA;    if _, err := writer.ctx.Write(h); err != nil {&#xA;        return err&#xA;    }&#xA;&#xA;    if _, err := writer.ctx.Write(p.Data); err != nil {&#xA;        return err&#xA;    }&#xA;&#xA;    pio.PutI32BE(h[:4], int32(preDataLen))&#xA;    if _, err := writer.ctx.Write(h[:4]); err != nil {&#xA;        return err&#xA;    }&#xA;&#xA;    return nil&#xA;}&#xA;&#xA;func (writer *FLVWriter) Wait() {&#xA;    select {&#xA;    case &lt;-writer.closed:&#xA;        return&#xA;    }&#xA;}&#xA;&#xA;func (writer *FLVWriter) Close(error) {&#xA;    //writer.ctx.Close()&#xA;    close(writer.closed)&#xA;}&#xA;&#xA;func (writer *FLVWriter) Info() (ret av.Info) {&#xA;    ret.UID = writer.Uid&#xA;    ret.URL = writer.url&#xA;    ret.Key = writer.app &#x2B; "/" &#x2B; writer.title&#xA;    return&#xA;}&#xA;

    &#xA;

    but at the end it return me pipe:0 : Invalid data found when processing input.

    &#xA;

    How can I forward captured frames to ffmpeg ?&#xA;Also any other solutions are welcome.

    &#xA;