DVD

From ZENotes
Revision as of 23:59, 14 October 2011 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

TOVID, like other helpers of this kind in the convert-my-media universe, is more a set of scripts that sets the basic ffmpeg or mencoder to work - as such, when code/useage changes in the softs, the script usually lags behind and keeps passing wrong parameters (obsolete) to the soft; writing this as of 06/2011, I am still facing a 5.1 vs 5:1 bug that dates back all the way from 2010...

[jarch@DC266 ~]$ tovid --version
0.33
[jarch@DC266 ~]$ date
Sun Jun 19 12:14:11 CEST 2011
[jarch@DC266 ~]$ tovid
Usage:

   tovid [command] [arguments ...]

Where 'command' is one of the following:

   Command     Description                                 Formerly
   -----------------------------------------------------------------
   id          Identify one or more video files            idvid
   dvd         Author and/or burn a DVD                    makedvd
   menu        Create an MPEG menu                         makemenu
   vcd         Author and/or burn a VCD                    makevcd
   xml         Create (S)VCD or DVD .xml file              makexml
   postproc    Post-process an MPEG video file             postproc
   disc        Create a DVD with menus                     todisc
   gui         Start the tovid GUI                         todiscgui
   mpg         Encode videos to MPEG format                tovid
   titlesets   Start the titleset wizard                   (new)

Run 'tovid <command>' with no further arguments to get help on a command,
and what arguments it expects.

Contents

THIS WON'T WORK:

[jarch@DC266 ~]$ tovid mpg -in /home/jarch/Desktop/MIIB/MIIB.mp4 -out MIIB -dvd -pal -wide -subtitles /home/jarch/Desktop/MIIB/MIIB.srt
 or
[jarch@DC266 ~]$ tovid mpg -in MIIB.mp4 -subtitles MIIB.srt -out MIIB

tovid will crash because it can't assume the sound conversion with some files format, so try this in case of failure:

converting to mpg first

using ffmeg instead because tovid is passing wrong parameters to ffmpeg (namely, the -ac 2 part:

[jarch@DC266 MIIB]$ ffmpeg -i MIIB.mp4 -target pal-dvd output.mpg

If you need subtitles hardcoded, then you can go from your new file, rebuild (STUPID! LONG! TIME-WASTER!) an mpg with subs in:

[jarch@DC266 MIIB]$ tovid mpg -in output.mpg -subtitles MIIB.srt -pal -out MIIB

A more clever way would probably to study the whole .xml monkey-ry to be able to just put the .srt file alongside with proper declarations; the tutorial on the Arch dvdauthor wiki isn't half bad; the tovid wiki is useful for more basic stuff

https://wiki.archlinux.org/index.php/Convert_any_Movie_to_DVD_Video#The_Subtitles
http://tovid.wikia.com/wiki/Making_a_basic_DVD
http://tovid.wikia.com/wiki/Making_a_DVD_with_text_menus


THEN:

[jarch@DC266 ~]$ tovid xml /mnt/raid/video/MIIB/MIIB.mpg -out MyDisc
[jarch@DC266 MIIB]$ export VIDEO_FORMAT=PAL
[jarch@DC266 MIIB]$ dvdauthor -x "/mnt/raid/video/MIIB/MyDisc.xml"

you'll end up with the proper AUDIO_TS and VIDEO_TS full of .BUP, IFO and VOB files - either burn them with

$ tovid dvd -burn MyDisc.xml

Or just use brasero/k3b


don't ask:

export VIDEO_FORMAT=PAL

could probably be declared in .bashrc or somewhere, I forgot. Otherwise dvdauthor fails with ERR: no video format specified for VMG see https://wiki.archlinux.org/index.php/Convert_any_Movie_to_DVD_Video


bash history

[jarch@DC266 MIIB]$ ffmpeg -i MIIB.mp4 -target pal-dvd output.mpg
[jarch@DC266 MIIB]$ tovid mpg -in output.mpg -subtitles MIIB.srt -pal -out MIIB
[jarch@DC266 MIIB]$ tovid xml /mnt/raid/video/MIIB/MIIB.mpg -out MyDisc
[jarch@DC266 MIIB]$ export VIDEO_FORMAT=PAL
[jarch@DC266 MIIB]$ dvdauthor -x "/mnt/raid/video/MIIB/MyDisc.xml"

See http://wiki.zenerves.net/index.php/Talk:DVD for full grab of bash history.


[jarch@DC266 cmiyc]$ ls -l
total 1338840
-rwxr-xr-x 1 jarch wheel 1369421944 Jun 19 11:34 CMFYC-ETRG.avi
-rw-r--r-- 1 jarch wheel     199586 Jun 19 11:34 CMFYC-ETRG_en.srt
[jarch@DC266 cmiyc]$ tovid mpg -in CMFYC-ETRG.avi -subtitles CMFYC-ETRG_en.srt -pal -out CMIYC
Read options from /home/jarch/.tovid/tovid.ini:
--------------------------------
tovid mpg
Convert videos to DVD or (S)VCD format
Version 0.33
http://tovid.wikia.com
--------------------------------
tovid command-line used:
-in CMFYC-ETRG.avi -subtitles CMFYC-ETRG_en.srt -pal -out CMIYC
Changing to working directory: /mnt/raid/video/cmiyc
Converting /mnt/raid/video/cmiyc/CMFYC-ETRG.avi to PAL DVD format
Encoding quality is 6 of 10 (use -quality to change)
Saving to /mnt/raid/video/cmiyc/CMIYC.mpg
Storing log and temporary files in /mnt/raid/video/cmiyc/CMIYC.0
Run 'tail -f "/mnt/raid/video/cmiyc/CMIYC.0/makempg.log"' in another terminal to monitor the log
Multiple CPUs detected; mpeg2enc and ffmpeg will use multithreading. 

========================================================= 

Probing video for information. This may take several minutes...
The encoding process is estimated to require 5909 MB of disk space.
You currently have 32738 MB available in this directory.
Analysis of file /mnt/raid/video/cmiyc/CMFYC-ETRG.avi:
 640 x 352 pixels, 23.976 fps
 Duration (best guess): 02:20:42 (HH:MM:SS)
 XVID video with ac3 audio
Target format:
 720 x 576 pixels, 25.000 fps
 m2v video with ac3 audio
 5400 kbits/sec video, 224 kbits/sec audio 

=========================================================

Using auto-detected aspect ratio 181:100 (override with -aspect)
Letterboxing vertically
Input is not 25.000 fps. Framerate will be adjusted.
Scaling picture to 720 x 576   

=========================================================

Encoding audio stream to ac3 with the following command:
nice -n 0 ffmpeg -i /mnt/raid/video/cmiyc/CMFYC-ETRG.avi -vn -ab 224k -ar 48000 -map 0:1 -acodec ac3 -y -ac 2   /mnt/raid/video/cmiyc/CMIYC.0/audio0.ac3 

Processing started. Please wait...                                               
   ---  Encoding audio to ac3: 226 MB written to audio0.ac3         

Audio encoding finished successfully. 

=========================================================

Encoding video stream with the following commands:
nice -n 0 mplayer -noconsolecontrols -benchmark -nosound -noframedrop -sub "/mnt/raid/video/cmiyc/CMFYC-ETRG_en.srt" -vo yuv4mpeg:file="/mnt/raid/video/cmiyc/CMIYC.0/video.yuv" -vf scale=720:576 "/mnt/raid/video/cmiyc/CMFYC-ETRG.avi"
cat "/mnt/raid/video/cmiyc/CMIYC.0/video.yuv" | yuvfps -r 25:1 -v 0 | nice -n 0 mpeg2enc --sequence-length 4300 --nonvideo-bitrate 280 --multi- thread 2 --aspect 3 -f 8 -b 5400 -g 4 -G 9 -D 10 -K hi-res --frame-rate 3 -v 0 --video-norm p --reduction-4x4 2 --reduction-2x2 1 -q 7 -o   "/mnt/raid/video/cmiyc/CMIYC.0/video.m2v"

Processing started. Please wait...                                                



Processing started. Please wait...                                               
   ---  Encoding video stream: 3265 MB written to video.m2v        
 

=========================================================

Multiplexing audio and video together with the following command:
mplex -V -f 8 -o /mnt/raid/video/cmiyc/CMIYC.mpg /mnt/raid/video/cmiyc/CMIYC.0/video.m2v /mnt/raid/video/cmiyc/CMIYC.0/audio0.ac3
Multiplexing finished successfully
Output files:
3.6G    /mnt/raid/video/cmiyc/CMIYC.mpg
3.6G    total 

=========================================================

   ----------------------------------------
   Final statistics
   ----------------
   tovid 0.33
   File: /mnt/raid/video/cmiyc/CMIYC.mpg, 8442 secs DVD PAL
   Final size:      3690808 kilobytes
   Target bitrate:  5400 kbits/sec
   Average bitrate: 3244 kbits/sec
   Peak bitrate:    5733 kbits/sec
   Took 01:39:42 to encode on  Intel(R) Core(TM)2 Duo CPU     E6750  @ 2.66GHz 2666.842 mhz
   -----------------------------------------
Statistics written to /home/jarch/.tovid/stats.tovid
Cleaning up...
removed `/mnt/raid/video/cmiyc/CMIYC.0/video.yuv'

=========================================================

Do you want to keep the temporary files that were created ?
Please type "yes", or else they will be deleted
(add '-noask' to your ~/.tovid/makempg.config to avoid
being asked this question in the future)
    

Removing temporary files...
removed `/mnt/raid/video/cmiyc/CMIYC.0/video.m2v'
removed `/mnt/raid/video/cmiyc/CMIYC.0/audio0.ac3'
removed `/mnt/raid/video/cmiyc/CMIYC.0/tovid.scratch'
removed `/mnt/raid/video/cmiyc/CMIYC.0/makempg.log'
removed directory: `/mnt/raid/video/cmiyc/CMIYC.0'

========================================================= 

Done! 

========================================================= 

Your encoded video should be in the file(s) /mnt/raid/video/cmiyc/CMIYC.mpg. 

You can author a disc with this video on it by running:
   makexml /mnt/raid/video/cmiyc/CMIYC.mpg -out MyDisc
   makedvd MyDisc.xml
You can also use todisc or makemenu to create menus for your disc.
See the tovid manual page ('man tovid') for more information. 

Please report bugs to:
  http://code.google.com/p/tovid/issues/list
Thanks for using tovid! 

=========================================================
[jarch@DC266 cmiyc]$ echo $VIDEO_FORMAT 

[jarch@DC266 cmiyc]$ export VIDEO_FORMAT=PAL
[jarch@DC266 cmiyc]$ echo $VIDEO_FORMAT
PAL
[jarch@DC266 cmiyc]$ tovid xml CMIYC.mpg -out CMIYCDVD
Read options from /home/jarch/.tovid/tovid.ini: 

--------------------------------
tovid xml
Generate XML for authoring a VCD, SVCD, or DVD.
Version 0.33
http://tovid.wikia.com
--------------------------------
Adding title: CMIYC.mpg as title number 1 of titleset 1
   CMIYC.mpg has aspect 177 (widescreen).
   Calculating the duration of the video with:
       idvid -terse "CMIYC.mpg"
   This may take a few minutes, so please be patient...
   The duration of the video is 02:20:38
Closing titleset 1 with 1 title(s).
Done. The resulting XML was written to CMIYCDVD.xml.
You can now author, image and/or burn the disc by running:
   tovid dvd "CMIYCDVD.xml"
Thanks for using makexml! 

[jarch@DC266 cmiyc]$ dvdauthor -x "/mnt/raid/video/cmiyc/CMIYCDVD.xml"
DVDAuthor::dvdauthor, version 0.7.0.
Build options: gnugetopt imagemagick iconv freetype fribidi fontconfig
Send bug reports to <dvdauthor-users@lists.sourceforge.net> 

INFO: default video format is PAL
INFO: dvdauthor creating VTS
STAT: Picking VTS 01 

STAT: Processing CMIYC.mpg...
STAT: VOBU 23712 at 3600MB, 1 PGCs
INFO: Video pts = 0.160 .. 8442.920
INFO: Audio[0] pts = 0.160 .. 8442.880
STAT: VOBU 23720 at 3600MB, 1 PGCs
CHAPTERS: VTS[1/1] 0.000
CHAPTERS: VTS[1/1] 299.840
CHAPTERS: VTS[1/1] 599.960
CHAPTERS: VTS[1/1] 899.880
CHAPTERS: VTS[1/1] 1200.120
CHAPTERS: VTS[1/1] 1500.000
CHAPTERS: VTS[1/1] 1799.840
CHAPTERS: VTS[1/1] 2100.120
CHAPTERS: VTS[1/1] 2400.120
CHAPTERS: VTS[1/1] 2699.920
CHAPTERS: VTS[1/1] 3000.040
CHAPTERS: VTS[1/1] 3300.120
CHAPTERS: VTS[1/1] 3600.000
CHAPTERS: VTS[1/1] 3900.080
CHAPTERS: VTS[1/1] 4200.160
CHAPTERS: VTS[1/1] 4499.880
CHAPTERS: VTS[1/1] 4799.840
CHAPTERS: VTS[1/1] 5099.960
CHAPTERS: VTS[1/1] 5400.120
CHAPTERS: VTS[1/1] 5700.040
CHAPTERS: VTS[1/1] 5999.960
CHAPTERS: VTS[1/1] 6300.120
CHAPTERS: VTS[1/1] 6599.840
CHAPTERS: VTS[1/1] 6900.120
CHAPTERS: VTS[1/1] 7199.840
CHAPTERS: VTS[1/1] 7499.920
CHAPTERS: VTS[1/1] 7799.960
CHAPTERS: VTS[1/1] 8100.040
CHAPTERS: VTS[1/1] 8399.920
INFO: Generating VTS with the following video attributes:
INFO: MPEG version: mpeg2
INFO: TV standard: pal
INFO: Aspect ratio: 16:9
INFO: Resolution: 720x576
INFO: Audio ch 0 format: ac3/2ch,  48khz drc

STAT: fixed 23720 VOBUs                         
INFO: dvdauthor creating table of contents
INFO: Scanning CMIYCDVD/VIDEO_TS/VTS_01_0.IFO
[jarch@DC266 cmiyc]$ ls -l
total 5029656
-rwxr-xr-x 1 jarch wheel 1369421944 Jun 19 11:34 CMFYC-ETRG.avi
-rw-r--r-- 1 jarch wheel     199586 Jun 19 11:34 CMFYC-ETRG_en.srt
drwxr-xr-x 4 jarch wheel       4096 Jun 19 14:00 CMIYCDVD
-rw-r--r-- 1 jarch wheel        485 Jun 19 14:00 CMIYCDVD.xml
-rw-r--r-- 1 jarch wheel 3775690752 Jun 19 13:50 CMIYC.mpg
[jarch@DC266 cmiyc]$ ls CMIYCDVD -l
total 8
drwxr-xr-x 2 jarch wheel 4096 Jun 19 14:00 AUDIO_TS
drwxr-xr-x 2 jarch wheel 4096 Jun 19 14:06 VIDEO_TS
[jarch@DC266 cmiyc]$ ls CMIYCDVD/VIDEO_TS/ -l
total 3691068
-rw-r--r-- 1 jarch wheel       6144 Jun 19 14:06 VIDEO_TS.BUP
-rw-r--r-- 1 jarch wheel       6144 Jun 19 14:06 VIDEO_TS.IFO
-rw-r--r-- 1 jarch wheel     112640 Jun 19 14:03 VTS_01_0.BUP
-rw-r--r-- 1 jarch wheel     112640 Jun 19 14:03 VTS_01_0.IFO
-rw-r--r-- 1 jarch wheel 1073709056 Jun 19 14:04 VTS_01_1.VOB
-rw-r--r-- 1 jarch wheel 1073709056 Jun 19 14:05 VTS_01_2.VOB
-rw-r--r-- 1 jarch wheel 1073709056 Jun 19 14:06 VTS_01_3.VOB
-rw-r--r-- 1 jarch wheel  554563584 Jun 19 14:06 VTS_01_4.VOB

Successful write w/ k3b, playable on my DVD!

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox