Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (106)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (11815)

  • Pointers returned by xlib don't match any existing window IDs

    1er septembre 2022, par Kroltan

    I'm using some X11 bindings to query some window information and later pass it to FFmpeg. FFmpeg expects a "window ID" given in hexadecimal notation.

    


    This notation seems somewhat standard, as it is returned by programs like xwininfo or wmctrl. I haven't found much information about it, but it seems to just be the hexadecimal representation of the window pointer ? If I take the ID string given by these programs and give it to FFmpeg, it is able to capture the window correctly :

    


    $ xwininfo

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x2800014 "Desktop — Plasma"

$ ffmpeg -f x11grab -window_id 0x2800014 -i :0+0,0 -f apng -vframes 1 out.png
# works fine


    


    However, if I try listing all the windows in code :

    


    var root = Window.None;
var parent = Window.None;
Xlib.XQueryTree(_display, Xlib.XDefaultRootWindow(_display), ref root, ref parent, out var children);

var ids = children
    .Select(ptr => $"0x{(ulong) ptr:x}")
    .ToArray();


    


    I don't see 0x2800014 in the results (even disregardingleading zeroes), and if I try running FFmpeg on one of those results, it fails terribly :

    


    $ ffmpeg -f x11grab -window_id 0x4400003 -i :0+0,0 -f apng -vframes 1

# snipped for brevity

Trailing option(s) found in the command: may be ignored.
[x11grab @ 0x55b811a8da40] Cannot get the image data event_error: response_type:0 error_code:8 sequence:10 resource_id:167772160 minor_code:4 major_code:130.
[x11grab @ 0x55b811a8da40] Continuing without shared memory.
[x11grab @ 0x55b811a8da40] Cannot get the image data event_error: response_type:0 error_code:8 sequence:11 resource_id:71303171 minor_code:0 major_code:73.
Input #0, x11grab, from ':0+0,0':
  Duration: N/A, bitrate: 38361 kb/s
  Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 200x200, 38361 kb/s, 29.97 fps, 1000k tbr, 1000k tbn
At least one output file must be specified


    


    So I must conclude my guess that they are hex pointers is incorrect, or that the Window type is not the pointer itself, but then the question stands, how can I get the actual window IDs so I can pass them to FFmpeg ?

    


  • PHP FFMPEG match Instagram aspect ratio requirements

    19 mai 2021, par Linesofcode

    As stated here, the Instagram API requirements to upload a video are :

    


    - Picture size
- - Maximum columns (horizontal pixels): 1920
- - Minimum aspect ratio [cols / rows]: 4 / 5
- - Maximum aspect ratio [cols / rows]: 16 / 9


    


    I'm having some problems figuring it out if the aspect ratio matches. I grab the width and height of the video like this :

    


    $ffprobe = \FFMpeg\FFProbe::create();
$video = $ffprobe->streams($file)->videos()->first();
$width = $video->get('width');
$height = $video->get('height');


    


    And then I know the ratio by dividing the width by height.

    


    The Instagram requirements about Portrait & Landscape videos are :

    


    Portrait - min: 0.8 ; max: 0.99
Landscape - min: 1.01 ; max: 1.78


    


    So why does a video of 848x480 (aspect ratio of 1.76) fails to upload to Instagram by returning "The video format is not supported" and how can I be completely sure that the aspect ratio matches the requirements before trying to upload ?

    


    Edit

    


    The full validation of Instagram requirements :

    


    $video = $ffprobe->streams($file)->videos()->first();
$audio = $ffprobe->streams($file)->audios()->first();
$codec = $video->get('codec_name');
$frameRate = eval('return ' . $video->get('avg_frame_rate') . ';'); // 30/1 -> 30
$width = $video->get('width');
$height = $video->get('height');
$duration = $video->get('duration');

$ratio = round($width / $height, 3);

// Portrait
if ($width < $height)
    if ($ratio < 0.8 || $ratio > 0.99)
        return false;
        
// Landscape
if ($width > $height)
    if ($ratio < 1.01 || $ratio > 1.78)
        return false;


if (!in_array($codec, ['h264', 'hevc']))
    return false;

if ($frameRate < 23 || $frameRate > 60)
    return false;

if ($width > 1920)
    return false;

if ($duration < 3 || $duration > 60)
    return false;

if ($audio)
{
    $aCodec = $audio->get('codec_name');

    if ($aCodec != 'aac')
        return false;
}

return true;


    


    Sample not uploading into Instagram :
enter image description here

    


  • FFmpeg and QuickTime Player dimensions of video do not match [duplicate]

    31 mai 2020, par GRS

    I have a video.mp4, which I scaled using FFmpeg to get out.mp4. The new video has the following probe :

    



    {'streams': [{'index': 0,
   'codec_name': 'h264',
   'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
   'profile': 'High',
   'codec_type': 'video',
   'codec_time_base': '1/50',
   'codec_tag_string': 'avc1',
   'codec_tag': '0x31637661',
   'width': 886,
   'height': 1920,
   'coded_width': 896,
   'coded_height': 1920,
   'has_b_frames': 2,
   'sample_aspect_ratio': '5120:1329',
   'display_aspect_ratio': '16:9',
   'pix_fmt': 'yuv420p',
   'level': 40,
   'chroma_location': 'left',
   'refs': 1,
   'is_avc': 'true',
   'nal_length_size': '4',
   'r_frame_rate': '25/1',
   'avg_frame_rate': '25/1',
   'time_base': '1/12800',
   'start_pts': 0,
   'start_time': '0.000000',
   'duration_ts': 384512,
   'duration': '30.040000',
   'bit_rate': '490832',
   'bits_per_raw_sample': '8',
   'nb_frames': '751',
   'disposition': {'default': 1,
    'dub': 0,
    'original': 0,
    'comment': 0,
    'lyrics': 0,
    'karaoke': 0,
    'forced': 0,
    'hearing_impaired': 0,
    'visual_impaired': 0,
    'clean_effects': 0,
    'attached_pic': 0,
    'timed_thumbnails': 0},
   'tags': {'language': 'und', 'handler_name': 'VideoHandler'}}],
 'format': {'filename': 'out.mp4',
  'nb_streams': 1,
  'nb_programs': 0,
  'format_name': 'mov,mp4,m4a,3gp,3g2,mj2',
  'format_long_name': 'QuickTime / MOV',
  'start_time': '0.000000',
  'duration': '30.040000',
  'size': '1852948',
  'bit_rate': '493461',
  'probe_score': 100,
  'tags': {'major_brand': 'isom',
   'minor_version': '512',
   'compatible_brands': 'isomiso2avc1mp41',
   'encoder': 'Lavf58.20.100'}}}


    



    I am expecting my video player to say the video is 886 x 1920, however, it is 3413:1920.
enter image description here

    



    What could be the error ? I am using pix_frmt=yuva420p and codec=libx264 to create the video.

    



    The error is that my ascpect ratio remains 16:9, which is the original input video, when it should automatically change to 9:19. E.g. 3413 = 1920 * 16 / 9. So why isn't the ascpect ratio changed when the video is scaled ?