
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (45)
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Les thèmes de MediaSpip
4 juin 20133 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
Thèmes MediaSPIP
3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5177)
-
Re-encode mp4 files to working hls (m3u8) segment files
6 août 2022, par gameboysMy issue is that I need to create a hls playlist with all the segments being below 8 MB. At first, I generated all the segments and then checked if they were all under 8MB and if not rerun with a lower
-hls_time
but this could take a long period of time with high-quality videos. Then after some research realized that FFmpeg seems not to natively support file size limiting segments. I found this answer on splitting up mp4 video so that they are all under a certain length, but now I can't get them working in an actual m3u8 file.

If I keep them as an mp4 file I get this from vlc :


no moov before mdat and the stream is not seekable



I attempted to fix it by running
-movflags faststart
But then I get this from mpv (I read that vlc might have some issues with hls playlists)

[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it



After this, I attempted to switch the mp4 splitter script to outputting .ts files but this just caused even more issues. It turns out that hls playlists require precise timestamps in each segment of a ts file otherwise it just start jumping around the video. Theses are the errors that mpv put in terminal


ffmpeg/demuxer] mpegts: Packet corrupt (stream = 0, dts = 1194750).
[ffmpeg/demuxer] mpegts: DTS 127271 < 1194750 out of order 
[ffmpeg/demuxer] hls: DTS 127271 < 1194750 out of order 
AV: 00:00:11 / 00:10:29 (1%) A-V: 0.000
Invalid audio PTS: 11.911837 -> 0.000000
Reset playback due to audio timestamp reset.
(...) AV: 00:00:00 / 00:10:29 (0%) A-V: 0.000
Invalid video timestamp: 11.875000 -> 0.014122
AV: 00:00:11 / 00:10:29 (1%) A-V: 0.000

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).



So I attempted to write a script to fix these issues by adding the timestamps back in :


def get_length(filename): //https://stackoverflow.com/questions/3844430/how-to-get-the-duration-of-a-video-in-python

 result = subprocess.run(["ffprobe", "-v", "error", "-show_entries",
 "format=duration", "-of",
 "default=noprint_wrappers=1:nokey=1", filename],
 stdout=subprocess.PIPE,
 stderr=subprocess.STDOUT)
 return float(result.stdout)
dirr = 0
for fi in sorted(os.listdir('out'), key=lambda k: int(k.split(".")[0]) if not ".m3u8" in k else 0):
 if fi.endswith(".ts"):
 fn = os.path.join("out", fi)
 ln = get_length(fn)
 print(dirr, fn)
 os.system(f"ffmpeg -i {fn} -muxdelay {dirr} tmp.ts ; mv tmp.ts {fn}")
 dirr+=ln



But somehow this still didn't work and mpv would report that the timestamps were different then what I gave them.


Invalid audio PTS: 11.911837 -> 23.833333
Reset playback due to audio timestamp reset.
(...) AV: 00:00:00 / 00:10:29 (0%) A-V: 0.000
Invalid video timestamp: 11.885911 -> 23.844244



If anybody knows how to Re-encode the mp4 files which are limited in file size please help me out, at this point, it appears that it may well be impossible.


In case it somehow matters I was using this video for testing.


-
Reduce latency in ffmpeg snapshot
3 décembre 2015, par Acorian0I have a latency problem with FFMPEG.
I have a streaming server running and I occasionally need to take multiple snapshots over a period of time (in the example below, 5s), and then examine the snapshots taken. Time is critical.
With this command I take 25 frames per second over 5 seconds, meaning I will have 125 snapshots in my folder.
ffmpeg.exe -ss 0.05 -re -i udp://239.255.0.xx:xxxx -ss 0 -vf fps=25 -to 5 -y \Test\%5d.jpg
The
-vf fps
is forcing the 25 frames per second even if the server can’t provide them.The problem is that
-ss 0.05
is not doing its job. It is supposed to delay the initial snapshot for 50 milliseconds but FFMPEG takes around 200ms to "start" the service on itself :/. This means the first snapshot is taken after around 200ms after I called the service. (200ms is way too big of a latency for my purpose... I can survive with 100ms)How can I force FFMPEG to start taking snapshots earlier ? Or is there a way to get snapshots, let’s say, from the buffer (e.g. start taking snapshots 150ms in the past) ?
PS : Changing the
-ss
from 0.05 to 0.00 is not doing anything, I can only see the-ss
doing something if the value is bigger than 0.2/0.25. Another thing, using a newer version of FFMPEG is by now impossibleSample OUTPUT :
ffmpeg version 2.4.5 Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 30 2014 14:53:50 with gcc 4.9.2 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32thread
s --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-icon
v --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable
-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencor
e-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-l
ibschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-li
bvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-l
ibwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --ena
ble-lzma --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
[mpeg2video @ 01d77120] Invalid frame dimensions 0x0.
Input #0, mpegts, from 'udp://239.255.0.14:5014':
Duration: N/A, start: 159.051978, bitrate: 105241 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg1video ([2][0][0][0] / 0x0002), yuv420p(tv), 1920x1080 [SAR 1:1 D
AR 16:9], 104857 kb/s, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
[swscaler @ 01d70060] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'C:\Test\%5d.jpg':
Metadata:
encoder : Lavf56.4.101
Stream #0:0: Video: mjpeg, yuvj420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25
tbn, 25 tbc
Metadata:
encoder : Lavc56.1.100 mjpeg
Stream mapping:
Stream #0:0 -> #0:0 (mpeg1video (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 125 fps= 25 q=24.8 Lsize=N/A time=00:00:05.00 bitrate=N/A dup=1 drop=0
video:9710kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown -
ffmpeg-python drawtext after concatenating mp4 videos
2 mars 2020, par user2355051I realize a similar question has been asked here, so before pointing to that question and answer, please understand that my question is different. I’m hoping that someone can point me in the right direction.
In short, I have 5 video segments that I’m concatenating and reordering based on user input. Is there a way that I can drawtext dynamically over the input without having to process the video a second time ?
This is the code that I have which is working, but as you can see, I need to open the concatenated file and apply the text over that version. Then the file is saved as a duplicate.
I’m looking for a more elegant way to accomplish this. Any suggestions would be appreciated.
video1 = ffmpeg.input('./assets/v_1.mp4')
video2 = ffmpeg.input('./assets/v_2.mp4')
video3 = ffmpeg.input('./assets/v_3.mp4')
video4 = ffmpeg.input('./assets/v_4.mp4')
video5 = ffmpeg.input('./assets/v_5.mp4')
print(row)
## IF Row 1 and 2 have values they get all five.
if row[1] == '1' and row[2] == '1':
print("Matches here");
outfile = row[0]+'.mp4'
##DO Stuff
joined = ffmpeg.concat(video1.video,video1.audio,video2.video,video2.audio,video3.video,video3.audio,video4.video,video4.audio,video5.video,video5.audio, v=1,a=1,unsafe=1).node
vj = joined[0]
va = joined[1].filter('volume', 1)
out = ffmpeg.output(vj,va, outfile)
out.run()
## Once Concat Video is finished, then it draws text over the video.
input2 = ffmpeg.input(row[0]+'.mp4').drawtext(fontfile='/Users/jserra/Library/Fonts/Cocogoose-Condensed-Regular-trial.ttf',fontsize='60',timecode='00:00:00:00',r=60,text=row[0],fontcolor='black',escape_text=True)
ffmpeg.output(input2,row[0]+'_1.mp4').run()I’ve tried this and receive the following error :
video1 = ffmpeg.input('./assets/StMarys_1.mp4').drawtext(fontfile='/Users/jserra/Library/Fonts/Cocogoose-Condensed-Regular-trial.ttf',fontsize='60',timecode='00:00:00:00',r=60,text=row[0],fontcolor='black',escape_text=True)
Error :
.virtualenvs/cvtesting/lib/python3.6/site-packages/ffmpeg/_run.py", line 93, in _allocate_filter_stream_names
upstream_node, upstream_label
ValueError: Encountered drawtext(fontcolor='black', fontfile='/Users/jserra/Library/Fonts/Cocogoose-Condensed-Regular-trial.ttf', fontsize='60', r=60, text='jack', timecode='00:00:00:00') <1d2ff6bbf3f0> with multiple outgoing edges with same upstream label None; a `split` filter is probably requiredI’ve also tried chaining it after the videos are concatenated with
joined
. I still receive errors.joined = ffmpeg.concat(video1.video,video1.audio,video2.video,video2.audio,video3.video,video3.audio,video4.video,video4.audio,video5.video,video5.audio, v=1,a=1,unsafe=1).drawtext(fontfile='/Users/jserra/Library/Fonts/Cocogoose-Condensed-Regular-trial.ttf',fontsize='60',timecode='00:00:00:00',r=60,text=row[0],fontcolor='black',escape_text=True).node
Will I need to process these videos twice ? If there are any optimizations that I can make please let me know. Also, if there are any pointers about displaying the drawn text for a certain period of time, the documentation seems kinda spotty as it relates to controlling the duration, I’m not sure what the values mean or how they impact each other.
Thanks