
Recherche avancée
Autres articles (51)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Prérequis à l’installation
31 janvier 2010, parPréambule
Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
Il (...)
Sur d’autres sites (9601)
-
avcodec/libopenh264dec : Increase array sizes, fix stack-buffer overread
6 décembre 2021, par Andreas Rheinhardtavcodec/libopenh264dec : Increase array sizes, fix stack-buffer overread
av_image_copy() expects an array of four pointers and linesizes
according to its declaration ; it currently only pointers that are
actually in use (depending upon the pixel format), but this might
change at any time. It has already happened for the linesizes in
d7bc52bf456deba0f32d9fe5c288ec441f1ebef5 and so increasing their
array fixes a stack-buffer overread.This fixes a -Wstringop-overflow= and -Wstringop-overread warning
from GCC 11.2.Reviewed-by : Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.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.


-
avcodec/mpegvideo : Make inlining is_mpeg12 more flexible
14 octobre 2022, par Andreas Rheinhardtavcodec/mpegvideo : Make inlining is_mpeg12 more flexible
There are two types of checks for whether the current codec
is MPEG-1/2 in mpv_reconstruct_mb_internal() : Those that are
required for correctness and those that are not ; an example
of the latter is "is_mpeg12 || (s->codec_id != AV_CODEC_ID_WMV2)".
The reason for the existence of such checks is that
mpv_reconstruct_mb_internal() has the av_always_inline attribute
and is_mpeg12 is usually inlined, so that in case we are dealing
with MPEG-1/2 the above check can be completely optimized away.But is_mpeg12 is not always inlined : it is not in case
CONFIG_SMALL is true in which case is_mpeg12 is always zero,
so that the checks required for correctness need to check
out_format explicitly. This is currently done via a macro
in mpv_reconstruct_mb_internal(), so that the fact that
it is CONFIG_SMALL that determines this is encoded at two places.This commit changes this by making is_mpeg12 a three-state :
DEFINITELY_MPEG12, MAY_BE_MPEG12 and NOT_MPEG12. In the second
case, one has to resort to check out_format, in the other cases
is_mpeg12 can be taken at face-value. This will allow to make
inlining is_mpeg12 more flexible in a future commit.Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>