User Tools

Site Tools


doc:appunti:linux:video:transcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:video:transcode [2009/09/18 17:38] niccolodoc:appunti:linux:video:transcode [2017/10/12 09:19] (current) – [avisync] niccolo
Line 34: Line 34:
 </code> </code>
  
-The output audio codec is ''**copy**'' because flv should be already in mp3 format, otherwise specify ''**mp3lame**'' codec.+The output audio codec is ''**copy**'' because flv should be already in mp3 format, otherwise we can specify something like **''%%-oac mp3lame -lameopts br=96:cbr%%''**.
  
 An insanely complicated recipe will use **mplayer to extract** the video and audio streams, then use **transcode to convert** the video to XviD (two pass, 400 kbit): An insanely complicated recipe will use **mplayer to extract** the video and audio streams, then use **transcode to convert** the video to XviD (two pass, 400 kbit):
Line 48: Line 48:
 Finally we used **avidemux** to convert audio to mp3 and to mux audio and video into an avi file. FIXME How to use transcode for this final step? Finally we used **avidemux** to convert audio to mp3 and to mux audio and video into an avi file. FIXME How to use transcode for this final step?
  
-===== How to extract subtitles from a DVD-Video into VobSub format =====+===== Estrarre audio nellymoser da un Flash Video =====
  
-**This seems to be the best method** to extract subtitles from a DVD-Video. +Un video .flv con audio in formato //nellymoser// si ascolta correttamente con mpalyer, ma l'audio estratto con **''mplayer -dumpaudio''** oppure con **''avidemux''** non viene riconosciuto ed è impossibile ascoltarloPer fortuna **''ffmpeg''** è in grado di effettuare l'estrazione e la conversione automaticamente:
- +
-The same operation can be accomplished with [[mplayer#how_to_extract_subtitles_from_a_dvd-video_into_vobsub_format|mencoder]], but mencoder seems to produce different image data into the ''**.sub**'' file and slightly different timestamps into the index (''**.idx**'') file depending on the used video codec (''-ovc'' option): strange enough, I got different outputs using //copy// and //raw// options. Transcode instead seems to be more deterministic. +
- +
-[[glossary#vobsub|VobSub]] is a well known subtitle format that saves subtitles nearly in the same format as it appears in DVD subtitle streams. From a technical point of view, VobSub saves subtitles as little images. +
- +
-We can use ''mplayer'' to identify subtitle streams contained into the DVD, they are identified by an ID and a language:+
  
 <code> <code>
-mplayer -dvd-device $RIPDIR dvd://$TITLE -identify +ffmpeg -i video.flv output_audio.wav
-... +
-ID_SUBTITLE_ID=0 +
-ID_SID_0_LANG=it +
-ID_SUBTITLE_ID=1 +
-ID_SID_1_LANG=en +
-ID_SUBTITLE_ID=2 +
-ID_SID_2_LANG=it +
-...+
 </code> </code>
  
-In the following example you will extract subtitles from a DVD-Video using the ''transcode'' tools and the ''[[subtitleripper]]'' scripts. The subtitles will be saved into the [[glossary#vobsub|VobSub]] format. Two files will be generated: ''**vobsubs-en.idx**'' and ''**vobsubs-en.sub**''. In the example 0x21 is 0x20 + the subtitle ID: +===== How to extract subtitles from a DVD-Video into VobSub format =====
- +
-<code> +
-tccat -i $RIPDIR -T $TITLE -L | tcextract -x ps1 -t vob -a 0x21 > subs-en +
-subtitle2vobsub -o vobsubs-en -i $RIPDIR/VIDEO_TS/VTS_01_0.IFO < subs-en +
-</code> +
- +
-The ''**tccat**'' command will concatenate all the files that compose the specified ''$TITLE'' to the standard output. Files are taken from the directory where the DVD-Video was ripped (''$RIPDIR''). +
- +
-The ''**tcextract**'' command extract the requested stream; //ps1// stands for MPEG private stream (subtitles), the source type (''-t vob'') must be specified when reading from standard input, the required track (''-a 0x21'') must also be specified.+
  
-With [[subtitleripper]] you can convert VobSub subtitles into single .pgm images.+See this paragraph: **[[ripping_dvds_with_mencoder#subtitles|Ripping DVDs with mencoder - Subtitles]]**.
  
 ===== avisync ===== ===== avisync =====
doc/appunti/linux/video/transcode.1253288280.txt.gz · Last modified: 2009/09/18 17:38 by niccolo