Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (32)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (4769)

  • Audio object type 3 is not supported

    3 octobre 2013, par Ardoramor

    I am running into an issue with a custom-built ffmpeg. Basically, its a vanilla ffmpeg with x264 and fdk-aac libs enabled. I am feeding an SDP file through ffmpeg API and get the following error while passing the info to avcodec_open2 :

    Audio object type 3 is not supported

    My SDP file :

    v=0
    o=- 0 0 IN IP4 127.0.0.1
    s=Unnamed
    i=N/A
    c=IN IP4 192.168.1.1
    t=0 0
    a=recvonly
    m=audio 8204 RTP/AVP 96
    a=rtpmap:96 mpeg4-generic/32000
    a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1a88; SizeLength=13; IndexLength=3; IndexDeltaLength=3;
    a=control:trackID=0
    m=video 8202 RTP/AVP 96
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1;profile-level-id=428028;sprop-parameter-sets=Z0KAKJWgKA9E,aM48gA==;
    a=control:trackID=1
    m=application 8206 RTP/AVP 96
    a=rtpmap:96 smpte336m/10
    a=control:trackID=2

    The following is the output I get from ffmpeg as I open the input, dump its format, and try to open input streams :

    Format sdp probed with size=2048 and score=50
    audio codec set to : aac
    audio samplerate set to : 32000
    audio channels set to : 1
    video codec set to : h264
    RTP Packetization Mode : 1
    RTP Profile IDC : 42 Profile IOP : 80 Level : 28
    Extradata set to 0xc8d3dc0 (size : 21) !
    File position before avformat_find_stream_info() is 522
    Audio object type 3 is not supported.
    Could not find codec parameters for stream 1 (Video : h264) : unspecified size
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    File position after avformat_find_stream_info() is 522
    Dumping input AV format
    Input #0, sdp, from 'conf/test.sdp' :

    Metadata :
    title :Unnamed
    comment :N/A

    Duration:N/A, bitrate:N/A

    Stream #0:0, 0, 1/32000: Audio: aac, 32000 Hz, 1 channels, fltp  

    Stream #0:1, 0, 1/90000: Video: h264, 90k tbr, 90k tbn, 180k tbc  

    Stream #0:2, 0, 1/90000: Data: none, 0/1  

    Audio object type 3 is not supported.

    I also see the error reported for not finding codec parameters for stream 1 :

    Could not find codec parameters for stream 1 (Video : h264) : unspecified size
    Consider increasing the value for the 'analyzeduration' and 'probesize' options

    However, I think that is due to me not running an actual rtp at the moment of the test.

    In any case, what may be the reason for getting audio object type 3 not supported exception ?

    UPDATE - Oct 02, 2013

    Static ffmpeg build gives the following flags :

    Static ffmpeg 2.0.1 build flag output :

    ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
     built on Sep 30 2013 22:24:00 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-54)
     configuration: --enable-gpl --enable-nonfree --enable-shared
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-libdc1394 --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping

    My build is from ffmpeg 2.0.1 snapshot with the following flags :

    --enable-static --disable-shared --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfaac --enable-libmp3lame --enable-libx264 --disable-symver --disable-doc --disable-ffplay --enable-ffmpeg --disable-ffprobe --disable-ffserver --disable-avdevice --disable-avfilter --disable-filters --disable-devices --disable-everything --enable-avformat --enable-avcodec --enable-muxers --enable-protocols --enable-parsers --enable-demuxers --enable-decoders --enable-encoders --enable-bsfs --enable-network --enable-swscale  --disable-demuxer=sbg --disable-demuxer=dts --disable-parser=dca --disable-decoder=dca --enable-asm --enable-pthreads --enable-version3

    The fdk-aac library version I'm using :

    fdk-aac - 0.1.2

    So it seems that the same .sdp file causes Audio object type 3 error with my build but not with static but I really do not see what causes it (granted I am not an expert with ffmpeg API and may simply miss important details).

    Simplified code for opening .sdp file that doesn't include error checks and logic separation :

    AVFormatContext *inputContext = NULL;

    av_register_all();
    avformat_network_init();

    avformat_open_input(&inputContext, "test.sdp", NULL, NULL);
    avformat_find_stream_info(inputContext, NULL);

    int inAudioStreamIdx = av_find_best_stream(inputContext, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0);
    AVStream *st = inputContext->streams[inAudioStreamIdx];

    AVCodecContext *dec_ctx = st->codec;
    AVCodec *dec = avcodec_find_decoder(dec_ctx->codec_id);

    avcodec_open2(dec_ctx, dec, NULL); // Fails here with Audio object type 3

    Am I opening the sdp input improperly ?

  • When using ffmpeg api, the encoded gif is output to the dynamically applied buffer

    5 septembre 2023, par yangjinhui2936

    Purpose:I want to use ffmpeg to encode data from rbg8 to gif format.Currently can be encoded into file output.

    


    But I don't know how to store the gif directly in the buffer instead of saving it in the file.

    


    Below is the text of the code:
input_w560_h1280.rgb8

    


    #include &#xA;#include &#xA;#include &#xA;#include &#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavutil></libavutil>imgutils.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libswscale></libswscale>swscale.h>&#xA;#include <libavdevice></libavdevice>avdevice.h>&#xA;&#xA;#define CONFIG_FBDEV_OUTDEV 1&#xA;#define GET_DATA_TO_BUFF 0&#xA;&#xA;int readFileToBuffer(uint8_t *dst, const char* filename, long* fileSize) {&#xA;    FILE* file = fopen(filename, "rb");&#xA;    if (!file || dst == NULL) {&#xA;        fprintf(stderr, "cannot open file: %s %p\n", filename, dst);&#xA;        return -1;&#xA;    }&#xA;&#xA;    fseek(file, 0, SEEK_END);&#xA;    *fileSize = ftell(file);&#xA;    fseek(file, 0, SEEK_SET);&#xA;&#xA;    uint8_t *buffer = NULL;&#xA;    buffer = dst;&#xA;    if (!buffer) {&#xA;        fprintf(stderr, "buffer error\n");&#xA;        fclose(file);&#xA;        return -1;&#xA;    }&#xA;&#xA;    // fread file to buffer&#xA;    if (fread(buffer, 1, *fileSize, file) != *fileSize) {&#xA;        fprintf(stderr, "read file failed size %ld\n", *fileSize);&#xA;        fclose(file);&#xA;        free(buffer);&#xA;        return -1;&#xA;    }&#xA;&#xA;    fclose(file);&#xA;    return 0;&#xA;}&#xA;&#xA;int writeBufferToFile(const char* filename, uint8_t* buffer, long bufferSize) {&#xA;    FILE* file = fopen(filename, "wb");&#xA;    if (!file) {&#xA;        fprintf(stderr, "cannot open: %s\n", filename);&#xA;        return -1;&#xA;    }&#xA;&#xA;    if (fwrite(buffer, 1, bufferSize, file) != bufferSize) {&#xA;        fprintf(stderr, "cannot fwrite\n");&#xA;        fclose(file);&#xA;        return -1;&#xA;    }&#xA;&#xA;    fclose(file);&#xA;    return 0;&#xA;}&#xA;&#xA;int main() {&#xA;    const char *output_filename = "output.gif";&#xA;    const char *input_filename = "input_w560_h1280.rgb8";&#xA;    int width = 560;&#xA;    int height = 1280;&#xA;&#xA;    avcodec_register_all();&#xA;    avdevice_register_all();&#xA;    av_register_all();&#xA;&#xA;    av_log_set_level(AV_LOG_MAX_OFFSET);&#xA;&#xA;    AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_GIF);&#xA;    if (!codec) {&#xA;        printf("GIF encoder not found.\n");&#xA;        return 1;&#xA;    }&#xA;    &#xA;    AVCodecContext *codecContext = avcodec_alloc_context3(codec);&#xA;    if (!codecContext) {&#xA;        printf("Could not allocate codec codecContext.\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    codecContext->width = width;&#xA;    codecContext->height = height;&#xA;    codecContext->pix_fmt = AV_PIX_FMT_RGB8;&#xA;    codecContext->time_base = (AVRational){1, 25};&#xA;    &#xA;    if (avcodec_open2(codecContext, codec, NULL) &lt; 0) {&#xA;        printf("Could not open codec.\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    AVFormatContext *outputFormatContext = NULL;&#xA;    if (avformat_alloc_output_context2(&amp;outputFormatContext, NULL, NULL, output_filename) &lt; 0) {&#xA;        printf("Could not allocate output format codecContext.\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    AVStream *stream = avformat_new_stream(outputFormatContext, NULL);&#xA;    if (!stream) {&#xA;        printf("Could not create stream.\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    AVCodecParameters *codec_params = stream->codecpar;&#xA;    avcodec_parameters_from_context(codec_params, codecContext);&#xA;&#xA;    if (avio_open(&amp;outputFormatContext->pb, output_filename, AVIO_FLAG_WRITE) &lt; 0) {&#xA;        printf("Could not open output file.\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    /* write header for output */&#xA;    if(avformat_write_header(outputFormatContext, NULL) &lt; 0)&#xA;    {&#xA;        printf("avformat_write_header failed\n");&#xA;    }&#xA;&#xA;    // creat and init frame&#xA;    AVFrame *frame = av_frame_alloc();&#xA;    frame->format = AV_PIX_FMT_RGB8;&#xA;    frame->width = width;&#xA;    frame->height = height;&#xA;    /* check frame buff */&#xA;    if (av_frame_get_buffer(frame, 0) &lt; 0) {&#xA;        printf("Failed to allocate frame buffer.\n");&#xA;        return -1;&#xA;    }&#xA;&#xA;    /* read rgb data to  frame->data[0] */&#xA;    uint8_t *rgb8data = (uint8_t *)av_malloc(width * height * 3);&#xA;    long read_size = 0;&#xA;    int ret = readFileToBuffer(rgb8data, input_filename, &amp;read_size);&#xA;    if (ret != 0 || read_size == 0)&#xA;    {&#xA;        printf("error argbData %p read_size %ld\n", rgb8data, read_size);&#xA;    }&#xA;    /* cp input data to frame */&#xA;    av_image_copy_plane(frame->data[0], frame->linesize[0], rgb8data, width, width, height);&#xA;&#xA;    // Init IOcontext (try to get the gif stream)&#xA;    #if GET_DATA_TO_BUFF&#xA;    AVIOContext *outputIoContext = NULL;&#xA;&#xA;    if (avio_open_dyn_buf(&amp;outputIoContext) &lt; 0) {&#xA;        printf("Failed to open output buffer.\n");&#xA;        return -1;&#xA;    }&#xA;    #endif&#xA;    // Encoding loop (simulated frames)&#xA;    AVPacket pkt;&#xA;    av_init_packet(&amp;pkt);&#xA;    pkt.data = NULL;&#xA;    pkt.size = 0;&#xA;    avcodec_send_frame(codecContext, frame);&#xA;&#xA;    while (avcodec_receive_packet(codecContext, &amp;pkt) == 0) {&#xA;        pkt.stream_index = stream->index;&#xA;        #if GET_DATA_TO_BUFF // try to get the gif stream&#xA;        avio_write(outputIoContext, pkt.data, pkt.size);&#xA;        #endif&#xA;        av_write_frame(outputFormatContext, &amp;pkt);&#xA;        av_packet_unref(&amp;pkt);&#xA;    }&#xA;    /* write end */&#xA;    av_write_trailer(outputFormatContext);&#xA;    // try to get the gif stream&#xA;    #if GET_DATA_TO_BUFF&#xA;    uint8_t *outputBuffer;&#xA;    int outputBufferSize = avio_close_dyn_buf(outputIoContext, &amp;outputBuffer);&#xA;    writeBufferToFile("bf_1.gif", outputBuffer, outputBufferSize);&#xA;    #endif&#xA;    /* free */&#xA;    avformat_close_input(&amp;outputFormatContext);&#xA;    av_frame_free(&amp;frame);&#xA;    avcodec_free_context(&amp;codecContext);&#xA;    av_free(rgb8data);&#xA;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    MAKEFILE

    &#xA;

    CC = gcc&#xA;CFLAGS = -Wall -g&#xA;CFLAGS &#x2B;= -I ../output/include&#xA;CFLAGS &#x2B;= -L ../output/lib&#xA;LIBS = -l:libavdevice.a -l:libavformat.a -l:libavcodec.a -lavfilter -lswresample -lswscale -l:libavutil.a -lpthread -lz  -lbz2 -lm -ldl&#xA;&#xA;all: encode_to_gif&#xA;&#xA;encode_to_gif: encode_to_gif.c&#xA;    $(CC) $(CFLAGS) -o $@ $&lt; $(LIBS)&#xA;

    &#xA;

    Tried The content in the macro definition is the relevant solution I found online. Unfortunately, the data I got is in original rgb8 format, not in gif format.ffmpeg writes data to file and Data dumped from buffer&#xA;The data dumped from the buffer seems to have no gif header

    &#xA;

    My expected result I want to output the encoded gif directly to the buffer,but i don't know what to do.

    &#xA;

    &#xA;

  • compile librtmp for android error : cannot find -ldl collect2 : error : ld returned 1 exit status

    6 mai 2014, par hosein

    I have problem on comple librtmp for android using :
    https://github.com/OnlyInAmerica/FFmpeg-Android

    ./build_librtmp_for_android.sh

    /home/user/loc_app/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_so.o: No such file or directory
    /home/user/loc_app/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_so.o: No such file or directory
    /home/user/loc_app/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lssl
    /home/user/loc_app/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrypto
    /home/user/loc_app/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lz
    /home/user/loc_app/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
    /home/user/loc_app/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
    collect2: error: ld returned 1 exit status
    make: *** [librtmp.so.1] Error 1

    here is build_librtmp_for_android.sh :

    #!/bin/bash
    NDK=/home/user/loc_app/android-ndk-r9
    #/home/user/loc_app/android-ndk-r9/platforms/android-19/arch-arm
    SYSROOT=$NDK/platforms/android-18/arch-arm
    #platforms/android-19/arch-arm/
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
    #/home/user/loc_app/android-ndk-r9/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
    OPENSSL_DIR=/home/user/libs/openssl-android-master/
    # Note: Change the above variables for your system.
    function build_one
    {
       set -e
       make clean
       ln -s ${SYSROOT}usr/lib/crtbegin_so.o
       ln -s ${SYSROOT}usr/lib/crtend_so.o
       export XLDFLAGS="$ADDI_LDFLAGS -L${OPENSSL_DIR}libs/armeabi -L${SYSROOT}usr/lib "
       export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi-
       export XCFLAGS="${ADDI_CFLAGS} -I${OPENSSL_DIR}include -isysroot ${SYSROOT}"
       export INC="-I${SYSROOT}"
       make prefix=\"${PREFIX}\" OPT= install
    }
    CPU=arm
    PREFIX=$(pwd)/android/$CPU
    ADDI_CFLAGS="-marm"
    build_one

    OS : Fedora 64bit

    EDIT 1 : that seems to Makefile so i added it here

    VERSION=v2.4

    prefix=/usr/local

    incdir=$(prefix)/include/librtmp
    bindir=$(prefix)/bin
    libdir=$(prefix)/lib
    mandir=$(prefix)/man
    BINDIR=$(DESTDIR)$(bindir)
    INCDIR=$(DESTDIR)$(incdir)
    LIBDIR=$(DESTDIR)$(libdir)
    MANDIR=$(DESTDIR)$(mandir)

    CC=$(CROSS_COMPILE)gcc
    LD=$(CROSS_COMPILE)ld
    AR=$(CROSS_COMPILE)ar

    SYS=posix
    CRYPTO=OPENSSL
    #CRYPTO=GNUTLS
    DEF_POLARSSL=-DUSE_POLARSSL
    DEF_OPENSSL=-DUSE_OPENSSL
    DEF_GNUTLS=-DUSE_GNUTLS
    DEF_=-DNO_CRYPTO
    REQ_GNUTLS=gnutls,hogweed,nettle
    REQ_OPENSSL=libssl,libcrypto
    PUB_GNUTLS=-lgmp
    LIBZ=-lz
    LIBS_posix=
    LIBS_darwin=
    LIBS_mingw=-lws2_32 -lwinmm -lgdi32
    LIB_GNUTLS=-lgnutls -lhogweed -lnettle -lgmp $(LIBZ)
    LIB_OPENSSL=-lssl -lcrypto $(LIBZ)
    LIB_POLARSSL=-lpolarssl $(LIBZ)
    PRIVATE_LIBS=$(LIBS_$(SYS))
    CRYPTO_LIB=$(LIB_$(CRYPTO)) $(PRIVATE_LIBS)
    CRYPTO_REQ=$(REQ_$(CRYPTO))
    CRYPTO_DEF=$(DEF_$(CRYPTO))
    PUBLIC_LIBS=$(PUB_$(CRYPTO))

    SO_VERSION=1
    SOX_posix=so
    SOX_darwin=dylib
    SOX_mingw=dll
    SOX=$(SOX_$(SYS))
    SO_posix=.$(SOX).$(SO_VERSION)
    SO_darwin=.$(SO_VERSION).$(SOX)
    SO_mingw=-$(SO_VERSION).$(SOX)
    SO_EXT=$(SO_$(SYS))

    SODIR_posix=$(LIBDIR)
    SODIR_darwin=$(LIBDIR)
    SODIR_mingw=$(BINDIR)
    SODIR=$(SODIR_$(SYS))

    SO_LDFLAGS_posix=-shared -Wl,-soname,$@
    SO_LDFLAGS_darwin=-dynamiclib -twolevel_namespace -undefined dynamic_lookup \
       -fno-common -headerpad_max_install_names -install_name $(libdir)/$@
    SO_LDFLAGS_mingw=-shared -Wl,--out-implib,librtmp.dll.a
    SO_LDFLAGS=$(SO_LDFLAGS_$(SYS))

    INSTALL_IMPLIB_posix=
    INSTALL_IMPLIB_darwin=
    INSTALL_IMPLIB_mingw=cp librtmp.dll.a $(LIBDIR)
    INSTALL_IMPLIB=$(INSTALL_IMPLIB_$(SYS))

    SHARED=yes
    SODEF_yes=-fPIC
    SOLIB_yes=librtmp$(SO_EXT)
    SOINST_yes=install_so
    SO_DEF=$(SODEF_$(SHARED))
    SO_LIB=$(SOLIB_$(SHARED))
    SO_INST=$(SOINST_$(SHARED))

    DEF=-DRTMPDUMP_VERSION=\"$(VERSION)\" $(CRYPTO_DEF) $(XDEF)
    OPT=-O2
    CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) $(SO_DEF)
    LDFLAGS=$(XLDFLAGS)


    OBJS=rtmp.o log.o amf.o hashswf.o parseurl.o

    all:    librtmp.a $(SO_LIB)

    clean:
       rm -f *.o *.a *.$(SOX) *$(SO_EXT) librtmp.pc

    librtmp.a: $(OBJS)
       $(AR) rs $@ $?

    librtmp$(SO_EXT): $(OBJS)
       $(CC) $(SO_LDFLAGS) $(LDFLAGS) -o $@ $^ $> $(CRYPTO_LIB)
       ln -sf $@ librtmp.$(SOX)

    log.o: log.c log.h Makefile
    rtmp.o: rtmp.c rtmp.h rtmp_sys.h handshake.h dh.h log.h amf.h Makefile
    amf.o: amf.c amf.h bytes.h log.h Makefile
    hashswf.o: hashswf.c http.h rtmp.h rtmp_sys.h Makefile
    parseurl.o: parseurl.c rtmp.h rtmp_sys.h log.h Makefile

    librtmp.pc: librtmp.pc.in Makefile
       sed -e "s;@prefix@;$(prefix);" -e "s;@libdir@;$(libdir);" \
           -e "s;@VERSION@;$(VERSION);" \
           -e "s;@CRYPTO_REQ@;$(CRYPTO_REQ);" \
           -e "s;@PUBLIC_LIBS@;$(PUBLIC_LIBS);" \
           -e "s;@PRIVATE_LIBS@;$(PRIVATE_LIBS);" librtmp.pc.in > $@

    install:    install_base $(SO_INST)

    install_base:   librtmp.a librtmp.pc
       -mkdir -p $(INCDIR) $(LIBDIR)/pkgconfig $(MANDIR)/man3 $(SODIR)
       cp amf.h http.h log.h rtmp.h $(INCDIR)
       cp librtmp.a $(LIBDIR)
       cp librtmp.pc $(LIBDIR)/pkgconfig
       cp librtmp.3 $(MANDIR)/man3

    install_so: librtmp$(SO_EXT)
       cp librtmp$(SO_EXT) $(SODIR)
       $(INSTALL_IMPLIB)
       cd $(SODIR); ln -sf librtmp$(SO_EXT) librtmp.$(SOX)