
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (100)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ;
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (14779)
-
How to Generate accurate thumbnails with FFMPEG
5 juillet 2023, par Caloux FldI am using FFmpeg for generating thumbnails map.


I need to generate a thumbnail for every second. Here is code i use on Windows :


ffmpeg -i "C:\temp\MyVideo.mp4" -vf "drawtext=fontfile=../Fonts/calibri.ttf: text=%%`
`{n}: r=25: x=(w-tw)/2: y=h-lh-122: fontsize=295: fontcolor=Red: box=0:` `boxcolor=Black,fps=1/1" -s 400x300 -vcodec ppm -f image2pipe - | montage - -`
 `tile 10x -geometry 200x+0+0 C:\temp\Thumbnailer.jpg`



Code Work's Fine , generate a thumbnails map with piping FFMPEG+Imagemagick (montage).
In ffmpeg i burn the frame number to check accuracy.


Only problem is FFMPEG start generating at frames 12, 37, 62, 87...(video is 25 fps).


How to start generating thumbnails at first frame #1 accurate ?


In FFMPEG i try options like
-ss 00:00:00.0
but FFMPEG start always at frame 12.
Only solution i found is to generate all frames (25fps) and post process to keep frames number 1,25,50... but very slow post process...

My FFMPEG version : ffmpeg version N-88153-ga4743d2574-Reino


-
Ffmpeg outputting empty mp4 files for video concatenation command [closed]
25 janvier 2024, par nonsequiterWhen I run the following Ffmpeg command it produces empty mp4 files as an output.


The command takes segments of a video as inputs, crops each input at particular locations, and then concatenates them (for complex filter see appendices) :


ffmpeg -ss 551.389000 -t 47.292417 -i ./testo.mp4 -ss 598.681417 -t 34.217583 -i ./testo.mp4 
-y -filter_complex "" -map "[video-output]" -map "[audio-output]"
-vcodec libx264 -r 59.94005994005994 -b:v 6890k -movflags faststart ./out.mp4



I have used this command for thousands of videos, but for this particular video it causes this empty mp4 files. Depending on the specific regions of the video that I specify as inputs, sometimes the command works without issues. The inputs supplied for this video are valid, as the video is 15mins or so.


Here are the relevant output logs for the video (see appendices for all other input/output) :


[vost#0:0/libx264 @ 0xfae9410] No filtered frames for output stream, trying to initialize anyway.
[aost#0:1/aac @ 0xfaeab60] No filtered frames for output stream, trying to initialize anyway.
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
[mp4 @ 0xfae88d0] Starting second pass: moving the moov atom to the beginning of the file
[out#0/mp4 @ 0xfae87d0] video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[out#0/mp4 @ 0xfae87d0] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used)
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=N/A bitrate=N/A speed=N/A 
[libx264 @ 0xfae9790] final ratefactor: 17.79
[aac @ 0xfaeaee0] Qavg: nan



Main insights from outputs :


- 

- The output
tbn
is 1000k (usually 60k) "No filtered frames for output stream"
for both video and audio outputs.






Things I have tried :


- 

- I have a feeling its to do with the video frame-rate, so I tried using several permutations of commands like
fps_mode
,video_track_timescale
,copytb
, andenc_time_base
. - Unsetting output fps
- Changing input locations (this works)
- Removing the complex filter makes no difference (details not removed for history)










Appendices


Here is the ffprobe input for the video, which was downloaded from YouTube :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/video.mp4':
Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.16.100
Duration: 00:14:31.44, start: 0.000000, bitrate: 939 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 6848 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc.
 vendor_id : [0][0][0][0]
Stream #0:1[0x2](eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, fltp, 105 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]



Ffmpeg output format, note the very high
tbn
value (usually this is 60k) :

Output #0, mp4, to './out.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.16.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 608x1080 [SAR 1:1 DAR 76:135], q=2-31, 6890 kb/s, 59.94 fps, 1000k tbn
 Metadata:
 encoder : Lavc60.31.102 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/6890000 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc60.31.102 aac



Complex filter :


[0:a]asetpts=PTS-STARTPTS[audio-input-0]; # set pts for audio of input 1
[0:v]setpts=PTS-STARTPTS[post-label-0]; # set pts for video of input 2
[post-label-0]crop=608:1080:461:0[post-crop-0]; # crop input 1
[1:a]asetpts=PTS-STARTPTS[audio-input-1]; # set pts for audio of input 1
[1:v]setpts=PTS-STARTPTS[post-label-1]; # set pts for video of input 2
[post-label-1]crop=608:1080:539:0[post-crop-1]; # crop input 2
[post-crop-0][post-crop-1]concat=n=2:v=1:a=0[post-merge]; # concat video streams
[audio-input-0][audio-input-1]concat=n=2:v=0:a=1[audio-merged]; #concat audio streams
[post-merge]scale=608:1080,setsar=1[post-scale]; # scale video output
[post-scale]null[video-output]; # relabel
[audio-merged]anull[audio-output] # relabel



Full command log can be found here : https://pastebin.com/5CpnaUvg


- The output
-
ffmpeg overlay voice on a song with fade in and fade out
22 octobre 2016, par MehmedI have a fade in and fade out problem and used below code, but not completely resolve.
I have a voice as voice.mp3 name withvoice_length
seconds length and a song that biggest from voice.
I want mix with song fromstart_mix_time
time.
When voice start volume should be0.2
and when voice end, volume return to1.0
.For example, if i have a voice by 10 s length and a song, song start playing and at position 3 s, starting to fade out to vol 0.2 and then, at 5 s, voice start over song and after 10 seconds, song fade in to vol 1 and play to end.
Here is a sample :
ffmpeg -i song1.mp3 -i voice2.mp3 -filter_complex "[0]asplit[a][b]; \
[a]atrim=duration=voice_length,volume='1-max(0.25*(t-start_mix_time-2),0)':eval=frame[pre]; \
[b]atrim=start=start_mix_time,asetpts=PTS-STARTPTS[song]; [song][1]amix=inputs=2:duration=first:dropout_transition=2[post]; \
[pre][post]concat=n=2:v=0:a=1[mixed]" \
-map "[mixed]" output.mp3@Mulvya