Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (65)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (9609)

  • Setting individual pixels of an RGB frame for ffmpeg encoding

    15 mai 2013, par Camille Goudeseune

    I'm trying to change the test pattern of an ffmpeg streamer, Trouble syncing libavformat/ffmpeg with x264 and RTP , into familiar RGB format. My broader goal is to compute frames of a streamed video on the fly.

    So I replaced its AV_PIX_FMT_MONOWHITE with AV_PIX_FMT_RGB24, which is "packed RGB 8:8:8, 24bpp, RGBRGB..." according to http://libav.org/doxygen/master/pixfmt_8h.html .

    To stuff its pixel array called data, I've tried many variations on

    for (int y=0; y/  const double j = y/double(HEIGHT);
       rgb[0] = 255*i;
       rgb[1] = 0;
       rgb[2] = 255*(1-i);
     }
    }

    At HEIGHTxWIDTH= 80x60, this version yields
    screenshot of red-to-blue stripes, when I expect a single blue-to-red horizontal gradient.

    640x480 yields the same 4-column pattern, but with far more horizontal stripes.

    640x640, 160x160, etc, yield three columns, cyan-ish / magenta-ish / yellow-ish, with the same kind of horizontal stripiness.

    Vertical gradients behave even more weirdly.

    Appearance was unaffected by an AV_PIX_FMT_RGBA attempt (4 not 3 bytes per pixel, alpha=255). Also unaffected by a port from C to C++.

    The argument srcStrides passed to sws_scale() is a length-1 array, containing the single int HEIGHT.

    Access each Pixel of AVFrame asks the same question in less detail, so far unanswered.

    The streamer emits one warning, which I doubt affects appearance :

    [rtp @ 0x269c0a0] Encoder did not produce proper pts, making some up.

    So. How do you set the RGB value of a pixel in a frame to be sent to sws_scale() (and then to x264_encoder_encode() and av_interleaved_write_frame()) ?

  • How do I toggle individual codec options in libavcodec (specifically h264_options)

    2 juillet 2020, par John Allard

    I'm trying to figure out how to enable enable_er option as is defined in h264dec.c in libavcodec. This is defined as an AVOption as part of the AVCodec.priv_class.option field. I can't figure out if this is some sort of compile-time option or if it's an option that I can enable via the av_dict_set method when initializing an AVCodec via avcodec_open2.

    


    I'm talking about these options in h264dec.c

    


    #define OFFSET(x) offsetof(H264Context, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static const AVOption h264_options[] = {
    { "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0 },
    { "nal_length_size", "nal_length_size", OFFSET(nal_length_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 },
    { "enable_er", "Enable error resilience on damaged frames (unsafe)", OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
    { NULL },
};

static const AVClass h264_class = {
    .class_name = "H264 Decoder",
    .item_name  = av_default_item_name,
    .option     = h264_options,
    .version    = LIBAVUTIL_VERSION_INT,
};

AVCodec ff_h264_decoder = {
    .name                  = "h264",
    .long_name             = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
    .type                  = AVMEDIA_TYPE_VIDEO,
    .id                    = AV_CODEC_ID_H264,
    .priv_data_size        = sizeof(H264Context),
    .init                  = h264_decode_init,
    .close                 = h264_decode_end,
    .decode                = h264_decode_frame,
    .capabilities          = /*AV_CODEC_CAP_DRAW_HORIZ_BAND |*/ AV_CODEC_CAP_DR1 |
                             AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS |
                             AV_CODEC_CAP_FRAME_THREADS,
    .caps_internal         = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING,
    .flush                 = flush_dpb,
    .init_thread_copy      = ONLY_IF_THREADS_ENABLED(decode_init_thread_copy),
    .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context),
    .profiles              = NULL_IF_CONFIG_SMALL(ff_h264_profiles),
    .priv_class            = &h264_class,
};


    


  • FFmpeg Not Transcoding In Real Time

    2 décembre 2018, par Nimble

    Been setting up a recording build for a friend to resemble mine, but I can’t seem to get things to work in real-time despite sufficient (as far as I can tell) hardware.

    System specs : 8600K, GTX 1050ti, 16Gb RAM, 1tb 860 EVO

    Test command :

    ffmpeg -y -hide_banner -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow -rtbufsize 2147.48M `
    -video_size 1920x1080 -framerate 60 `
    -i video="@device_pnp_\\?\usb#vid_07ca&pid_0570&mi_00#7&3886ab1a&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global":audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{0A494693-5F33-4304-88D7-394757E09648}" `
    -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow -rtbufsize 2147.48M `
    -video_size 1920x1080 -framerate 60 `
    -i video="@device_pnp_\\?\usb#vid_07ca&pid_0570&mi_00#7&24df76f&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global":audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{0E6F0DEF-2B29-4117-8D30-13F01160AC5B}" `
    -map 0:0,0:1 -map 0:1 -c:v h264_nvenc -r 60 -rc-lookahead 120 -forced-idr 1 -strict_gop 1 -sc_threshold 0 -flags +cgop `
    -force_key_frames "expr:gte(t,n_forced*2)" -preset: llhp -pix_fmt nv12 -b:v 250M -minrate 250M -maxrate 250M `
    -bufsize 250M -c:a aac -ar 44100 -b:a 384k -ac 2 -af "aresample=async=250" -vsync 1 -ss 00:00:00.000 `
    -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9 -reset_timestamps 1 `
    -segment_format_options max_delay=0 C:\Users\Jordan\Videos\FFmpeg\Left\Left%02d.ts `
    -map 1:0,1:1 -map 1:1 -c:v h264_nvenc -r 60 -rc-lookahead 120 -forced-idr 1 -strict_gop 1 -sc_threshold 0 -flags +cgop `
    -force_key_frames "expr:gte(t,n_forced*2)" -preset: llhp -pix_fmt nv12 -b:v 250M -minrate 250M -maxrate 250M `
    -bufsize 250M -c:a aac -ar 44100 -b:a 384k -ac 2 -af "aresample=async=250" -vsync 1 -ss 00:00:00.000 `
    -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9 -reset_timestamps 1 `
    -segment_format_options max_delay=0 C:\Users\Jordan\Videos\FFmpeg\Right\Right%02d.ts

    For one reason or another this command is not transcoding video in real-time, which is a big issue when you’re trying to record not simply convert a file. When I omit one of the two outputs or if I halve the resolution of each input / output everything works in real-time. This would make me believe there is a bottleneck in the system somewhere but when monitoring everything in task manager nothing is even close to capping out (GPU encoder, cpu, ram, and SSD below 30% usage).

    Furthermore when I try recording both streams in one 4K60 video via OBS things work perfectly fine, as in real-time. So I don’t understand how transcoding two 1080p60 streams in FFmpeg would be anymore intensive than one 4K60 stream in OBS... When looking at the GPUs encoding chip usage it shows about 30% for the two 1080p60 streams on FFmpeg and 80% usage for single 4K60 stream in OBS, yet the OBS recording is real-time while the FFmpeg recording is at .6x speed.

    Lastly I run a very similar command at home but instead of two 1080p60 streams I’m doing 2 4K60 streams, a 1080p60 stream, and another 2 audio streams without issue. I do have a GTX 1080 though... however when monitoring usage for the 1050 TI being used in this situation nothing points to a GPU bottlecap.

    Any insight would be greatly appreciated, been going at this for hours now with no clue as to what could be causing this.