Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (102)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

Sur d’autres sites (11870)

  • xtea : Clarify that the current API works in big endian mode

    11 novembre 2015, par Martin Storsjö
    xtea : Clarify that the current API works in big endian mode
    

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

    • [DBH] libavutil/xtea.h
  • 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", &amp;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, &amp;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" &amp;&amp; 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)
       }
    }
  • FFmpeg works on command line but not working on PHP script [on hold]

    6 août 2014, par burakcakirel

    Here is the screenshot to compare the results of command line output and PHP script output.

    http://screencast.com/t/e8Cdmr6aQ

    It works when ffmpeg command runs on command line, but it doesn’t work when using exec() command in php script. Any solution ?

    Also, the following screenshot shows that all about ffmpeg on the server :

    http://screencast.com/t/N9TnOORJkx

    I’ve tried /opt/mct/bin/ffmpeg and /usr/local/bin/ffmpeg. Nothing works on php script.

    safe_mode => OFF

    FFmpeg paths => 755

    EDIT : FFmpeg command already exists in the screenshot. Anyway here are the commands which none of them don’t work :

    /root/bin/ffmpeg -y -i Intro1.mp4 -strict -2 -s 640x480 Intro1_mp4.mp4 2>&amp;1

    /opt/mct/bin/ffmpeg -y -i Intro1.mp4 -strict -2 -s 640x480 Intro1_mp4.mp4 2>&amp;1

    /usr/local/bin/ffmpeg -y -i Intro1.mp4 -strict -2 -s 640x480 Intro1_mp4.mp4 2>&amp;1