Resman says hi.

Procédure d'extraction de sous-titres d'un DVD

Petit aide-mémoire que j'ai écrit pour mon usage personnel.

1) Récupérer la liste des sous-titres disponibles sur le DVD :

Exemple :

$ mplayer dvd://1 -vo null -ao null -frames 0 -v 2>&1 | grep sid
[open] subtitle ( sid ): 0 language: fr

2) Extraire le sous-titre voulu :

  1. Déterminer l'ID du sous titre = 0x20 + sid trouvé en 1)
  2. L'extraire :
    • Depuis le DVD (5~10 minutes) :
      tccat -i /dev/dvd -T 1 -L | tcextract -x ps1 -t vob -a 0x20 > subs
    • Si le sous-titre a été extrait avec DVD::Rip :
      cat rip/avi/001/rip-001-sid00.sub | tccat -T 1 -L | tcextract -x ps1 -t vob -a 0x20 > subs

3) Convertir le fichier obtenu en images .pgm :

subtitle2pgm -o prefixe -c 255,255,0,255 < subs

On obtient une série de fichiers prefixeNNNN.pgm, ainsi qu'un ficher d'index prefixe.srtx. Si nécessaire on peut jouer sur le paramètre -c pour obtenir un bon contraste.

4) Effectuer l'OCR sur les images :

pgm2txt prefixe

Il se peut que les espaces entre mots ou lettres soient mal reconnus, dans ce cas il faut modifier /usr/bin/pgm2txt et changer la ligne GOCR_OPTIONS_AUTO="-s 10 -m 130" :

5) Corriger éventuellement l'orthographe :

ispell -d francais prefixe*.txt

6) Convertir le tout en un fichier .srt :

srttool -s -w < prefixe.srtx > sortie.srt

7) Voilà :)

Il ne reste plus qu'à l'utiliser conjointement avec un lecteur vidéo, ou à l'inclure dans un conteneur approprié.

Comments

Comment left by murz on 2020-09-24 12:46:25 :
wall and floor tiles
floor tiles
Comment left by tazama on 2020-09-12 14:29:51 :
Are you a traveller and would like to visit Morocco? Then, your trip is sure to be hitch-free when you travel through a reliable morocco desert tours . Explore Morocco trips, and discover the best time and places to visit. Morocco is a country with a mixture of old world charm and a modern Muslim atmosphere. It is a country with a conglomeratofvarious cultures, including African, Berber, British, French, and Spanish. marrakech travel agency Variety of best things to do and see is adverse when you have a trip to Morocco, with a recommended travel Agency in Morocco, like Top Morocco Travel. 3 days marrakech to fes desert tour .
Comment left by Alum Altul on 2020-08-25 13:39:49 :
Thanks for sharing such an Amazing information, I Couldn't leave without reading your blog. I have read another good blog, I think you have read it too. click here Trend Micro klantendienst
Comment left by Tinojems on 2020-08-22 13:57:31 :
Tile Visualizer
Tiles Visualizer
Comment left by Marcelo on 2020-08-19 17:13:57 :
Really interesting.
We will use this info for our site https://www.talking2trees.com/
Comment left by Prince on 2020-08-19 14:55:23 :
Thanks for sharing this procedure on extracting Jewelry Dayton Ohio subtitles.
Comment left by Mariam Groen on 2020-08-13 00:47:44 :
hi, your post is very helpful for me. Finally, I found exactly what i want. If need information regarding antivirus then you can visit our site ondersteuning voor Kaspersky belgie for help.
Comment left by Lily Loo on 2020-08-12 23:46:52 :
hi, Your post is very helpful for me,finally i got exactly what I want. If you want to know more about antivirus then you can visit our site Bitdefender contact belgie help.
Comment left by Maysa Lang on 2020-08-12 22:36:26 :
hi, Your post is very helpful for me, If you want to know more about antivirus then you can visit our site Canon Printer klantendienst for help.
Comment left by Tosca Klasen on 2020-08-12 21:28:29 :
hi, your post is very helpful for me. Finally, I found exactly what i want. If need information regarding printers then you can visit our site Xerox Printer klantenservice telefoonnummer for help.
Comment left by Rowan Baartman on 2020-08-12 14:23:44 :
Hi this post is very nice.finally i got all those information what i really wanted to know. thankyou for sharing this usefull information.here i want to share the information about mcafee security. as we all have been digitalied and we do multiple works together so if you face any problem or need any assist about MCAFEE so pleae visit over this site-mcafee Antivirus technische ondersteuning
Comment left by Lima Wilmink on 2020-08-12 14:19:03 :
Hi your post is really appreciatable.I really thankful for this post .here i would llike to share some information about HP Printer.We can resolve the smallest problem on same time If you are facing any problem relate to your HP Printer's so this is the right place to get smallest information about HP PRINTER for the further information please visit on our website- hp printer technische ondersteuning
Comment left by Fien Wieten on 2020-08-12 14:13:32 :
Hi your post is very nice and i am greatful to you for sharing this post with us.here i want to share some information about Norton Antivirus.As we all know how much Norton Antivirus is usefull for our laptops and mobiles.so whenever you have any query regarding Norton or need any assistance how to run or any information that time please visit over this site-norton Antivirus technische ondersteuning
Comment left by Milla Roose on 2020-08-12 14:08:33 :
Hi thankyou for this great helpful information.this information is really useful at today's time.you had easily explained whole information in a short note.now i want to share some information about avast antivirus.So if you are facing any problem regarding Avast so you can simply visit on our site-avast technische ondersteuning
Comment left by APRIL LOONEN on 2020-07-30 17:37:59 :
Thanks for sharing such an Amazing information, I Couldn't leave without reading your blog. I have read another good blog, I think you have read it too. click here Epson Printer belgie contacteren
Comment left by Sevim Özer on 2020-07-25 17:50:49 :
That’s a nice article, thank you for a great article. It helped me a lot. Keep it up Must Visit panda belgie
Comment left by Bettie Baten on 2020-07-25 17:23:11 :
Really Nice Post Admin, Very helpful looking for more posts, Now I have to share some information about How To Fix “Lexmark Troubleshooting Guide” problem. If you are going through this problem you can simply Lexmark Printer helpdesk
Comment left by Roberto on 2020-04-11 17:12:36 :
Maybe the greatest electroni website I have never seen.
Comment left by Microshort on 2019-05-09 18:30:07 :
I think I just found my new favorite site.
Comment left by Ray Thomson on 2019-02-16 16:20:04 :
How to make a miniskirt ?
Add a new comment :
Name :
Comment :

Answer the following question : Which is the smallest, a kettle or an elephant ?