Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (25)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

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

  • Broken output from libavcodec/swscale, depending on resolution

    3 juin 2014, par dtumaykin

    I am writing a video conference software, I have a H.264 stream decoded with libavcoded into IYUV and than rendered into a window with VMR9 in windowless mode. I use a DirectShow graph to do so.

    To avoid unnecessary conversion into RGB and back (see link), I convert IYUV video into YUY2 before passing it to VMR9, with libswscale.

    I noticed that with video resolution of 848x480, output video is broken, so I investigated further and came up that for some resolutions video is always broken. To exclude the libswscale from elaboration, I added support for IYUV+padding to IYUV conversion, and it worked, with all resolutions.

    Still, I was willing to avoid slow IYUV, so I implemented support for NV12 (with libswscale) and YV12 (manually, essentially the same as IYUV). After doing some tests on two different computers, I came up with strange results.

    resolution  YUY2    NV12    IYUV    YV12
    PC 1 (my laptop)                
    640x360     ok      broken  ok      broken
    848x480     broken  broken  ok      broken
    960x540     broken  broken  ok      broken
    1024x576    ok      ok      ok      ok
    1280x720    ok      ok      ok      broken
    1920x1080   ok      broken  ok      broken

    PC 2                
    640x360     ok      ok      ok      ok
    848x480     ok      broken  ok      broken
    960x540     ok      ok      ok      ok
    1024x576    ok      ok      ok      ok
    1280x720    ok      broken  ok      ok
    1920x1080   ok      ok      ok      ok

    To exclude VMR9 fault, I substituted it with EVR, but with same results.

    I know that padding is needed for memory alignment, and that the size of padding depends on CPU used (libavcodec doc), that may explain difference between two computers(first has Intel i7-3820QM, the second Intel Core 2 Quad Q6600). I suppose it has something to do with padding, because images are corrupted in certain way.
    You can see my blue t-shirt in lower part of image.
    You can see my blue t-shirt in lower part of image, and my face in the upper one.

    To follow is the code for the conversion. NV12 and YUY2 conversions are performed with libswscale, while IYUV and YV12 manually.

    int pixels = _outputFrame->width * _outputFrame->height;
    if (_outputFormat == "YUY2") {
       int stride = _outputFrame->width * 2;
       sws_scale(_convertCtx, _outputFrame->data, _outputFrame->linesize, 0, _outputFrame->height, &out, &stride);
    }
    else if (_outputFormat == "NV12") {
       int stride[] = { _outputFrame->width, _outputFrame->width };
       uint8_t * dst[] = { out, out + pixels };
       sws_scale(_convertCtx, _outputFrame->data, _outputFrame->linesize, 0, _outputFrame->height, dst, stride);
    }
    else if (_outputFormat == "IYUV") { // clean ffmpeg padding
       for (int i = 0; i < _outputFrame->height; i++) // copy Y
           memcpy(out + i * _outputFrame->width, _outputFrame->data[0] + i * _outputFrame->linesize[0] , _outputFrame->width);
       for (int i = 0; i < _outputFrame->height / 2; i++) // copy U
           memcpy(out + pixels + i * _outputFrame->width / 2, _outputFrame->data[1] + i * _outputFrame->linesize[1] , _outputFrame->width / 2);            
       for (int i = 0; i < _outputFrame->height / 2; i++) // copy V
           memcpy(out + pixels + pixels/4 + i * _outputFrame->width / 2, _outputFrame->data[2] + i * _outputFrame->linesize[2] , _outputFrame->width / 2);
    }
    else if (_outputFormat == "YV12") { // like IYUV, but U is inverted with V plane
       for (int i = 0; i < _outputFrame->height; i++) // copy Y
           memcpy(out + i * _outputFrame->width, _outputFrame->data[0] + i * _outputFrame->linesize[0], _outputFrame->width);
       for (int i = 0; i < _outputFrame->height / 2; i++) // copy V
           memcpy(out + pixels + i * _outputFrame->width / 2, _outputFrame->data[2] + i * _outputFrame->linesize[2], _outputFrame->width / 2);
       for (int i = 0; i < _outputFrame->height / 2; i++) // copy U
           memcpy(out + pixels + pixels / 4 + i * _outputFrame->width / 2, _outputFrame->data[1] + i * _outputFrame->linesize[1], _outputFrame->width / 2);
    }

    out is an output buffer. _outputFrame is libavcodec output AVFrame. _convertCtx is initialized as follows.

    if (_outputFormat == "YUY2")
       _convertCtx = sws_getContext(_width, _height, AV_PIX_FMT_YUV420P,
                                    _width, _height, AV_PIX_FMT_YUYV422, SWS_FAST_BILINEAR, nullptr, nullptr, nullptr);
    else if (_outputFormat == "NV12")
       _convertCtx = sws_getContext(_width, _height, AV_PIX_FMT_YUV420P,
                                    _width, _height, AV_PIX_FMT_NV12, SWS_FAST_BILINEAR, nullptr, nullptr, nullptr);

    Questions :

    1. Are manual conversions correct ?
    2. Are my assumptions correct ?
    3. Is previous two answers are positive, where is the problem ? And especially...
    4. Why it presents only with some resolutions and not others ?
    5. What additional info can I provide ?
  • FFMPEG Link error

    30 novembre 2014, par Thomas

    I’m trying to compile a modified version of this transcoding example from the FFMPEG site, I’ve used all the required includes and joined the libs using this :

    INCLUDEPATH += $$(FFMPEG_DEV_PATH)\include
       LIBS += -L$$(FFMPEG_DEV_PATH)\lib -lavformat -lavcodec -lavutil -lswscale -liconv -lz -lavfilter

    but I get this linking error that I can’t understand :

     "avio_close(AVIOContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_strerror(int, char*, unsigned long)", referenced from:
         av_make_error_string(char*, unsigned long, int) in PhVideoEncoder.o
     "av_rescale_q(long long, AVRational, AVRational)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_frame_free(AVFrame**)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_read_frame(AVFormatContext*, AVPacket*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_close(AVCodecContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_open2(AVCodecContext*, AVCodec const*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_dump_format(AVFormatContext*, int, char const*, int)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_frame_alloc()", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "av_free_packet(AVPacket*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_init_packet(AVPacket*)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_opt_set_bin(void*, char const*, unsigned char const*, int, int)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "av_register_all()", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_rescale_q_rnd(long long, AVRational, AVRational, AVRounding)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_write_trailer(AVFormatContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avfilter_graph_free(AVFilterGraph**)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avfilter_inout_free(AVFilterInOut**)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_new_stream(AVFormatContext*, AVCodec const*)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "avformat_open_input(AVFormatContext**, char const*, AVInputFormat*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
     "avcodec_copy_context(AVCodecContext*, AVCodecContext const*)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "avcodec_find_decoder(AVCodecID)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
     "avcodec_find_encoder(AVCodecID)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "avfilter_get_by_name(char const*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avfilter_graph_alloc()", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avfilter_inout_alloc()", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_close_input(AVFormatContext**)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, AVPacket const*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, AVPacket const*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avcodec_encode_audio2(AVCodecContext*, AVPacket*, AVFrame const*, int*)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "avcodec_encode_video2(AVCodecContext*, AVPacket*, AVFrame const*, int*)", referenced from:
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "avfilter_graph_config(AVFilterGraph*, void*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avfilter_register_all()", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avformat_free_context(AVFormatContext*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "avformat_write_header(AVFormatContext*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_get_sample_fmt_name(AVSampleFormat)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "av_buffersink_get_frame(AVFilterContext*, AVFrame*)", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "avfilter_graph_parse_ptr(AVFilterGraph*, char const*, AVFilterInOut**, AVFilterInOut**, void*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_find_stream_info(AVFormatContext*, AVDictionary**)", referenced from:
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
     "av_interleaved_write_frame(AVFormatContext*, AVPacket*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
     "av_buffersrc_add_frame_flags(AVFilterContext*, AVFrame*, int)", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "avfilter_graph_create_filter(AVFilterContext**, AVFilter const*, char const*, char const*, void*, AVFilterGraph*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "av_get_default_channel_layout(int)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avformat_alloc_output_context2(AVFormatContext**, AVOutputFormat*, char const*, char const*)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_get_channel_layout_nb_channels(unsigned long long)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
     "av_frame_get_best_effort_timestamp(AVFrame const*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_log(void*, int, char const*, ...)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
         PhVideoEncoder::flush_encoder(unsigned int) in PhVideoEncoder.o
         PhVideoEncoder::open_input_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
         PhVideoEncoder::encode_write_frame(AVFrame*, unsigned int, int*) in PhVideoEncoder.o
         ...
     "av_free(void*)", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "av_malloc(unsigned long)", referenced from:
         av_malloc_array(unsigned long, unsigned long) in PhVideoEncoder.o
     "av_strdup(char const*)", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "avio_open(AVIOContext**, char const*, int)", referenced from:
         PhVideoEncoder::open_output_file(char const*) in PhVideoEncoder.o

    I tried looking for missing libraries but with no luck... What am I missing ?

    EDIT

    Thanks to the first answer, I added the extern C stuff but I still face a few errors :

    Undefined symbols for architecture x86_64:
     "_av_buffersink_get_frame", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "_av_buffersrc_add_frame_flags", referenced from:
         PhVideoEncoder::filter_encode_write_frame(AVFrame*, unsigned int) in PhVideoEncoder.o
     "_avfilter_get_by_name", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_alloc", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_config", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_create_filter", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_graph_free", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
     "_avfilter_graph_parse_ptr", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_inout_alloc", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_inout_free", referenced from:
         PhVideoEncoder::init_filter(FilteringContext*, AVCodecContext*, AVCodecContext*, char const*) in PhVideoEncoder.o
     "_avfilter_register_all", referenced from:
         PhVideoEncoder::PhVideoEncoder(QString) in PhVideoEncoder.o
    ld: symbol(s) not found for architecture x86_64
  • Optical Drive Value Proposition

    28 août 2010, par Multimedia Mike — General

    I have the absolute worst luck in the optical drive department. Ever since I started building my own computers in 1995 — close to the beginning of the CD-ROM epoch — I have burned through a staggering number of optical drives. Seriously, especially in the time period between about 1995-1998, I was going through a new drive every 4-6 months or so. This was also during that CD-ROM speed race where the the drive packages kept advertising loftier ‘X’ speed ratings. I didn’t play a lot of CD-ROM games during that timeframe, though I did listen to quite a few audio CDs through the computer.



    I use “optical drive” as a general term to describe CD-ROM drives, CD-R/RW drives, DVD-ROM drives, DVD-R/RW drives, and drives capable of doing any combination of reading and writing CDs and DVDs. In my observation, optical media seems to be falling out of favor somewhat, giving way to online digital distribution for things like games and software, as well as flash drives and external hard drives vs. recordable or rewritable media for backup and sneakernet duty. Somewhere along the line, I started to buy computers that didn’t even have optical drives. That’s why I have purchased at least 2 external USB drives (seen in the picture above). I don’t have much confidence that either works correctly. My main desktop until recently, a Mac Mini, has an internal optical drive that grew flaky and unreliable a few months after the unit was purchased.

    I just have really rotten luck with optical drives. The most reliable drive in my house is the one on the headless machine that, until recently, was the main workhorse on the FATE farm. The eject switch didn’t work correctly so I have to log in remotely, 'sudo eject', walk to the other room, pop in the disc, walk back to the other room, and work with the disc.

    Maybe optical media is on its way out, but I still have many hundreds of CD-ROMs. Perhaps I should move forward on this brainstorm to archive all of my optical discs on hard drives (and then think of some data mining experiments, just for the academic appeal), before it’s too late ; optical discs don’t last forever.

    So if I needed a good optical drive, what should I consider ? I’ve always been the type to go cheap, I admit. Many of my optical drives were on the lower end of the cost spectrum, which might have played some role in their rapid replacement. However, I’m not sold on the idea that I’m getting quality just because I’m paying a higher price. That LG unit at the top of the pile up there was relatively pricey and still didn’t fare well in the long (or even medium) term.

    Come to think of it, I used to have a ridiculous stockpile of castoff (but somehow still functional) optical drives. So many, in fact, that in 2004 I had a full size PC tower that I filled with 4 working drives, just because I could. Okay, I admit that there was a period where I had some reliable drives.

    That might be an idea, actually– throw together such a computer for heavy duty archival purposes. I visited Weird Stuff Warehouse today (needed some PC100 RAM for an old machine and they came through) and I think I could put together such a box rather cheaply.

    It’s a dirty job, but… well, you know the rest.