
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (112)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 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, parMediaSPIP 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, parLe 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 KhanI have a WPF app that does the following :


- 

- Imports video files.
- Extracts audio from the using FFmpeg.
- Resamples the audio using NAudio to conform to a Speech-to-Text engine (16kHz/16bit/Mono).
- Plays back the video for users with overlayed subtitles.
- Allows users to correct mistakes that the STT engine might have made.












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.



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 AlmerMerge 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.htmlMerged-by : James Almer <jamrial@gmail.com>
-
RTMP Server forward to ffmpeg
7 janvier 2021, par Reza HashemiI'm looking into for a solution to accept rtmp connections and after demux forward to ffmpeg pipe.
Here is the solution I tried, I just put the part of Handeling Connection since its a long code based on :
https://github.com/gwuhaolin/livego


func (s *Server) handleConn(conn *core.Conn) error {
 if err := conn.HandshakeServer(); err != nil {
 conn.Close()
 log.Println("handleConn HandshakeServer err: ", err)
 return err
 }
 connServer := core.NewConnServer(conn)

 if err := connServer.ReadMsg(); err != nil {
 conn.Close()
 log.Println("handleConn read msg err: ", err)
 return err
 }
 appname, name, url := connServer.GetInfo()
 if connServer.IsPublisher() {
 //todo: check token if is valid
 connServer.PublishInfo.Name = appname
 reader := NewVirReader(connServer)
 s.handler.HandleReader(reader)
 log.Println("new publisher: %+v", reader.Info())

 if s.getter != nil {
 writeType := reflect.TypeOf(s.getter)
 log.Println("handleConn:writeType=%v", writeType)
 writer := s.getter.GetWriter(reader.Info())
 s.handler.HandleWriter(writer)
 }
 flvWriter := new(flvBus.Bus)
 flvWriter.SetBackend(q)
 s.handler.HandleWriter(flvWriter.GetWriter(reader.Info()))
 } else {
 writer := NewVirWriter(connServer)
 log.Println("new player: %+v", writer.Info())
 s.handler.HandleWriter(writer)
 }

 return nil
}



then on flv bus :
assume that ctx is the pipe0 of ffmpeg.


package flvBus

import (
 "github.com/gwuhaolin/livego/av"
 "github.com/gwuhaolin/livego/protocol/amf"
 "github.com/gwuhaolin/livego/utils/pio"
 "github.com/gwuhaolin/livego/utils/uid"
 "time"
)

var (
 flvHeader = []byte{0x46, 0x4c, 0x56, 0x01, 0x05, 0x00, 0x00, 0x00, 0x09}
)

const (
 headerLen = 11
)

type FLVWriter struct {
 Uid string
 av.RWBaser
 app, title, url string
 buf []byte
 closed chan struct{}
 ctx Writer
}

func NewFLVWriter(app, title, url string, ctx Writer) *FLVWriter {
 ret := &FLVWriter{
 Uid: uid.NewId(),
 app: app,
 title: title,
 url: url,
 ctx: ctx,
 RWBaser: av.NewRWBaser(time.Second * 10),
 closed: make(chan struct{}),
 buf: make([]byte, headerLen),
 }

 ret.ctx.Write(flvHeader)
 pio.PutI32BE(ret.buf[:4], 0)
 ret.ctx.Write(ret.buf[:4])
 return ret
}

func (writer *FLVWriter) Write(p *av.Packet) error {
 writer.RWBaser.SetPreTime()
 h := writer.buf[:headerLen]

 typeID := av.TAG_VIDEO
 if !p.IsVideo {
 if p.IsMetadata {
 var err error
 typeID = av.TAG_SCRIPTDATAAMF0
 p.Data, err = amf.MetaDataReform(p.Data, amf.DEL)
 if err != nil {
 return err
 }
 } else {
 typeID = av.TAG_AUDIO
 }
 }
 dataLen := len(p.Data)
 timestamp := p.TimeStamp
 timestamp += writer.BaseTimeStamp()
 writer.RWBaser.RecTimeStamp(timestamp, uint32(typeID))

 preDataLen := dataLen + headerLen
 timestampbase := timestamp & 0xffffff
 timestampExt := timestamp >> 24 & 0xff

 pio.PutU8(h[0:1], uint8(typeID))
 pio.PutI24BE(h[1:4], int32(dataLen))
 pio.PutI24BE(h[4:7], int32(timestampbase))
 pio.PutU8(h[7:8], uint8(timestampExt))

 if _, err := writer.ctx.Write(h); err != nil {
 return err
 }

 if _, err := writer.ctx.Write(p.Data); err != nil {
 return err
 }

 pio.PutI32BE(h[:4], int32(preDataLen))
 if _, err := writer.ctx.Write(h[:4]); err != nil {
 return err
 }

 return nil
}

func (writer *FLVWriter) Wait() {
 select {
 case <-writer.closed:
 return
 }
}

func (writer *FLVWriter) Close(error) {
 //writer.ctx.Close()
 close(writer.closed)
}

func (writer *FLVWriter) Info() (ret av.Info) {
 ret.UID = writer.Uid
 ret.URL = writer.url
 ret.Key = writer.app + "/" + writer.title
 return
}



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


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