Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (101)

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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (18853)

  • fatal error:libavcodec/avcodec.h No such file or directory

    23 avril 2018, par Colin0114

    I tried debug ffmpeg on my ubuntu1604 platform, but it always says that it cannot find the headfiles, but actually I did include headfiles in my compiling code.

    here is the error message:
    error message

    here is my test code :

    #include
    #include "libavcodec/avcodec.h"
    #include "libavformat/avformat.h"
    #include "libswscale/swscale.h"

    int main(int argc, char * argv[]){
    av_register_all();
    AVFormatContext *pFormatCtx = NULL;

    // Open video file
    if (avformat_open_input(&pFormatCtx, argv[1], NULL, NULL) !=0 )
       return -1; // Couldn't open file

    // Retrieve stream information
    if (avformat_find_stream_info(pFormatCtx, NULL) < 0)
       return -1; // Couldn't find stream information

    // Dump information about file onto standard error
    av_dump_format(pFormatCtx, 0, argv[1], 0);

    int i;
    AVCodecContext *pCodecCtxOrig = NULL;
    AVCodecContext *pCodecCtx = NULL;

    // Find the first video stream
    int videoStream = -1;
    for(i=0; inb_streams; i++)
       if (pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO){
           videoStream = 1;
           break;
       }

    if (videoStream == -1)
       return -1; // Didn't find a video stream

    // Get a pointer to the codec context for the video stream
    pCodecCtx = pFormatCtx->streams[videoStream]->codec;

    AVCodec *pCodec = NULL;
    // Find the decoder for the video stream
    pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
    if (pCodec==NULL){
       fprintf(stderr, "Unsupported codec!\n");
       return -1; // Codec not found
    }  

    // Copy context
    pCodecCtx = avcodec_alloc_context3(pCodec);
    if (avcodec_copy_context(pCodecCtx, pCodecCtxOrig) !=0 ){
       fprintf(stderr, "Couldn't copy codec context");
       return -1; // Error copying codec context
    }

    // Open codec
    if (avcodec_open2(pCodecCtx, pCodec, NULL)<0)
       return -1; // Could not open codec

    AVFrame *pFrame = NULL;
    // Allocate video fream
    pFrame = av_frame_alloc();

    // Allocate an AVFrame structure
    AVFrame *pFrameRGB = NULL;
    pFrameRGB = av_frame_alloc();
    if(pFrameRGB == NULL)
       return -1;
    }

    and the following is my Makefile

    C++     = gcc
    INCLUDE_DIR = ./include
    LIB_DIR     = ./lib
    BIN_DIR     = ./build/bin
    TARGET      = $(BIN_DIR)/mk-screen-caps

    INC_PATH    += -I./ -I$(INCLUDE_DIR)
    LIBS        += -lstdc++ -lm -lgcc_s -lgcc -lc
    LIBS        += $(LIB_DIR)/libavcodec.a $(LIB_DIR)/libavdevice.a
    $(LIB_DIR)/libavfilter.a
    LIBS        += $(LIB_DIR)/libavformat.a $(LIB_DIR)/libavutil.a
    $(LIB_DIR)/libfdk-aac.a
    LIBS        += $(LIB_DIR)/libmp3lame.a $(LIB_DIR)/libopus.a
    $(LIB_DIR)/libpostproc.a
    LIBS        += $(LIB_DIR)/libswresample.a $(LIB_DIR)/libswscale.a
    $(LIB_DIR)/libx264.a
    LIBS        += $(LIB_DIR)/libx265.a $(LIB_DIR)/libyasm.a

    C++_FLAGS   += -pipe -g -Wall -o0

    C_FILES     += $(wildcard ./*.c);
    CPP_FILES   += $(wildcard ./*.cpp)
    HEAD_FILES  += $(wildcard $(INCLUDE_DIR)/*.h)

    C_OBJS=$(C_FILES:.c=.o)
    CPP_OBJS=$(CPP_FILES:.cpp=.O)

    all: $(TARGET)
    $(TARGET): $(CPP_OBJS)
    $(C++)  $(C++_FLAGS) -o $@ $(CPP_FILES) $(LIBS)

    %.o: %.c $(HEAD_FILES)
       $(C++) -c $(C_FILES) $(INC_PATH) $< -o $@
    %.O: %.cpp $(HEAD_FILES)
       $(C++) -c $(CPP_FLAGS) $(INC_PATH) $< -o $@

    clean:
       rm -f $(TARGET) $(C_OBJS) $(CPP_OBJS)

    and the following is my directory information :

    mk-screen-caps (parent direcotry)

    —build

    —bin

    —include

    —(needed include files and directories)

    —lib

    —(needed libs)

  • Changing size video with ffmpeg, but output freezes

    24 juillet 2017, par Psykomusic

    I’m looking for a way to reduce the size of a video using FFmpeg.
    In fact my input file is an RTP real time stream 1024*720 MPEG2TS/h264 30fps. I want record 1 min. of this stream every time I want, but the size of the video is like 30 MB with this command :

    ffmpeg -y  -i rtp://192.168.1.3:5368 -c copy -t 60  toto.mp4

    I tried to reduce quality to reduce size with this command :

    ffmpeg -y  -i rtp://192.168.1.3:5368 -c:v libx264 -crf 23  toto.mp4

    and lot of other lines, I added options for bitrate -b:v 200k, framerate -r 5 and orthers...

    But every time I have the same problem, the video output freezes after 6 sec.
    Which option I have to use ? Why my output is corrupted ?

    EDIT :
    I think the freeze is because of the hardware of my embeded device. I use a gstreamer pipeline instead of the ffmpeg line .

    gst-launch-1.0 -e udpsrc port=5368 caps="application/x-rtp name=source ! queue ! rtpmp2tdepay ! aiurdemux streaming_latency=400 name=d d. ! queue ! vpudec ! decodebin ! videorate ! "video/x-raw,framerate=5/1" ! vpuenc_h264  bitrate=0 ! flvmux ! filesink location=toto.flv
  • Failed to build opencv for conda

    4 octobre 2016, par Caenorst

    I’m on Ubuntu 16.04 64 bits, using Anaconda2.

    I’m trying to install Opencv for conda with FFMPEG support (for VideoCapture).

    I followed this tutorial : http://dhaneshr.net/2016/06/03/installing-opencv-2-4-x-with-ffmpeg-python-on-anaconda/

    changed cmake to 3.3.1 and -DWITH_FFMPEG=1 but when I execute
    $ conda build conda

    It fails at the test to import cv2

    You can find the whole log in this file : https://gist.github.com/Caenorst/e6bce629178540f30818a66e2f3a8663