
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (52)
-
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
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" (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (11722)
-
HLS encoded video (ffmpeg) breaks in Safari when segmented via byte-range
15 juin 2019, par eschieSome of my HLS encoded videos via ffmpeg drop the audio when seeking past the buffer. The only way to sync the audio and video up again is to restart the video. What would be causing this ?
Example Profile :
bitrate: 4800, profile: 'high', level: '4.1', resolution: 1080, framerate: '24000/1001'
ffmpeg
'-y'
'-i' input_file.mov
'-v' error
'-map' '0:0'
'-c:v' libx264
'-x264opts' f'
keyint=23:
min-keyint=23:
no-scenecut
'
'-vf' f'scale=-1:1080'
'-preset' 'slow'
'-profile:v' 'high'
'-level' '4.1'
'-b:v' '4800k'
'-maxrate' '4800k'
'-movflags' 'faststart'
'-bufsize' '9600k'
'-write_tmcd', '0'
'-r' '24000/1001'
output_dirSegmentation CMD :
FFMPEG
'-i' output_dir
'-v' 'error'
'-acodec' 'copy'
'-vcodec' 'copy'
'-hls_time' '4' #seconds
'-hls_list_size' '0'
'-hls_flags' 'single_file'
os.path.join(output_dir, f'{run_id}_{bitrate}.m3u8'Added : apple’s
mediastreamvalidator
outputs a few different errors :Error: Playlist vs segment duration mismatch
--> Detail: Segment duration 98.0146, Playlist duration: 4.7968
--> Source: 1559962503399_2200k.m3u8 - 1559962503399_2200k.ts:1746520@0Error: Measured peak bitrate compared to master playlist declared value exceeds error tolerance
--> Detail: Measured: 3182.61 kb/s, Master playlist: 2173.82 kb/s, Error: 46.41%, Combined rendition name: English
--> Source: ...playlist.m3u8
--> Compare: 1559962503399_2200k.m3u8Error: Different target durations detected
--> Detail: Target duration: 5 vs Target duration: 4
--> Source: 1559962503399_64k.m3u8
--> Compare: 1559962503399_128k.m3u8UPDATE 1 :
I modified the encoding command to utilize tee pseudo-muxer, but it seems the same issue still exists when segmenting HLS as byte-ranges rather than in separate .ts files :$ ffmpeg
-hide_banner
-report
-benchmark
-vstats
-i "../Jane_shallowing_Top_v08.mp4"
-dn
-sn
-filter_complex "[0:v]fps=fps=24.000,setpts=(PTS-STARTPTS),split=[vsplit1][vsplit2];[vsplit1]scale=-1:144[video_144];[vsplit2]scale=-1:1080[video_1080]"
-map "[video_144]"
-r:v:0 "24.000"
-c:v:0 "libx264"
-x264-params "keyint=144:min-keyint=144:scenecut=0:open_gop=0"
-preset:v:0 "slow"
-profile:v:0 "baseline"
-refs:v:0 "2"
-b-pyramid:v:0 "strict"
-tune:v:0 "film"
-b:v:0 "96000"
-maxrate:v:0 "56000"
-bufsize:v:0 "6*56000/8"
-vsync:v:0 "cfr"
-bsf:v:0 "h264_metadata=fixed_frame_rate_flag=1"
-map "[video_1080]"
-r:v:1 "24.000"
-c:v:1 "libx264"
-x264-params "keyint=144:min-keyint=144:scenecut=0:open_gop=0"
-preset:v:1 "slow"
-profile:v:1 "high"
-refs:v:1 "2"
-b-pyramid:v:1 "strict"
-tune:v:1 "film"
-b:v:1 "4800000"
-maxrate:v:1 "4800000"
-bufsize:v:1 "6*4800000/8"
-vsync:v:1 "cfr"
-bsf:v:1 "h264_metadata=fixed_frame_rate_flag=1"
-map a:0 -map a:0
-c:a "libfdk_aac"
-ar "48000"
-ab "128k"
-af "aresample=async=1:min_hard_comp=0.100000:first_pts=0"
-f "hls"
-var_stream_map "v:1,a:0 v:0,a:1"
-hls_time "6.000"
-hls_segment_type "mpegts"
-hls_flags "discont_start+temp_file+single_file"
-hls_list_size "0"
-master_pl_name "playlist.m3u8"
-hls_segment_filename "out_%v.ts" "out_%v.m3u8"Segment duration 98.0267, Playlist duration: 6.0000
-
FFMPEG get stuck when transcoding too many FLAC audios [closed]
6 juin 2024, par user25436721I'm currently using Editly for create some videos from code, but there are some bugs with ffmpeg(latest).


Nothing returns after hours processing(460 audios files during test), I already tried with flac, aac, libshine and libmp3lame encoders, already tried a different a ffmpeg version(static).


From the editly code, I already changed the ffmpeg query, slicing in chunks(75), the results were :


- 

- 0, 75 ok
- 0, 80 stuck
- 75, 150 ok
- 150, 225 ok
- 225, 300 stuck
- 300, 375 ok
- 375, 450 ok
















Stuck screen(directly from terminal) :


built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
 configuration: --pkg-config-flags=--static --prefix='~/ffmpeg/dyn' --extra-cflags='-I/~/ffmpeg/dyn/include' --extra-ldflags='-L/~/ffmpegffmpeg/dyn/lib' --bindir='~/ffmpeg/dyn/bin' --enable-debug=3 --enable-vaapi --enable-libvorbis --enable-libvpx --enable-gpl --cpu=native --enable-opengl --enable-libfdk-aac --enable-libx264 --enable-nonfree --enable-libmp3lame --enable-libshine
 libavutil 59. 21.100 / 59. 21.100
 libavcodec 61. 6.100 / 61. 6.100
 libavformat 61. 3.104 / 61. 3.104
 libavdevice 61. 2.100 / 61. 2.100
 libavfilter 10. 2.102 / 10. 2.102
 libswscale 8. 2.100 / 8. 2.100
 libswresample 5. 2.100 / 5. 2.100
 libpostproc 58. 2.100 / 58. 2.100

Input #n..., flac, from 'editly-tmp-.../clip...-audio.flac':
 Metadata:
 encoder : Lavf61.3.104
 Duration: 00:01:53.62, start: 0.000000, bitrate: 1 kb/s
 Stream #458:0: Audio: flac, 48000 Hz, stereo, s32 (24 bit)
Stream mapping:
 Stream #n1:0 (flac) -> acrossfade
 Stream #n2:0 (flac) -> acrossfade
 Stream #n3:0 (flac) -> acrossfade
 Stream #n...:0 (flac) -> acrossfade
 acrossfade:default -> Stream #0:0 (libshine)
 Press [q] to stop, [?] for help



if I quit then returns :


[fc#0 @] [ao0->#0:0 @] No filtered frames for output stream, trying to initialize anyway.
Output #0, mp3, to 'editly-tmp-.../audio-concat.mp3':
 Metadata:
 TSSE : Lavf61.3.104
 Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 128 kb/s
 Metadata:
 encoder : Lavc61.6.100 libshine
[out#0/mp3 @ 0x60633b423480] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
[out#0/mp3 @ 0x60633b423480] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used)
size= 0KiB time=N/A bitrate=N/A speed=N/A 



Editly code for generating FFMPEG query :


let inStream = '[0:a]';
 const filterGraph = clipAudio.slice(0, -1).map(({ transition }, i) => {
 const outStream = `[concat${i}]`;

 const epsilon = 0.0001; // If duration is 0, ffmpeg seems to default to 1 sec instead, hence epsilon.
 let ret = `${inStream}[${i + 1}:a]acrossfade=d=${Math.max(epsilon, transition.duration)}:c1=${transition.audioOutCurve || 'tri'}:c2=${transition.audioInCurve || 'tri'}`;

 inStream = outStream;

 if (i < clipAudio.length - 2) ret += outStream;
 return ret;
 }).join(',');

 const args = [
 ...getFfmpegCommonArgs({ enableFfmpegLog }),
 ...(flatMap(clipAudio, ({ path }) => ['-i', path])),
 '-filter_complex',
 filterGraph,
 '-c', 'flac',
 '-y',
 outPath,
 ];
 await execa(ffmpegPath, args);



FFMPEG query structure :


ffmpeg -i /editly-tmp-.../clip000-audio.flac -i /editly-tmp-.../clip226-audio.flac -i ... -filter_complex [0:a][1:a]acrossfade=d=1:c1=tri:c2=tri[concat0],[concat0][2:a]acrossfade=d=0.425:c1=tri:c2=tri[concat1],[concat1][3:a]acrossfade=d=0.425:c1=tri:c2=tri[concat2],... -c flac -y /editly-tmp-.../audio-concat-3.mp3



My hardware :


Ubuntu 24.04 LTS
AMD Ryzen™ 5 5600G
Only 8gb(the other slot is broken)
AMD Radeon™ RX 580 2048SP



Sorry my poor english :P


Change Codecs, FFMPEG version, node version, slice the files in chunks, change SO(worked in Windows).


-
How to stack several videos using ffmpeg ?
13 juillet 2019, par JohnI have four cameras that are recording videos and wand to stack all videos into one video file. The final video must be a 2x2 grid.
THE HARD PART is that sometimes cameras are not recording simultaneously.
Here you can see one situation of how cameras are recording :
Camera 1 timeline: |recording....................................|
Camera 2 timeline: |stopped....|recording........................|
Camera 3 timeline: |recording.........|stopped....|recording.....|
Camera 4 timeline: |recording..................|stopped..........|Explanation :
- Camera 1 is recording all time.
- Camera 2 is starting recording later.
- Camera 3 is recording, then stopped a period of time, then again recording.
- Camera 4 is recording a period of time, then stopped.
In the final video I want to synchronize each video by timestamps.
If a camera is stopped a period of time then at its position must be a black portion.
How can I do this ?