Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (100)

  • 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 (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (10494)

  • FFMpeg on Android, undefined references to libavcodec functions, although it is listed on command line

    1er juin 2016, par dimsuz

    I have a problem with unresolved references to ffmpeg’s libavcodec functions, so far failed to find the answer in other places (including my mind) :)

    Let me describe my setup - it takes space, but is really basic, it might be that I’m failing to see some error...

    I built an FFMPeg with ndk r5 toolchain, ffmpeg port I got from http://bambuser.com/opensource (as recommended in other questions here). It built fine, so I put several static libraries in my project like this :

    <project>/jni/bambuser_ffmpeg/libavcodec.a
    <project>/jni/bambuser_ffmpeg/libavformat.a
    <project>/jni/bambuser_ffmpeg/libavcore.a
    <project>/jni/bambuser_ffmpeg/libavutil.a
    </project></project></project></project>

    Next, I created an Android.mk in bambuser_ffmpeg folder to list these libs as a prebuilt ones :

    LOCAL_PATH := $(call my-dir)

    include $(CLEAR_VARS)
    LOCAL_MODULE := bambuser-libavcore
    LOCAL_SRC_FILES := libavcore.a
    include $(PREBUILT_STATIC_LIBRARY)

    include $(CLEAR_VARS)
    LOCAL_MODULE := bambuser-libavformat
    LOCAL_SRC_FILES := libavformat.a
    include $(PREBUILT_STATIC_LIBRARY)

    (same for other two libs)

    Next, I have another module which references these libs in its Android.mk, sets up include paths, etc :

    LOCAL_PATH := $(call my-dir)

    include $(CLEAR_VARS)

    LOCAL_MODULE := ffmpegtest
    LOCAL_STATIC_LIBRARIES := bambuser-libavcodec bambuser-libavcore bambuser-libavformat bambuser-libavutil
    LOCAL_SRC_FILES := ffmpeg_test.cpp
    LOCAL_C_INCLUDES := $(LOCAL_PATH)/../bambuser_ffmpeg/include
    LOCAL_LDLIBS    := -llog -lz

    include $(BUILD_SHARED_LIBRARY)

    And finally I have my ffmpeg_test.cpp which is really basic, like this :

    #include

    extern "C" {
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    }

    extern "C" {
       JNIEXPORT jint JNICALL Java_com_the7art_ffmpegtest_PaintThread_testFFMpeg(JNIEnv* env, jobject obj, jstring fileName);
    }

    JNIEXPORT jint JNICALL Java_com_the7art_ffmpegtest_PaintThread_testFFMpeg(JNIEnv* env, jobject obj, jstring fileName)
    {
       av_register_all();
       return 0;
    }

    When I run ndk-build, it compiles fine, but when linking it prints an unresolved reference to almost every function in libavcodec. Looks like only this lib’s functions are failing to be located :

    /home/dimka/src/mobile/android/ffmpegtest/obj/local/armeabi/libavformat.a(allformats.o) :
    In function

    av_register_all':
     /home/dimka/work/suzy/tmp/ffmpeg-android/ffmpeg/libavformat/allformats.c:47:
     undefined reference to
     

    avcodec_register_all’
    /home/dimka/src/mobile/android/ffmpegtest/obj/local/armeabi/libavformat.a(utils.o) :
    In function

    parse_frame_rate':
     /home/dimka/work/suzy/tmp/ffmpeg-android/ffmpeg/libavformat/utils.c:3240:
     undefined reference to
     

    av_parse_video_rate’
    /home/dimka/src/mobile/android/ffmpegtest/obj/local/armeabi/libavformat.a(utils.o) :
    In function

    parse_image_size':
     /home/dimka/work/suzy/tmp/ffmpeg-android/ffmpeg/libavformat/utils.c:3234:
     undefined reference to
     

    av_parse_video_size’
    /home/dimka/src/mobile/android/ffmpegtest/obj/local/armeabi/libavformat.a(utils.o) :
    In function

    flush_packet_queue':
     /home/dimka/work/suzy/tmp/ffmpeg-android/ffmpeg/libavformat/utils.c:1277:
     undefined reference to
     

    av_free_packet’
    /home/dimka/work/suzy/tmp/ffmpeg-android/ffmpeg/libavformat/utils.c:1283 :
    undefined reference to

    av_free_packet'
     /home/dimka/src/mobile/android/ffmpegtest/obj/local/armeabi/libavformat.a(utils.o):
     In function

    get_audio_frame_size’ :
    /home/dimka/work/suzy/tmp/ffmpeg-android/ffmpeg/libavformat/utils.c:766 :
    undefined reference to

    av_get_bits_per_sample'
     /home/dimka/src/mobile/android/ffmpegtest/obj/local/armeabi/libavformat.a(utils.o):
     In function
     

    ff_interleave_add_packet’ :
    /home/dimka/work/suzy/tmp/ffmpeg-android/ffmpeg/libavformat/utils.c:2909 :
    undefined reference to `av_dup_packet’

    and so on...

    I fail to figure why this is happening. I tried running ndk-build V=1 to check the actual linking command, and libavcodec is sitting there perfectly right, like it should. All other ffmpeg libs are there too.

    Any hints ?

  • FFMPEG : av_interleaved_write_frame() : Connection reset by peer

    9 mars 2017, par mrcatmann

    I try to broadcast a video from one of my servers to a RTMP server based on NGINX-RTMP. But sometimes there are reconnects because of bad network on RTMP server, and then ffmpeg gives me errors like

    av_interleaved_write_frame(): Connection reset by peer
    [flv @ 0x30351a0] Failed to update header with correct duration.
    [flv @ 0x30351a0] Failed to update header with correct filesize.
    Error writing trailer of (address): Connection reset by peer"

    Tried to use "reconnect" command, but it didn’t help me. The full FFMPEG command is :

    ffmpeg -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 4274 -re -i "(file)" -s 640x360 -aspect 16:9  -c copy -f flv "(stream address)"

    Is there a way to bypass this ? I can’t play the same video from the beginning in this situation, it needs to be continued from the same point.

  • WriteToUDP only works on local machine

    26 mai 2017, par Anderson Scouto da Silva

    This script captures a flow entry by ffmpeg and writes to a UDP address.

    The error is that it does not go to the internet, it only stays on the local machine.

    It is not a problem in my internet network, because I made a stream through VLC and opened in another PC and it works normally, with the same parameters, but in this my script is only in the local PC.

    Follow the pictures to help with the question :

    http://imgh.us/1_4575.jpg

    http://imgh.us/2_3278.jpg

    http://imgh.us/3_2694.jpg

    package main

    import (
       "os/exec"
       "io"
       "net"
       "log"
       "fmt"
    )

    func main() {
       // UDP connections
       conn, err := net.ListenUDP("udp", &amp;net.UDPAddr{IP: net.IPv4zero, Port: 0})
       if err != nil {
           log.Fatal(err)
       }

       // Set the write buffer on UDP
       err = conn.SetWriteBuffer(40 * 1024)
       if err != nil {
           log.Fatal(err)
       }

       inputSource := "C:/Users/Administrador/GoglandProjects/CASEncoder/in/teste-4k.mp4"

       // Starts ffmpeg capturing input
       cmdName := "ffmpeg"
       argsPipe1 := []string{
           "-hide_banner",
           "-loglevel", "panic",
           "-re",
           "-i",
           inputSource,
           "-preset",
           "superfast",
           "-c:v",
           "h264",
           "-crf",
           "0",
           "-c",
           "copy",
           "-f", "mpegts", "pipe:1",
       }
       cmdPipe1 := exec.Command(cmdName, argsPipe1...)

       stdoutPipe1, err := cmdPipe1.StdoutPipe()
       if err != nil {
           log.Fatal(err)
       }
       err = cmdPipe1.Start()
       if err != nil {
           log.Fatal(err)
       }

       chunk := make([]byte, 40 * 1024)
       for {
           // reads the output pipe from ffmpeg
           nr, err5 := stdoutPipe1.Read(chunk)
           fmt.Printf("Readed %d bytes\n", nr)

           if nr > 0 {
               validData := chunk[:nr]

               // write to UDP
               nw, err := conn.WriteToUDP(validData, &amp;net.UDPAddr{IP: net.IP{233, 10, 10, 13}, Port: 1234})
               fmt.Printf("Writed %d bytes\n", nw)
               if err != nil {
                   log.Fatal(err)
               }
           }

           if err5 != nil {
               // end of file
               if err5 == io.EOF {
                   break
               }
               continue
           }
       }
    }