Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (84)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

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

  • RGB to x264 : Strange color render

    16 janvier 2014, par Maypeur

    i’m trying to make a video from an OpenGl context.

    I’m Using glReadPixel, to be sure RGB buffer data is Ok i save it into a bmp file, wich i can read correctly.

    My .h264 video is encoded but there are some artefact and i don’t understand why.
    I tried a lot of different parameters for the x264_param_t but anything better !

    Bitmap saved (OpenGL real data) : Bitmap from OpenGl (1mo)

    Raw h264 with error : Raw h264 video (1mo)

    OpenGl ReadPixel :

    int nSize = ClientHeight * ClientWidth * 3;
    GLubyte *inBuff = new GLubyte[nSize];
    glReadBuffer(GL_FRONT);
    glReadPixels(0, 0, ldwidth, ldheight, GL_BGR, GL_UNSIGNED_BYTE, inBuff);

    The params define :

    x264_param_default(&mX264_param_t);
    x264_param_default_preset(&mX264_param_t, "placebo", "film");

    mX264_param_t.i_csp = X264_CSP_BGR;
    mX264_param_t.i_threads = 6;
    mX264_param_t.i_width = mWidth;
    mX264_param_t.i_height = mHeight;

    mX264_param_t.i_fps_num = mFps;
    mX264_param_t.i_fps_den = 1;

    // Intra refres:
    mX264_param_t.i_keyint_max = mFps;
    mX264_param_t.b_intra_refresh = 1;

    //Rate control:
    mX264_param_t.rc.i_rc_method = X264_RC_CRF;
    mX264_param_t.rc.f_rf_constant = 25;
    mX264_param_t.rc.f_rf_constant_max = 35;

    int bps = 5000;
    mX264_param_t.rc.i_bitrate = bps;
    mX264_param_t.rc.i_vbv_max_bitrate = bps;
    mX264_param_t.i_bframe = 2;
    mX264_param_t.i_keyint_min = mFps / 4;
    //For streaming:
    mX264_param_t.b_repeat_headers = 1;
    mX264_param_t.b_annexb = 1;
    mX264_param_t.i_log_level = X264_LOG_DEBUG;
    x264_param_apply_profile(&mX264_param_t, "baseline");

    mpEncoder = x264_encoder_open(&mX264_param_t);
    x264_encoder_parameters(mpEncoder, &mX264_param_t);



    mpPictureOut = new x264_picture_t();
    mpPictureIn = new x264_picture_t();

    x264_picture_alloc(mpPictureIn, X264_CSP_BGR | X264_CSP_VFLIP, mWidth, mHeight);

    Then the encoding loop :

    mpPictureIn->img.i_csp = X264_CSP_BGR;

    mpPictureIn->img.i_plane = 1;
    mpPictureIn->img.i_stride[0] = 3 * mWidth;
    mpPictureIn->img.plane[0] = rgbframe;

    mpPictureIn->i_pts = mFrameCount;
    mpPictureIn->i_type = X264_TYPE_AUTO;

    mpPictureOut->i_pts = mFrameCount;

    int i_nals;
    x264_nal_t* nals;
    int frame_size = x264_encoder_encode(mpEncoder, &nals, &i_nals, mpPictureIn, mpPictureOut);

    if(frame_size > 0)
    {
    mpFileOut->write_frame(nals[0].p_payload, frame_size, mpPictureOut);
    mFrameCount++;
    }

    The write frame :

    int TVideoFileWriter::write_frame(uint8_t *p_nalu, int i_size, x264_picture_t *p_picture)
    {
    if(fwrite(p_nalu, i_size, 1, mFileHandle))
       return i_size;
    return -1;
    }
  • Creating automated ffmpeg converter

    27 janvier 2019, par Jeffrey Moser

    I am trying to create an automated process using ffmpeg and am having issues understanding how to adapt the code to automator.

    The code works beautifully in the terminal, but requires each filename to me entered manually. I am trying to automate the process.

    for f in "$@"
    do

    FILE= "$f"
    OUT=${FILE/mp4/png}
    OUT_WIDTH=10800
    OUT_HEIGHT=3600

    eval $(ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height,width "${FILE}")
    IN_WIDTH=${streams_stream_0_width}
    IN_HEIGHT=${streams_stream_0_height}

    eval $(ffprobe -v error -of flat=s=_ -count_frames -select_streams v:0 -show_entries stream=nb_read_frames "${FILE}")
    IN_FRAMES=${streams_stream_0_nb_read_frames}

    W_TILES=$(bc <<< "(sqrt($OUT_WIDTH*$IN_FRAMES*$IN_HEIGHT/($IN_WIDTH*$OUT_HEIGHT))+3)")
    H_TILES=$(bc <<< "(sqrt($OUT_HEIGHT*$IN_FRAMES*$IN_WIDTH/($OUT_WIDTH*$IN_HEIGHT)))")

    W_SHRUNK=$(bc <<< "$OUT_WIDTH/$W_TILES")
    H_SHRUNK=$(bc <<< "$OUT_HEIGHT/$H_TILES")

    ffmpeg -i "${FILE}" -vf "hflip,transpose=cclock,scale=${H_SHRUNK}:${W_SHRUNK},tile=${H_TILES}x${W_TILES},transpose=clock,hflip,scale=${OUT_WIDTH}x${OUT_HEIGHT}" -an -sn -vsync 0 "${OUT}"


    done

    I expected the code to produce an image of every frame of the film. But instead I got a massive error message.

    The action “Run Shell Script” encountered an error: “-: line 5: /Users/jeffreymoser/21 A New Dawn.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/22 Battle Hymn.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/23 Reckless.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/24 Showdown.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/25 Wedding Bells.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
  • Ffmpeg x265 error : "Color Primaries must be", "ransfer Characteristics must be", "Matrix Coefficients must be" [closed]

    16 septembre 2022, par Mister Sir

    I'm trying to do the following conversion :

    


    ffmpeg -i video.mp4 -map 0 -c copy -c:v libx265 -crf 30 -vf "scale=-1:\'min(720,ih)\'" -c:a libopus -b:a 44k -map_metadata 0 -loglevel error -hide_banner video.mkv


    


    This works fine except for a specific video. I'm getting the following output :

    


    x265 [info]: HEVC encoder version 3.5+39-7c7ea0a4b
x265 [info]: build info [Windows][GCC 12.1.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [error]: Color Primaries must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020, smpte-st-428, smpte-rp-431 or smpte-eg-432
x265 [error]: Transfer Characteristics must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12, smpte-st-2084, smpte-st-428 or arib-std-b67
x265 [error]: Matrix Coefficients must be unknown, bt709, fcc, bt470bg, smpte170m, smpte240m, gbr, ycgco, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c or ictcp
[libx265 @ 00000000005a2940] Cannot open libx265 encoder.


    


    Can't find a single result when I google the first error text, ffmpeg "Color Primaries must be unknown"

    


    This is the verbose output :

    


    ffmpeg version 2022-06-16-git-5242ede48d-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.3.0 (Rev1, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 27.100 / 57. 27.100
  libavcodec     59. 33.100 / 59. 33.100
  libavformat    59. 25.100 / 59. 25.100
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter     8. 41.100 /  8. 41.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample   4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video_2022-07-22_10-01-25.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2022-07-04T13:14:36.000000Z
  Duration: 00:01:04.32, start: 0.000000, bitrate: 342 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, reserved, progressive), 1280x720, 209 kb/s, 24.99 fps, 50 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2022-07-04T13:14:29.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      creation_time   : 2022-07-04T13:14:29.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option '-c:v libx265' will be used.
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 1, only the last option '-c:a libopus' will be used.
File 'C:\Users\Administrator\Downloads\delendum\New folder\testout.mkv' already exists. Overwrite? [y/N] Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
  Stream #0:1 -> #0:1 (aac (native) -> opus (libopus))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 3.5+37-07b011400
x265 [info]: build info [Windows][GCC 11.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [error]: Color Primaries must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020, smpte-st-428, smpte-rp-431 or smpte-eg-432
x265 [error]: Transfer Characteristics must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12, smpte-st-2084, smpte-st-428 or arib-std-b67
x265 [error]: Matrix Coefficients must be unknown, bt709, fcc, bt470bg, smpte170m, smpte240m, gbr, ycgco, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c or ictcp
[libx265 @ 0000000002e60340] Cannot open libx265 encoder.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[libopus @ 000000000056fe00] 1 frames left in the queue on closing
Conversion failed!


    


    I'm not an expert at video encoding, so I don't really know what this all means. Probably something with the source file. How to get around this ? Thanks in advance ! If I need to upload the video, let me know how I can do that.