Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (43)

  • 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

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (6345)

  • ffmpeg - connection drop every few minuts- connection timeout

    9 novembre 2018, par Gloytos htyqo

    im runing ffmpeg to restream hls/m3u8 from another website(its my website).

    i have more visitors on a period of the day and then ffmpeg stops every 3-6 minutes idont know why it stops, as i saw here in logs error is : Connection timeout , what can i do in this case

    /root/bin/ffmpeg -i http://example.com/1.m3u8 -c copy -bufsize 600k
    -hls_flags delete_segments -y /var/www/html/1.m3u8

    [hls,applehttp @ 0x365f740] Opening 'http://example.com/13152.ts' for reading
    [hls,applehttp @ 0x365f740] Failed to open segment of playlist 0
    [hls,applehttp @ 0x365f740] Opening 'http://example.com/13153.ts' for reading
    frame= 6500 fps= 20 q=-1.0 size=N/A time=00:05:06.29 bitrate=N/A speed=0.962x   [hls @ 0x3689540] Opening '/var/www/html/tv1/test46.ts' for writing
    [hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
    [hls,applehttp @ 0x365f740] Opening 'http://example.com/13154.ts' for reading
    frame= 6750 fps= 21 q=-1.0 size=N/A time=00:05:21.17 bitrate=N/A speed=0.979x   [hls @ 0x3689540] Opening '/var/www/html/tv1/test47.ts' for writing
    [hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
    [hls,applehttp @ 0x365f740] Opening 'http://example.com/13155.ts' for reading
    [hls @ 0x3689540] Opening '/var/www/html/tv1/test48.ts' for writingeed=0.97x
    [hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
    [hls,applehttp @ 0x365f740] Opening 'http://example.com/13156.ts' for reading
    frame= 7089 fps= 21 q=-1.0 size=N/A time=00:05:34.74 bitrate=N/A speed=0.986x   [hls @ 0x3689540] Opening '/var/www/html/tv1/test49.ts' for writing
    [hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
    [hls,applehttp @ 0x365f740] Failed to reload playlist 0trate=N/A speed=   1x
    frame= 7339 fps= 21 q=-1.0 size=N/A time=00:05:44.73 bitrate=N/A speed=0.985x   [hls,applehttp @ 0x365f740] Opening 'http://example.com/13157.ts' for reading
    http://example.com/1.m3u8: Connection timed out
    [hls @ 0x3689540] Opening '/var/www/html/tv1/test.m3u8.tmp' for writing
    frame= 7339 fps= 21 q=-1.0 Lsize=N/A time=00:05:44.73 bitrate=N/A speed=0.964x  
    video:7793kB audio:4586kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [root@T2 www]#

    /root/bin/ffmpeg -v trace -re -err_detect aggressive -user_agent server
    -i http://example.com/1.m3u8 -c copy -bufsize 1600k -hls_flags delete_segments -y /var/www/html/1.m3u8

     Last message repeated 2 times
    [mpegts @ 0x3715660] pid=101 pes_code=0x1c0
    [mpegts @ 0x3770560] nal 9
       Last message repeated 2 times
    [mpegts @ 0x3715660] pid=100 pes_code=0x1e0:02:20.88 bitrate=N/A speed=   1x
    [mpegts @ 0x3770560] nal 9
    [mpegts @ 0x3715660] pid=100 pes_code=0x1e0
       Last message repeated 2 times
    [mpegts @ 0x3715660] pid=101 pes_code=0x1c0
    [mpegts @ 0x3770560] nal 9
       Last message repeated 2 times
    [mpegts @ 0x3715660] pid=100 pes_code=0x1e0
    [mpegts @ 0x3770560] nal 9
    [mpegts @ 0x3715660] pid=100 pes_code=0x1e0
       Last message repeated 1 times
    [mpegts @ 0x3715660] pid=101 pes_code=0x1c0
    [mpegts @ 0x3770560] nal 9
       Last message repeated 1 times
    [AVIOContext @ 0x3773300] Statistics: 806144 bytes read, 0 seeks
    [hls,applehttp @ 0x370e760] Opening 'http://example.com/1.m3u8' for reading
    [hls,applehttp @ 0x370e760] Failed to reload playlist 0
    [mpegts @ 0x3770560] nal 9
       Last message repeated 1 times
    [hls,applehttp @ 0x370e760] Opening 'http://example.com/1.m3u8' for reading
    [hls,applehttp @ 0x370e760] Failed to reload playlist 0
    No more output streams to write to, finishing.
    [AVIOContext @ 0x37752e0] Statistics: 0 seeks, 4 writeouts
    [hls muxer @ 0x3738fe0] deleting old segment test6.ts
    [hls @ 0x37755c0] Opening '/var/www/html/1.m3u8.tmp' for writing
    [file @ 0x3773480] Setting default whitelist 'file,crypto'
    [hls muxer @ 0x3738fe0] EXT-X-MEDIA-SEQUENCE:16
    [AVIOContext @ 0x3773300] Statistics: 0 seeks, 1 writeouts
    frame= 3532 fps= 23 q=-1.0 Lsize=N/A time=00:02:21.24 bitrate=N/A speed=0.932x
    video:5169kB audio:2207kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Input file #0 (http://example.com/1.m3u8):
     Input stream #0:0 (video): 3532 packets read (5293095 bytes);
     Input stream #0:1 (audio): 5886 packets read (2260224 bytes);
     Total: 9418 packets (7553319 bytes) demuxed
    Output file #0 (/var/www/html/1.m3u8):
     Output stream #0:0 (video): 3532 packets muxed (5293095 bytes);
     Output stream #0:1 (audio): 5886 packets muxed (2260224 bytes);
     Total: 9418 packets (7553319 bytes) muxed
    0 frames successfully decoded, 0 decoding errors
    [AVIOContext @ 0x371a900] Statistics: 236 bytes read, 0 seeks
    [root@T2 www]#
  • ffmpeg : is there a fast way for extracting several thumbnails from a video without parsing the video from the beginning every time ?

    18 mars, par archie

    I tried several ways for extracting sample frames from a video file with ffmpeg. I found out that the fastest way is by placing the following command in a loop :

    


    ffmpeg -ss $frame_time -i "$input_video" -frames:v 1 -vf scale=256:-1 "$Work_dir/thumb$thumb_index.jpg"


    


    (I have omitted the parts of the command that are not relevant to the question, such as drawtext, hide_banner, loglevel). The variables frame_time and thumb_index are initialized before the loop and incremented by a fixed amount at every step : +1 for thumbs_index and $duration/25 for frame_time. I read in the ffmpeg documentation (https://trac.ffmpeg.org/wiki/Seeking) that having the -ss part before the -i part is very fast because the input is parsed by keyframe. For the same reason, the loop containing the command above is also much faster than commands based on "-vf fps=$thumbs_number/$duration".

    


    In fact, the code works pretty well. However, I can't escape a feeling of programming discomfort, because ffmpeg is called several times for each video file, and every time it has to parse the file from the beginning. I mean, if I had a function doing the same as the command above — it would parse a video from the beginning to search for a frame at a certain time — calling it n times to extract a regular sequence of n frames would be bad programming. I should change the function to parse the video file once and get all the frames I need in a single pass.

    


    My question is : is there a fast way for having ffmpeg parse a video file a single time, searching by keyframes and extracting a given number of frames at a given distance from one another ? I am ready to take No for an answer, but one who is deeper into ffmpeg than I am might know a way. Thanks

    


  • Seeking issues on larger video files on HTML page (ffmpeg)

    5 juillet 2023, par Xenons

    After testing out numerous of "html video players" and even making our own making sure to wait for events such as player.oncanplaythrough to fire before even attempting to start videos
we've had the same issue for months now.

    


    Mainly we offer 3 resolutions for same video (720, 1080, 4k)
and out of the 3, 2 have the seeking issue where trying to skip to any time or even trying to fast forward by x amount of seconds with arrow keys would just bring the video back to 00:00 time
this only happens on 1080 and 4k resolutions and after refreshing the page it just works as normal afterwards

    


    we've tried pretty much anything we could think of to combat this but with no luck

    


    ffmpeg line for 1080 and 4k (these files are webm but same happened for mp4 on these resolutions with same encoding)

    


    -c:v libvpx-vp9 -pix_fmt yuv420p -crf 24 -b:v 0 -c:a libopus -b:a 128k -movflags +faststart


    


    ffmpeg line for 720 (mp4 file)

    


    -c:v libx264 -preset slow -pix_fmt yuv420p -crf 20 -b:a 128k


    


    To be quite frank at this point I am at a loss and without many ideas left so I am turning to stack overflow in case someone might have an idea on what would cause this

    


    I am contemplating to attempt perhaps loading videos as blobs and playing them that way, not sure if this would fix it but it does bring the load times up drastically so I would save it as last resort

    


    Thus far I have tried two html video players (plyr and videojs) and after that I just wrote my own "player"
of course it's just regular html and js but that's what makes me even more confused as there is nothing that should hinder the files in any way from working as intended

    


    we've also tried changing ffmpeg encoding a few times but to no avail either.

    


    EDIT :
The issue was caused by cloudflare caching, we simply made two rules to exclude webm and mp4 url's from being cached and that completely fixed all of our seeking issues