
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (77)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (8586)
-
Concatenate audio parts of different videos with ffmpeg [migrated]
15 août 2024, par SwikeSo I have two videos :


- 

Vid_eng.mkv
is a high resolution video that has the audio in English.Vid_esp.mkv
is a low resolution video that has the audio in Spanish.






Both videos are showing more or less the same stuff but the difference is that the Spanish one has the intro and outro cut out (the first 66 seconds are missing).


I want to create a new video file,
Vid_out.mkv
that has theVid_eng.mkv
video and both audios (so the final file has multistream audio). The issue is that the Spanish audio will not be in sync with the high resolution video, so what I did was this :

ffmpeg -i Vid_eng.mkv
 -f lavfi -t 66 -i anullsrc -i Vid_esp.mkv
 -filter_complex "[1:a][2:a]concat=n=2:v=0:a=1[outa]"
 -map 0 -map "[outa]"
 -metadata:s:a:0 language=eng
 -metadata:s:a:1 language=spa
 -disposition:a:1 default
 -c:v copy Vid_out.mkv



What I'm doing here is essentially creating the new
Vid_out.mkv
using the video fromVid_eng.mkv
, the audio multistream from bothVid_eng.mkv
andVid_esp.mkv
, but with the twist that the audio fromVid_esp.mkv
is actually beginning 66 seconds later (so that it is synced with the English video). I did this by adding 66 seconds of silence (with-f lavfi -t 66 -i anullsrc
) and concatenating that silence with the Spanish audio (with-filter_complex "[1:a][2:a]concat=n=2:v=0:a=1[outa]"
) before adding this concatenated audio stream to the final file as the secondary audio. Also I included some metadata to know the which audio is which.

Everything good for the moment. But now I wanted to try something more sophisticated : instead of having 66 seconds of silence concatenated to the Spanish audio I want 66 seconds of the English audio (the audio from
Vid_eng.mkv
), then the audio fromVid_esp.mkv
, and finally when the Spanish audio has finished and the video is still going, I want the English audio again. So, instead of silence at the beginning and end of the video when played with the secondary audio stream, what I want is the English audio to play. How can I do that with ffmpeg ?


For reference I've been following ideas from these answers :


- 

- How to add audios from different videos into one multistream video
- How to add a few seconds of silence to an audio






-
Encoding real, source duration of a timelapse into MP4 container using FFMPEG (GoPro) [closed]
13 août 2024, par Marek TowarekFootage recorded with GoPro TimeLapse / TimeWarp, indicates the total, real-time duration of recorded data, while the video stream is of reduced length by the timelapse interval.


General
Complete name : E:\Video\GoPro\GoPro\GH010656.MP4
Format : MPEG-4
Format profile : Base Media / Version 1
Codec ID : mp41 (mp41)
File size : 1.94 GiB
Duration : 22 min 55 s
Overall bit rate mode : Variable
Overall bit rate : 12.1 Mb/s

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5
Format settings : CABAC / 2 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference : 2 frames
Format settings, GOP : M=1, N=15
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 4 min 35 s
Bit rate mode : Variable
Bit rate : 60.0 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Rotation : 180°
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.724
Stream size : 1.92 GiB (99%)
Title : GoPro AVC 
Language : English
Color range : Limited
colour_range_Original : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC

Other #1
ID : 2
Type : Time code
Format : QuickTime TC
Duration : 4 min 35 s
Bit rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Title : GoPro TCD 
Language : English

Other #2
Type : meta
Duration : 22 min 55 s
Source duration : 4 min 35 s
Bit rate mode : Variable
Stream size : 15.0 MiB
Source stream size : 15.0 MiB



This information could be omitted.

But it becomes quite important for correctness of GPS Data stored in Stream #2.

Unfortunately, all the settings I have tried for FFMPEG, do not preserve the duration of Stream #2.
& the output ends up looking like this :


General
Complete name : C:\Video_Encode\GoPro\GH010656.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/mp41)
File size : 717 MiB
Duration : 4 min 35 s
Overall bit rate : 21.9 Mb/s
Encoded date : UTC 2026-03-29 11:28:23
Tagged date : UTC 2026-03-29 11:28:23
Writing application : Lavf61.5.101

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L5@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 4 min 35 s
Bit rate : 21.4 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 0)
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.258
Stream size : 702 MiB (98%)
Title : GoPro AVC 
Writing library : x265 3.6+35-dd594f59d:[Windows][GCC 14.1.0][64 bit] 8bit+10bit+12bit
Language : English
Encoded date : UTC 2026-03-29 11:28:23
Tagged date : UTC 2026-03-29 11:28:23
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : hvcC

Other #1
ID : 2
Type : Time code
Format : QuickTime TC
Duration : 4 min 35 s
Frame rate : 29.970 (30000/1001) FPS
Time code of first frame : 17:55:35:02
Time code of last frame : 18:00:09:28
Time code, stripped : Yes
Title : GoPro TCD 
Language : English
Default : Yes
Alternate group : 2
Encoded date : UTC 2026-03-29 11:28:23
Tagged date : UTC 2026-03-29 11:28:23
mdhd_Duration : 275175

Other #2
Type : meta
Duration : 4 min 35 s
Bit rate mode : Variable



Any ideas how to preserve that real time duration indicator ?

Here is the FFMPEG binary I use to get the TMCD & GMPD data to copy : GitHub Link

-
Using FFMPEG and PHP to encode HLS video on the fly
21 avril 2024, par mrsmithI'm re-encoding a MP4 video to HLS using FFMPEG with PHP. I'm trying to then directly serve to the output to a HTML page's
<video></video>
tag. The following script (encode.php) encodes the video as I require and it works if I use the script url directly in VLC player for example but I'm struggling to get the gtml page to play it. The resulting video file should be compatible with most browsers. I usevideo.src = 'encode.php'
on my player html page.

Any help appreciated.


<?php

$input_video = 'whatever.mp4';

// video passthrough
// hls format
// audio (english strems only) to aac (6 channel)
// output to stdout

$ffmpeg_command = 'ffmpeg -i ' . escapeshellarg($input_video) . ' -map 0:v -c:v copy -map 0:a:m:language:eng -c:a aac -ac 6 -b:a 320k -f hls -hls_time 30 -hls_list_size 120 -start_number 0 -';

$handle = popen($ffmpeg_command, 'rb');

header('Content-Type: application/vnd.apple.mpegurl');
header('Content-Disposition: inline; filename="output.m3u8"');

// stream the output to the browser
fpassthru($handle);
pclose($handle);
?>