
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (111)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)
Sur d’autres sites (7429)
-
FFmpeg stream extraction modifies subtitles [closed]
21 mai 2024, par user18812922I have a video with the following ffprobe output :


Input #0, matroska,webm, from 'video.mkv':
 Metadata:
 title : Video - 01
 creation_time : 2021-07-14T02:49:59.000000Z
 ENCODER : Lavf58.29.100
 Duration: 00:22:57.28, start: 0.000000, bitrate: 392 kb/s
 Chapters:
 Chapter #0:0: start 0.000000, end 86.169000
 Metadata:
 title : Opening
 Chapter #0:1: start 86.169000, end 641.266000
 Metadata:
 title : Part A
 Chapter #0:2: start 641.266000, end 651.359000
 Metadata:
 title : Eyecatch
 Chapter #0:3: start 651.359000, end 1286.160000
 Metadata:
 title : Part B
 Chapter #0:4: start 1286.160000, end 1356.355000
 Metadata:
 title : Ending
 Chapter #0:5: start 1356.355000, end 1376.876000
 Metadata:
 title : Preview
 Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 854x480 [SAR 1280:1281 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
 Metadata:
 DURATION : 00:22:56.959000000
 Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
 Metadata:
 title : English [FLAC 2.0]
 DURATION : 00:22:57.278000000
 Stream #0:2(jpn): Audio: vorbis, 48000 Hz, stereo, fltp
 Metadata:
 title : Japanese [FLAC 2.0]
 DURATION : 00:22:57.276000000
 Stream #0:3(eng): Subtitle: ass (ssa)
 Metadata:
 title : Signs and Songs [FMA1394/Redc4t]
 DURATION : 00:22:51.090000000
 Stream #0:4(eng): Subtitle: ass (ssa)
 Metadata:
 title : English [FMA1394/Redc4t]
 DURATION : 00:22:51.090000000
 Stream #0:5(eng): Subtitle: hdmv_pgs_subtitle (pgssub), 1920x1080
 Metadata:
 title : Full English Retail
 DURATION : 00:22:51.120000000
 Stream #0:6: Attachment: ttf
 Metadata:
 filename : 8bitoperator.ttf
 mimetype : application/x-truetype-font
 Stream #0:7: Attachment: ttf
 Metadata:
 filename : Cabin-Bold.ttf
 mimetype : application/x-truetype-font
 Stream #0:8: Attachment: ttf
 Metadata:
 filename : calibrib.ttf
 mimetype : application/x-truetype-font
 Stream #0:9: Attachment: ttf
 Metadata:
 filename : daniel_0.ttf
 mimetype : application/x-truetype-font
 Stream #0:10: Attachment: ttf
 Metadata:
 filename : DEATH_FONT.TTF
 mimetype : application/x-truetype-font
 Stream #0:11: Attachment: ttf
 Metadata:
 filename : Dominican.ttf
 mimetype : application/x-truetype-font
 Stream #0:12: Attachment: ttf
 Metadata:
 filename : gishabd.ttf
 mimetype : application/x-truetype-font
 Stream #0:13: Attachment: ttf
 Metadata:
 filename : PATRICK_0.TTF
 mimetype : application/x-truetype-font
 Stream #0:14: Attachment: ttf
 Metadata:
 filename : Qlassik-Medium.ttf
 mimetype : application/x-truetype-font
Unsupported codec with id 98304 for input stream 6
Unsupported codec with id 98304 for input stream 7
Unsupported codec with id 98304 for input stream 8
Unsupported codec with id 98304 for input stream 9
Unsupported codec with id 98304 for input stream 10
Unsupported codec with id 98304 for input stream 11
Unsupported codec with id 98304 for input stream 12
Unsupported codec with id 98304 for input stream 13
Unsupported codec with id 98304 for input stream 14



I am trying to extract the subtitles, edit them and reattach them to the video.
(I need my program to do that so I don't want to use other software)


Command 1


ffmpeg -i video.mkv -map 0:3 -c:s ssa subs.ass
ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



Command 2


ffmpeg -i video.mkv -map 0:3 subs.ass
ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



Command 3


ffmpeg -i video.mkv -map 0:3 subs.srt
ffmpeg -i video.mkv -i subs.srt -map 0 -map -0:s -map 1 -c copy out.mkv



Command 4


ffmpeg -i video.mkv -map 0:3 subs.srt
ffmpeg -i subs.srt subs.ass
ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



Command 5


ffmpeg -i video.mkv -map 0:3 subs.ass
ffmpeg -i subs.ass subs.srt
ffmpeg -i video.mkv -i subs.srt -map 0 -map -0:s -map 1 -c copy out.mkv



The problem


After extraction the subtitles seem to be really quick, meaning they are displayed and disappear really quickly.


For example the first subtitle is as follows in srt :


1
00:00:03,100 --> 00:00:03,560
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>



Now, in srt it also has wrong size but I assume that's because of the conversion from ass to srt.


If I reattach the subtitle file in the video and open it, it is displayed and disappears way too fast and it doesn't match the original subtitles in the video.


(ie, the original video subtitles are showing for at least a second)


Expected behaviour


The subtitles should be displayed for the same duration as the original subtitles.


NOTE


It's my first question for ffmpeg related issues so feel free to ask me for anything else you may need.


UPDATE 1


I realized that the subtitles were ok for the timings as they had the same line multiple times, so the problem for not playing is something else.


Example of the file


1
00:00:03,100 --> 00:00:03,560
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>

2
00:00:03,560 --> 00:00:04,650
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>

3
00:00:04,650 --> 00:00:05,100
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>



So the problem is that VLC doesn't show more than the first subtitle.


The strange thing is when I use the below command


ffmpeg -i video.mkv -i subs.srt -map 0 -map -0:s -map 1 -c copy -c:s subrip out.mkv



Then more lines of the subtitle (but not all) play.


It stops at the 17th line.


I believe that's an encoder's problem ? but I really don't know.


Also what I noticed is that VLC stops the subtitles but Windows Media Player (Windows 11 version) display the subtitles correctly even after the 17th line.


BUT, if I add subtitles from another video they are played correctly in both VLC and Windows Media Player.


Update 2
As @Gyan said in his answer I should use the following command


ffmpeg -i video.mkv -map 0:3 -c:s copy subs.ass



But then if I attach the subs again with


ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy -c:s ass out.mkv



The subtitles show up to 17th line in both VLC and Windows Media Player.


or


ffmpeg -i video.mkv -i .\subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



The subtitles do not show up at all. (Not even in Windows Media Player)


-
Reject multiple headers of the same type.
7 janvier 2015, par Tim TerriberryReject multiple headers of the same type.
A common application pattern is to call vorbis_synthesis_headerin()
and count how many times it succeeds.
If you feed it multiple valid comment headers, they will all
succeed, meaning you can be fooled into think you have a valid
Vorbis file despite never seeing a setup header.
This patch makes libvorbis reject multiple headers of the same type,
preventing this from occurring.git-svn-id : http://svn.xiph.org/trunk/vorbis@19426 0101bb08-14d6-0310-b084-bc0e0c8e3800
-
Slicing video on several short clips of different lengths in one go
1er décembre 2019, par IgniterI’ve got time codes using which I want to slice a short MP4 video (average length 5-7 minutes)
[ 0, 15, 35, 52, 142, 215, ...] // time codes in seconds
Usually there are 5-7 time codes meaning that I need to create 5-7 clips out of my initial video
The fist clip is from start to 15 sec, the second one is from 15 sec to 35 sec, 35-52, etc.It’s trivial operation in Bash but I’m using ffmpeg on NodeJS and I’d like to do it without iteration in one go
// Slicing a single clip
ffmpeg -i input.mp4 -ss 0 -to 15 -c copy clip-01.mp4
// Same command in NodeJS
ffmpeg(`/tmp/${id}/input.mp4`)
.renice(5)
.outputOptions([
'-ss 0',
'-to 15',
'-c copy'
])
.on('end', () => {})
.on('error', (e, stdout, stderr) => {})
.save(`/tmp/${id}/clip-01.mp4`);No need for re-encoding, no need for precise timestamps (1 second out of sync is OK)
Any thoughts or ideas would be greatly appreciated !