
Recherche avancée
Autres articles (78)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (4819)
-
ffmpeg extract first subtitle for given language or fix mismapped tracks
11 mars 2023, par iarwain8aI'm developing a server to encode any given video and I need to extract its subtitles.


I've tried something like this which worked :


ffmpeg -i pipe:0 -map 0:s:1 -c:s webvtt -f segment -segment_list_flags +live -segment_time 60 -segment_list subs_eng.m3u8 -segment_format webvtt subs_eng.vtt -loglevel debug



This encodes from srt, into webvtt, the second track which happens to be in this video an English subtitle. But very quickly I ran into a problem in which the tracks mappings are not numbered correctly for this video, for example, the (eng) track should be "-map 0:s:2", but it's "-map 0:s:1" as I've said before, and the (bul) track, which should be "-map 0:s:4" is actually "-map 0:s:2".


Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
 Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
 Stream #0:2(eng): Subtitle: subrip
 Metadata:
 title : English
 Stream #0:3(eng): Subtitle: subrip
 Metadata:
 title : English [SDH]
 Stream #0:4(bul): Subtitle: subrip
 Metadata:
 title : Bulgarian (Bulgaria)



Given said problem I tried something like this :


ffmpeg -i pipe:0 -map 0:s:m:language:eng -c:s webvtt -f segment -segment_list_flags +live -segment_time 60 -segment_list subs_eng.m3u8 -segment_format webvtt subs_eng.vtt -loglevel debug



Which didn't work because I can't or don't know how, to actually select the first result of this "-map 0:s:m:language:eng" if there is more than 1 "eng" sub track. Is there a way to do this ?
Or the alternative should be : Is there a reason why the metadata of this file is mismapped ? If so is there a way to detect it, to then do something about it ? or have it fixed ?


-
ffmpeg extract first subtitle for given language or fix missmaped tracks
11 mars 2023, par iarwain8aI'm using developing a server to encode any given video and I need to extract its' subtitles.


I've tried something like this which worked :


ffmpeg -i pipe:0 -map 0:s:1 -c:s webvtt -f segment -segment_list_flags +live -segment_time 60 -segment_list subs_eng.m3u8 -segment_format webvtt subs_eng.vtt -loglevel debug



This encodes from srt, into webvtt, the second track which happens to be in this video an english subtitle. But very quickly I ran into a problem in which the tracks mappings are not numbered correctly for this video, for example, the (eng) track should be "-map 0:s:2", but it's "-map 0:s:1" as I've said before, and the (bul) track, wich should be "-map 0:s:4" is actually "-map 0:s:2".


Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
 Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
 Stream #0:2(eng): Subtitle: subrip
 Metadata:
 title : English
 Stream #0:3(eng): Subtitle: subrip
 Metadata:
 title : English [SDH]
 Stream #0:4(bul): Subtitle: subrip
 Metadata:
 title : Bulgarian (Bulgaria)



Given said problem I tried something like this :


ffmpeg -i pipe:0 -map 0:s:m:language:eng -c:s webvtt -f segment -segment_list_flags +live -segment_time 60 -segment_list subs_eng.m3u8 -segment_format webvtt subs_eng.vtt -loglevel debug



Which didn't work because I can't or don't know how, to actually select the first result of this "-map 0:s:m:language:eng" if there is more than 1 "eng" sub track. Is there a way to do this ?
Or the alternative should be : Is there a reason why the metadata of this file is missmapped ? If so is there a way to detect it, to then do something about it ? or have it fixed ?


-
Extract subtitle by language code via ffmpeg
7 mai 2023, par TrustFoundI have a simple task - extract subtitle for exact language from tvshows.
For example, I want to extract English subtitles from Netflix's show.
As you know there're a few different types of subtitles : forced, full and SDH.
So I want to extract all of them if it has eng language code.


To extract 1 subtitle from file I used this code for windows :


FOR %%i IN (*.mkv) DO (ffmpeg.exe -i "%%i" -map 0:s:m:language:eng -c copy "%%~ni".eng.srt)



It worked fine with 1 english subtitle per file. But if it contains 2, ffmpeg shows error




SRT supports only a single subtitles stream





MI is...


- 

- Stream #0:2(eng) : Subtitle : subrip
- Stream #0:3(eng) : Subtitle : subrip
- Stream #0:4(ara) : Subtitle : subrip
- ...











So I should set 2 or more output files. I tried to figure out how to do this and found similar threads on reddit and stacksoverflow. They said there's no way to do this without ffprobe.
So I used ffprobe to parse all subtitle tracks and their language code.


FOR %%i IN (*.mkv) DO (ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 -i %%i > subs.txt)



File contains this info :


- 

- 2,eng
- 3,eng
- 4,ara
- ...











As I understand I should use integers and set them values 2 and 3. I want to get output like this




- 

- MovieName.2.eng.srt
- MovieName.3.eng.srt








If it easier to extract all subs, let it be. I tried to do this too but I dont know how to set integers and use them :(
So what I should do ?
Thanks in advance