
Recherche avancée
Autres articles (77)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Organiser par catégorie
17 mai 2013, parDans 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 (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
Sur d’autres sites (4887)
-
FFMPEG fails with seeking params before input on AWS Lambda
18 janvier 2023, par Rashid GoshtasbiI am trying to run the following command on AWS Lambda that has FFMPEG layer but it fails with a SIGSEGV. The FFMPEG process starts working fine until it reaches the segment's it wants to get.


/opt/ffmpeglib/ffmpeg -ss 00:02:00 -t 30 -i https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8 /tmp/out.aac -y



Note : The url is a sample url for this sharing


What this is doing : It will seek 2 minutes into the stream url, then capture the next 30 seconds into an out.aac file. When I run this locally, it works fine. When I run this on Lambda, it ends abruptly when reading the segments that are in the time frame I want (from 2:00min to 2:30 min).


FFMPEG will skip the frames if I put the -ss 00:02:00 -t 30 before the -i which they state is faster. If i put it after the -i, it works, but of course, it's a bit slower.


Example working command :


/opt/ffmpeglib/ffmpeg -i https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8 -ss 00:02:00 -t 30 /tmp/out.aac -y



Wondering if anyone knows a way to run this on Lambda. Thank you.


Note : I have tried this on Python and Javascript. Tried also making child processes with Javascript and no luck. I also added -nostdin and piped stdin/out to dev null but nothing.


Thanks.


Example of me running locally :


~/D/build [1]$ ffmpeg -ss 00:02:00 -t 30 -i https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8 /tmp/out.aac -y 14:56:13
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.102)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_audio_1_stereo_128000.m3u8' for reading
[hls @ 0x122f05250] Skip ('#EXT-X-VERSION:3')
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_0.ts' for reading
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_1.ts' for reading
Input #0, hls, from 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8':
 Duration: 00:03:31.43, start: 0.000000, bitrate: 0 kb/s
 Program 0 
 Metadata:
 variant_bitrate : 128000
 Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
 Metadata:
 variant_bitrate : 128000
Stream mapping:
 Stream #0:0 -> #0:0 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_30.ts' for reading
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_31.ts' for reading
Output #0, adts, to '/tmp/out.aac':
 Metadata:
 encoder : Lavf59.27.100
 Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 variant_bitrate : 128000
 encoder : Lavc59.37.100 aac
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_32.ts' for reading
[https @ 0x124038800] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_33.ts' for reading
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_34.ts' for reading
[https @ 0x124038800] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_35.ts' for reading
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_36.ts' for reading
[https @ 0x124038800] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_37.ts' for reading
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_38.ts' for reading
size= 486kB time=00:00:30.01 bitrate= 132.8kbits/s speed=10.7x 
video:0kB audio:477kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.018663%



It doesn't do anything after this line via the lambda console logs :


[hls @ 0x72faa80] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_0.ts' for reading



-
Using `grab_frame` with `FFMpegFileWriter` Yields Error in the Figure Argument to Subprocess
7 juillet 2024, par GPU ProgrammerI want to generate an MP4 file using frames produced by a rather complicated simulation. If I have to watch the movie as a side affect of generating it I will not complain too much, but would rather not "show" anything on the screen. The overhead of making the movie is trivial compared to the simulations, so I care much more about clean simple code than about performance.


It seemed natural to use
grab_frame
withFFMpegFileWriter
. The following code seemed right.

fig, ax = plot.subplots(figsize=(6.5, 6.5))

assert(animation.FFMpegFileWriter().isAvailable())
writer = animation.FFMpegFileWriter(fig)
writer.setup(fig, "test1.mp4",224)

with writer.saving(fig,"test1.mp4", dpi=224):
 for i in range(len(frameSeg)):
 PlotFrame(i)
 writer.grab_frame()

# writer.finish()

print("done")



It runs, but yeilds the following error




[image2 demuxer @ 0000021fab8c1000] Unable to parse option value "Figure(650x650)" as video rate
[image2 demuxer @ 0000021fab8c1000] Error setting option framerate to value Figure(650x650).
[in#0 @ 0000021fab8c1e00] Error opening input : Invalid argument
Error opening input file ... AppData\Local\Temp\tmpe19ci2wz\tmp%07d.png.
Error opening input files : Invalid argument






subprocess.CalledProcessError : Command '['ffmpeg', '-framerate', 'Figure(650x650)', '-i', 'F :\Users\Kenne.DESKTOP-BT6VROU\AppData\Local\Temp\tmpe19ci2wz\tmp%07d.png', '-loglevel', 'error', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-y', 'test1.mp4']' returned non-zero exit status 4294967274.




Did I miss something in
setup
, is it an installation problem, or is it a bug ?

By the way using
FFMpegWRiter
withFuncAnimation
works ...

-
Frames and Size Increase as Speed Reduces When Ffmpeg Converts HLS to MPEGTS
28 juillet 2021, par Mikeyy10I've been trying my hands on programmatically using ffmpeg to convert HTTP live streams to mpegts. All of the HLS I've tried have been on remote servers and everything worked fine until this particular feed. As you can see in the logs, the number of frames keeps increasing by 150 and the size increases as a result. At the same time, the speed reduces. This is the code I used :
ffmpeg -i http://xxxxxxxx-xxxxxxx-xx.m3u8 -y -r 100 -vcodec libx264 -f mpegts -preset ultrafast -tune zerolatency -t 00:10:00.500 /home/xxxx-xxxxxx/app/backend/queues/../files/output.mpegts

I have tried different fps starting with 30 and upward to 100. I noticed that the number of frames and the size continue to increase in direct proportion to the fps. Is there a better way to reencode this sort of stream. I'm using fluent-ffmpeg and I stiil haven't figured out how to apply thenobuffer
option but I'm not sure that'll solve the problem anyway.

[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxx-xxx99.ts' for reading
Input #0, hls,applehttp, from 'http://xxxxxxxxxxxxxxxx-xxxxxxxx.m3u8':
 Duration: N/A, start: 28505.278111, bitrate: N/A
 Program 0 
 Metadata:
 variant_bitrate : 0
 Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
 Metadata:
 variant_bitrate : 0
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x1dc0ea0] using SAR=1/1
[libx264 @ 0x1dc0ea0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x1dc0ea0] profile Constrained Baseline, level 3.0
Output #0, mpegts, to '/home/xxxxx-xxxxxx-xxx/app/backend/queues/../files/output.mpegts':
 Metadata:
 encoder : Lavf57.83.100
 Stream #0:0: Video: h264 (libx264), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 100 fps, 90k tbn, 100 tbc
 Metadata:
 variant_bitrate : 0
 encoder : Lavc57.107.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx100.ts' for reading
frame= 149 fps=0.0 q=24.0 size= 239kB time=00:00:05.92 bitrate= 331.0kbits/s speed=9.52x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx101.ts' for reading
frame= 299 fps= 59 q=25.0 size= 256kB time=00:00:11.92 bitrate= 175.9kbits/s speed=2.35x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx102.ts' for reading
frame= 449 fps= 43 q=24.0 size= 512kB time=00:00:17.92 bitrate= 234.1kbits/s speed=1.72x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx103.ts' for reading
frame= 599 fps= 38 q=22.0 size= 768kB time=00:00:23.92 bitrate= 263.0kbits/s speed=1.52x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx104.ts' for reading
frame= 749 fps= 35 q=22.0 size= 1024kB time=00:00:29.92 bitrate= 280.4kbits/s speed=1.42x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx105.ts' for reading
frame= 899 fps= 28 q=23.0 size= 1280kB time=00:00:35.92 bitrate= 291.9kbits/s speed=1.12x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx106.ts' for reading
frame= 1049 fps= 25 q=23.0 size= 1536kB time=00:00:41.92 bitrate= 300.2kbits/s speed=0.998x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx107.ts' for reading
frame= 1199 fps= 28 q=24.0 size= 1792kB time=00:00:47.92 bitrate= 306.3kbits/s speed=1.11x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx108.ts' for reading
frame= 1349 fps= 28 q=25.0 size= 2048kB time=00:00:53.92 bitrate= 311.2kbits/s speed=1.11x 
Past duration 0.999992 too large
 Last message repeated 6 times
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx109.ts' for reading
frame= 1499 fps= 28 q=23.0 size= 2048kB time=00:00:59.64 bitrate= 281.3kbits/s speed=1.11x 
[hls,applehttp @ 0x1d97f60] Opening 'http://xxxxxxxxxxxxxxxx-xxxxx110.ts' for reading
frame= 1649 fps= 28 q=24.0 size= 2304kB time=00:01:05.64 bitrate= 287.5kbits/s speed=1.11x 
[http @ 0x23b86e0] HTTP error 404 Not Found
[hls,applehttp @ 0x1d97f60] Failed to reload playlist 0
[http @ 0x23b86e0] HTTP error 404 Not Found
[hls,applehttp @ 0x1d97f60] Failed to reload playlist 0
frame= 1799 fps= 13 q=24.0 size= 2560kB time=00:01:11.64 bitrate= 292.7kbits/s speed=0.523x 
[http @ 0x23b86e0] HTTP error 404 Not Found
[hls,applehttp @ 0x1d97f60] Failed to reload playlist 0
frame= 1800 fps= 13 q=24.0 size= 2560kB time=00:01:11.68 bitrate= 292.6kbits/s speed=0.514x 
[http @ 0x1e34ea0] HTTP error 404 Not Found
[hls,applehttp @ 0x1d97f60] Failed to reload playlist 0
frame= 1800 fps= 13 q=24.0 size= 2560kB time=00:01:11.68 bitrate= 292.6kbits/s speed=0.512x 
frame= 1800 fps= 13 q=24.0 Lsize= 2756kB time=00:01:11.68 bitrate= 315.0kbits/s speed=0.512x 
video:2359kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 16.855715%
[libx264 @ 0x1dc0ea0] frame I:8 Avg QP:20.62 size: 21713
[libx264 @ 0x1dc0ea0] frame P:1792 Avg QP:23.84 size: 1251
[libx264 @ 0x1dc0ea0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x1dc0ea0] mb P I16..4: 0.2% 0.0% 0.0% P16..4: 32.8% 0.0% 0.0% 0.0% 0.0% skip:67.0%
[libx264 @ 0x1dc0ea0] coded y,uvDC,uvAC intra: 83.7% 62.6% 40.9% inter: 12.7% 15.3% 7.9%
[libx264 @ 0x1dc0ea0] i16 v,h,dc,p: 26% 29% 31% 14%
[libx264 @ 0x1dc0ea0] i8c dc,h,v,p: 58% 20% 14% 8%
[libx264 @ 0x1dc0ea0] kb/s:1073.41