
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (99)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
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 (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
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 (...)
Sur d’autres sites (10473)
-
avformat/hls : Factor playlist need check to a common function
19 novembre 2017, par Anssi Hannula -
xtea : Clarify that the current API works in big endian mode
11 novembre 2015, par Martin Storsjö -
WriteToUDP only works on same machine
26 mai 2017, par Anderson Scouto da SilvaThis script is intended to capture the output of ffmpeg and write to a UDP address.
It works correctly as I open the VLC 233.10.10.13:1234 and runs normally, but out of this computer the stream is not played, it’s as if the stream does not exit from the machine to the multicast network, but on the same PC it works normally, I run the script go and open the VLC to run, it works perfectly.
To take the doubts that might be some problem in the interfaces, I made a VLC stream by capturing 233.1.1.13:1234 and exiting to 233.10.10.13:1234 and I can run anywhere outside the machine where VLC is, for example, in another VLC on another machine. It just does not work in the script I wrote on go.
Can anyone help ?
package main
import (
"os/exec"
"io"
"strings"
"net"
"net/url"
"os"
"github.com/juju/loggo"
)
const (
BUFFER = 40 * 1024
DEBUG = true
)
func verificaErro(e error) {
if e != nil {
logger.Errorf(e.Error())
}
}
var logger loggo.Logger
func main() {
initLogger()
dir, _ := os.Getwd()
// conexão UDP
conn, err := net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: 0})
verificaErro(err)
err = conn.SetWriteBuffer(BUFFER)
verificaErro(err)
inputSource := dir + "/in/teste-4k.mp4"
inputSource = normalizeInputSource(inputSource)
inputCodec := probeInputCodec(inputSource)
outputCodec := probeOutputCodec(inputCodec)
cmdName := "ffmpeg"
argsPipe1 := []string{
"-hide_banner",
"-loglevel", "panic",
"-re",
"-i",
inputSource,
"-preset",
"superfast",
"-c:v",
inputCodec,
"-crf",
"0",
"-c",
"copy",
"-f", outputCodec, "pipe:1",
}
cmdPipe1 := exec.Command(cmdName, argsPipe1...)
logger.Debugf(strings.Join(argsPipe1, " "))
stdoutPipe1, err := cmdPipe1.StdoutPipe()
verificaErro(err)
err2 := cmdPipe1.Start()
verificaErro(err2)
chunk := make([]byte, BUFFER)
for {
nr, err5 := stdoutPipe1.Read(chunk)
logger.Debugf("Lido %d bytes\n", nr)
if nr > 0 {
validData := chunk[:nr]
nw, err6 := conn.WriteToUDP(validData, &net.UDPAddr{IP: net.IP{233, 10, 10, 13}, Port: 1234})
logger.Debugf("Escrito %d bytes\n", nw)
verificaErro(err6)
}
if err5 != nil {
// fim do arquivo
if err5 == io.EOF {
break
}
logger.Errorf("Erro = %v\n", err5)
continue
}
}
}
func probeInputCodec(input string) string {
cmdName := "ffprobe"
args := []string{
"-v", "error",
"-select_streams", "v:0", "-show_entries",
"stream=codec_name", "-of", "default=noprint_wrappers=1:nokey=1",
input,
}
out, err := exec.Command(cmdName, args...).Output()
verificaErro(err)
return strings.TrimSpace(string(out))
}
func probeOutputCodec(inputCode string) string {
switch inputCode {
case "h264":
return "mpegts"
case "mpeg4":
return "mpeg4"
}
return "mpegts"
}
func normalizeInputSource(inputSource string) (string) {
isFile := false
if _, err := os.Stat(inputSource); err == nil {
isFile = true
}
if isFile {
return inputSource
}
u, err := url.Parse(inputSource)
verificaErro(err)
if u.Scheme != "udp" && u.Scheme != "tcp" {
errorMessage := "A entrada deve ser uma URL UDP/TCP ou um arquivo existente"
logger.Errorf(errorMessage)
os.Exit(1)
}
q := u.Query()
if u.Scheme == "udp" {
q.Set("overrun_nonfatal", "1")
q.Set("fifo_size", "1000000")
q.Set("buffer_size", "26214400")
}
u.RawQuery = q.Encode()
return u.String()
}
func initLogger() {
logger = loggo.GetLogger(loggo.DefaultWriterName)
if DEBUG {
logger.SetLogLevel(loggo.DEBUG)
} else {
logger.SetLogLevel(loggo.ERROR)
}
}