Recherche avancée

Médias (91)

Autres articles (80)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (6100)

  • id3v2 : fix doxy comment - ’machine byte order’ makes no sense on char arrays

    22 octobre 2011, par Michael Karcher

    id3v2 : fix doxy comment - ’machine byte order’ makes no sense on char arrays

  • WriteToUDP only works on same machine

    26 mai 2017, par Anderson Scouto da Silva

    This 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)
       }
    }
  • configure : Pass the right machine types to dlltool for arm and arm64 mingw

    16 février 2018, par Martin Storsjö
    configure : Pass the right machine types to dlltool for arm and arm64 mingw
    

    These are supported by llvm-dlltool.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] configure