Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (71)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (15026)

  • Ffmpeg library compilation .(without pkg-config) in linux ubuntu

    2 novembre 2023, par Mohideen Irfan

    I have been trying to use ffmpeg libraries in my C code. But when i compile those libraries using pkg-config tool in linux terminal it works. But when i directly linked all the necessary libraries , it won't work. I even specified the library path in -L flag and LD_LIBRARY_PATH. even included the -I flag correctly. But when i use pkg-config it works, if i use directly it wont work. I also export LD_LIBRARY_PATH.

    


    here is my C program Sample.c :

    


    #include &#xA;#include <libavformat></libavformat>avformat.h>&#xA;&#xA;&#xA;int main(int argc, char *argv[]) {&#xA;    if (argc &lt; 2) {&#xA;        printf("Please provide a video file as an argument.\n");&#xA;        return -1;&#xA;    }&#xA;&#xA;//    av_register_all();&#xA;&#xA;    AVFormatContext *pFormatCtx = NULL;&#xA;    if (avformat_open_input(&amp;pFormatCtx, argv[1], NULL, NULL) != 0) {&#xA;        printf("Could not open the file.\n");&#xA;        return -1;&#xA;    }&#xA;&#xA;    if (avformat_find_stream_info(pFormatCtx, NULL) &lt; 0) {&#xA;        printf("Could not find stream information.\n");&#xA;        return -1;&#xA;    }&#xA;&#xA;    av_dump_format(pFormatCtx, 0, argv[1], 0);&#xA;&#xA;    avformat_close_input(&amp;pFormatCtx);&#xA;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    here is the package file of libavformat.pc :

    &#xA;

    prefix=/home/mohideen-ts205/ffmpeg_build&#xA;exec_prefix=${prefix}&#xA;libdir=/home/mohideen-ts205/ffmpeg_build/lib&#xA;includedir=/home/mohideen-ts205/ffmpeg_build/include&#xA;&#xA;Name: libavformat&#xA;Description: FFmpeg container format library&#xA;Version: 60.17.100&#xA;Requires: libavcodec >= 60.32.102, libswresample >= 4.13.100, libavutil >= 58.30.100&#xA;Requires.private: &#xA;Conflicts:&#xA;Libs: -L${libdir}  -lavformat -lm -latomic -lz -lgnutls -pthread -lgmp -lunistring -lidn2     -latomic -lhogweed -lgmp -lnettle -ltasn1 -lp11-kit&#xA;Libs.private: &#xA;Cflags: -I${includedir}&#xA;

    &#xA;

    libavutil.pc :

    &#xA;

    prefix=/home/mohideen-ts205/ffmpeg_build&#xA;exec_prefix=${prefix}&#xA;libdir=/home/mohideen-ts205/ffmpeg_build/lib&#xA;includedir=/home/mohideen-ts205/ffmpeg_build/include&#xA;&#xA;Name: libavutil&#xA;Description: FFmpeg utility library&#xA;Version: 58.30.100&#xA;Requires: &#xA;Requires.private: &#xA;Conflicts:&#xA;Libs: -L${libdir}  -lavutil -pthread -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lm -lva -latomic -lX11 -lpthread -lxcb -lXau -lXdmcp&#xA;Libs.private: &#xA;Cflags: -I${includedir}&#xA;

    &#xA;

    And here the command :&#xA;with pkg config- working one :

    &#xA;

    gcc -o sample sample.c $(pkg-config --libs libavutil libavformat libavcodec)&#xA;

    &#xA;

    without it directly linking :

    &#xA;

    gcc -o my_program -I/home/mohideen-ts205/ffmpeg_build/include -L/home/mohideen-ts205/ffmpeg_build/lib -lavformat&#xA;

    &#xA;

    NOTE : I even tried to copy all the library files mentioned in libavutil.pc and libavformat.pc, but still i am getting this undefined reference error. what kind of problem it is.

    &#xA;

    /usr/bin/ld: /tmp/ccoCfZjA.o: in function `main&#x27;:&#xA;sample.c:(.text&#x2B;0x63): undefined reference to `avformat_open_input&#x27;&#xA;/usr/bin/ld: sample.c:(.text&#x2B;0x8b): undefined reference to `avformat_find_stream_info&#x27;&#xA;/usr/bin/ld: sample.c:(.text&#x2B;0xc3): undefined reference to `av_dump_format&#x27;&#xA;/usr/bin/ld: sample.c:(.text&#x2B;0xcf): undefined reference to `avformat_close_input&#x27;&#xA;collect2: error: ld returned 1 exit status&#xA;

    &#xA;

  • ffmpeg stucks after each song

    11 juin 2017, par Halfbax

    When I start to stream to youtube, it works fine. Until the first song is over. After it the stream is in a loop of the last 20 seconds. I dont know why. The next song wont ever streamed.

    The audio stream is lag-free. <- tested

    case $1 in
                   start)
                           # VLC audio stream
                           su vlc -c "screen -dmS $VLC_PID_NAME cvlc --random /home/music/chill/*.mp3 --sout '#transcode{vcodec=none,acodec=mp3,ab=128}:standard{access=http,mux=raw,dst=localhost:8080/live.ogg}'"

                           sleep 2
                           # FFMPEG
                           # Static image + vlc audio stream
                           screen -dmS $FFMPEG_PID_NAME ffmpeg -loop 1 -framerate 2 -i '/home/forest.jpg' -i 'http://localhost:8080/live.ogg' -s "$INRES" -r "$FPS" -f alsa -ac 2 -vcodec libx264 -s "$OUTRES" -g 2 -acodec libmp3lame -b:a 128k -b:v 200k -ar 44100 -threads 0 -preset:v "$QUAL" -f flv "rtmp://a.rtmp.youtube.com/live2/$STREAM_KEY"
                           ;;
  • Unable to execute CLI commands through PHP

    13 janvier 2012, par user940154

    OS : ubuntu 11.10
    Webserver : Apache
    Code : PHP
    I am trying to display the output of command "ffmpeg -i " on the webpage using php.
    Required : The webpage should show the information about video (text).
    Whats happening : The webpage shows no text output on running the php code.
    If I was however doing system("ls") the code runs fine and outputs the list of files.
    Here's my code

    &lt;?php
    echo "Details of video file:";
    system(&#39;ffmpeg -i /home/atish/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi&#39;);
    ?>

    The same command works fine on my shell, and my system has ffmpeg installed. Here's a snapshot of executing this command directly on shell :

    ThinkPad-T420:~/Videos$ ffmpeg -i /home/xx/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi
    ffmpeg version git-2012-01-10-7e2ba2d Copyright (c) 2000-2012 the FFmpeg developers
    built on Jan 10 2012 12:01:19 with gcc 4.6.1
    configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-    amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
     libavutil      51. 34.100 / 51. 34.100
     libavcodec     53. 54.100 / 53. 54.100
     libavformat    53. 29.100 / 53. 29.100
     libavdevice    53.  4.100 / 53.  4.100
     libavfilter     2. 58.100 /  2. 58.100
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0.  6.100 /  0.  6.100
     libpostproc    51.  2.100 / 51.  2.100
     Input #0, avi, from &#39;/home/atish/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi&#39;:
     Metadata:
     encoder         : Lavf52.23.1
     Duration: 00:00:29.00, start: 0.000000, bitrate: 124422 kb/s
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 25 tbr, 25 tbn, 25 tbc
     At least one output file must be specified

    I have tried appending "DISPLAY=:0" to my command and also done "xhost +" before running php code, but nothing is helping me out.

    Thanks.