
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (16)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone. -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)
Sur d’autres sites (4771)
-
Why ffmpeg concat results wrong fps ? How to avoid it ?
29 avril 2024, par JinglongI have several mp4 video files and want to concat there video streams into a new mp4 file. The command I used shows below :


ffmpeg -f concat -safe 0 -i concat.txt -an -c:v copy -y out.mp4



The fps of result does not meet expectations.


For example, there are two input wrote in
concat.txt
:

file temp_result_0.mp4
file temp_result_1.mp4







 file 

duration 

number of frames 

fps 

tbr 







 temp_result_0.mp4 

60.0 

1200 

20 

20 




 temp_result_0.mp4 

0.1 

2 

20 

20 




 out.mp4 

60.1 

1202 

19.97 

20 







The
out.mp4
has correctduration
,nb_frames
but wrongavg_frame_rate
(expecting 20 but get 6010/301).

ng01@MacBook-Pro-3 Downloads % ffprobe -select_streams v:0 -show_entries stream=r_frame_rate,avg_frame_rate,nb_frames,duration out.mp4
ffprobe version 7.0 Copyright (c) 2007-2024 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.3.9.4)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --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-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
 libavutil 59. 8.100 / 59. 8.100
 libavcodec 61. 3.100 / 61. 3.100
 libavformat 61. 1.100 / 61. 1.100
 libavdevice 61. 1.100 / 61. 1.100
 libavfilter 10. 1.100 / 10. 1.100
 libswscale 8. 1.100 / 8. 1.100
 libswresample 5. 1.100 / 5. 1.100
 libpostproc 58. 1.100 / 58. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.14.100
 Duration: 00:01:00.10, start: 0.000000, bitrate: 1645 kb/s
 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920 [SAR 1:1 DAR 9:16], 1643 kb/s, 19.97 fps, 20 tbr, 10240 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
[STREAM]
r_frame_rate=20/1
avg_frame_rate=6010/301
duration=60.100000
nb_frames=1202
[/STREAM]



I tried use lower version 4.1.3 of ffmpeg, the result has wrong fps and wrong duration. expectation duration is 60.10 but get 60.20


-
Index error with moviepy when running on aws
29 avril 2024, par Hardik PatelI am getting this error :
"MoviePy error : failed to read the duration of file %s.\n"
OSError : MoviePy error : failed to read the duration of file https://delivery.gettyimages.com/downloads/1490392845?k=20&e=AnE-X_nyTRBG5QvUm1OnnCZEOURkdWAdDeQJTmDW8Eo41FL7u_ROCopEha5N-Kwh-fxBr44QIe5s2vzAUchlcVs91TwSlJTMOKWYSTraamKCPRcJv19CqNZRB_FgLaW_.


The funny thing is that for the same line of code :


video_duration = VideoFileClip(getty_url).duration



when running on my mac, it is running fine. However when running from an aws server I am getting this error :


[2024-04-29 05:55:42,126: ERROR/ForkPoolWorker-1] Task scripttovideoapp.create_video[18288b91-d304-400a-97a9-285fac776f85] raised unexpected: OSError('MoviePy error: failed to read the duration of file https://delivery.gettyimages.com/downloads/1490392845?k=20&e=AnE-X_nyTRBG5QvUm1OnnCZEOURkdWAdDeQJTmDW8Eo41FL7u_ROCopEha5N-Kwh-fxBr44QIe5s2vzAUchlcVs91TwSlJTMOKWYSTraamKCPRcJv19CqNZRB_FgLaW_.\nHere are the file infos returned by ffmpeg:\n\nffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers\n built with gcc 8 (Debian 8.3.0-6)\n configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n libavutil 56. 31.100 / 56. 31.100\n libavcodec 58. 54.100 / 58. 54.100\n libavformat 58. 29.100 / 58. 29.100\n libavdevice 58. 8.100 / 58. 8.100\n libavfilter 7. 57.100 / 7. 57.100\n libswscale 5. 5.100 / 5. 5.100\n libswresample 3. 5.100 / 3. 5.100\n libpostproc 55. 5.100 / 55. 5.100\n')
Traceback (most recent call last):
 File "/home/ec2-user/.local/lib/python3.9/site-packages/moviepy/video/io/ffmpeg_reader.py", line 285, in ffmpeg_parse_infos
 line = [l for l in lines if keyword in l][index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/home/ec2-user/.local/lib/python3.9/site-packages/celery/app/trace.py", line 477, in trace_task
 R = retval = fun(*args, **kwargs)
 File "/home/ec2-user/.local/lib/python3.9/site-packages/celery/app/trace.py", line 760, in __protected_call__
 return self.run(*args, **kwargs)
 File "/home/ec2-user/videoproj/scripttovideoapp.py", line 454, in create_video
 all_urls, video_details = process_script(script, paths, company_a, company_b, api_key)
 File "/home/ec2-user/videoproj/scripttovideoapp.py", line 232, in process_script
 video_duration = VideoFileClip(file).duration # This needs to be replaced with a proper duration if available
 File "/home/ec2-user/.local/lib/python3.9/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__
 self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
 File "/home/ec2-user/.local/lib/python3.9/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__
 infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
 File "/home/ec2-user/.local/lib/python3.9/site-packages/moviepy/video/io/ffmpeg_reader.py", line 289, in ffmpeg_parse_infos
 raise IOError(("MoviePy error: failed to read the duration of file %s.\n"
OSError: MoviePy error: failed to read the duration of file https://delivery.gettyimages.com/downloads/1490392845?k=20&e=AnE-X_nyTRBG5QvUm1OnnCZEOURkdWAdDeQJTmDW8Eo41FL7u_ROCopEha5N-Kwh-fxBr44QIe5s2vzAUchlcVs91TwSlJTMOKWYSTraamKCPRcJv19CqNZRB_FgLaW_.
Here are the file infos returned by ffmpeg:

ffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100




I checked the version of my package on both mac and aws, the packages are the same. Went through different stackover flow solutions but non of them totally aligns with my issue.


-
Google Lato Font Display discrepancies between platforms/software [closed]
5 juin 2024, par CRAIGUsing Google's Lato font with 400 weight, is giving me some inconsistent results between Photoshop/Web on MacOS and Linux Imagemagick & Linux ffmpeg.


I have printed out some text on my linux server using the font using both imagemagick (v6.9.10-68) and ffmpeg's (v6.0) drawtext feature and in both cases, I get some extra space between the T and the e. (Image below)


At first I was only testing ffmpeg and thought it was related to drawtext, but now that imagemagick is doing the same, I am thinking it may be somehow related to how the server is managing the font ?


I did download the exact same font to test on my Mac and installed it, but I still get the original photoshop results I was getting before. So I don't think it is inherently the font unless I missed a step. I did completely uninstall the font and then install the downloaded one to be sure.


However, the same word, font, font-size combo used in Photoshop and on the web does not produce the same space between the T and the e.


Here is an image I put together showing the results :




For reference, here is the imagemagick command :


convert -size 900x900 xc:black -font /fonts/Lato:400.ttf -pointsize 261.6 -fill white -gravity center -annotate +0+0 'Text' testoutput.png


And the ffmpeg command :


/usr/local/bin/ffmpeg -f lavfi -i color=c=black@0.0:s=953x953:r=30:d=5,format=rgba -filter_complex "drawtext=expansion=none:enable='between(t,0,5)':fontfile='/fonts/Lato\:400.ttf':fontcolor=0xffffffff:fontsize=294:text='Text':x=(w-text_w)/2+0:y=476.5-(max_glyph_a)+(294/2.8)" -copyts -threads 1 -c:v png -pix_fmt rgba -movflags faststart -r 30 -t 8 -y testoutput.mov