• VLC command line for DVD 'titles' -> mkv or mp4 files

    From Jim Lesurf@21:1/5 to All on Sat Mar 26 15:56:17 2022
    Usually I employ Handbrake for ripping video titles from a DVD. But for
    some DVDs this fails and I get garbled output.

    On those occasions I have been often able to get VLC to do a satisfactory output file (mkv) from each title on the disc. However I've only been able
    to find a way of doing this one title at a time via the fairly arkane VLC
    set of menus, etc. There muse be a sensible command line for this, but I've
    not found it. So..

    Can someone tell me the syntax, please, and give an example. i.e. if I have
    a DVD in optical drive sr0 and want a file of title 2 from it as, say, diskA-title2.mkv in a given directory, what's the vlc command? And how to
    get the best video quality?

    If I can do that I write a simple prog to automate the process and speed
    things up as well as not have to keep finding out the various buttons to
    push in the VLC submenues - which I forget when I've not needed them in
    months!

    Thanks,

    Jim

    --
    Please use the address on the audiomisc page if you wish to email me. Electronics https://www.st-andrews.ac.uk/~www_pa/Scots_Guide/intro/electron.htm
    biog http://jcgl.orpheusweb.co.uk/history/ups_and_downs.html
    Audio Misc http://www.audiomisc.co.uk/index.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jim Lesurf@21:1/5 to All on Wed Mar 30 15:49:17 2022
    Bit more detail in case anyone can spot the gremlin and how to deal with
    it.

    Using Linux. If I use VLC's GUI the key specific settings are that the
    source is:

    dvdsimple:///dev/sr0#2 (The "#2" tells VLC the source's 'Title' number.
    As on many DVDs T1 is the menu, so the '2' means the first actual item of video, T2.)

    The output spec is of the form you'd expect, e.g. something like:

    /home/jim/Videos/New/d4t2.mp4

    Ths means it will get transcoded into mp4 by VLC as well, and plonked into
    the "d4t2.mp4" file.

    Doing this works nicely, but I have to go though the fiddling about for
    each title on a disc and set these strings as appropriate each time. So
    need to come back every 10 - 20 mins to set the next title going or change
    the disc in drive /sr0.

    Using cvlc (the command for command-line VLC use) the closest I've got to
    to this working is

    cvlc dvdsimple:///dev/sr0#2 --sout "#standard{access = file, mux = ts, dst
    = /home/jim/Videos/New/d4t2.mpg}"

    (That is all one line.) It does rip to the d4t2.mpg file. And VLC will
    then *start* playing the result. But-

    A) File is as big as the DVD content. I'd expect it to be large as there
    is no transcoding. Whereas the GUI route transcodes using h264 for the
    video, so gives a resulting mp4 which uses less storage space.

    B) File seems this big because it actually seems to hold the *entire*
    content of the *DVD* - i.e. in this case *five* titles, not just title 2 !
    The first title on the DVD is actually the menu, so the result is about
    four times the size it would be if only T2 had been ripped to the file.

    C) Although the file starts playing from its beginning, its declared
    duration is that of one title, not four or five. And any attempt to skip forwards may or may not work, VLC gets very confused. Implying the
    timestamping in the file is obviously garbled.

    D) My usual trick with inappropriately timestamped files is to run them
    through an ffmpeg 'acopy/vcopy' pass. This generally cleans them fine. But
    in this case trying this gives an output that is simply unusuable. So
    makes things worse. The shown duration in time is corrected when I try to
    play the result, but access gets muddled. i.e. file doesn't play nicely and
    any attempt to jump forwards or back causes probems.

    Can anyone spot what I'm doing wrong with the cvlc call and how to correct
    it so it decently rips a chosen title into an OK file - ideally an mp4 as
    the GUI gives me? I've tried some variations on the command line details,
    but no cigars thus far. If I can get cvlc to deliver a good .mpg but not transcode I can do that later. But it would be better to get what the VLC
    GUI lets me output. An mp4 with h264 transcoded video, much smaller than
    the source data.

    Otherwise I'd need to keep setting up a GUI for each title in turn. Unlike using Handbrake where I can set up a list and come back later with
    everything done OK.

    Jim

    --
    Please use the address on the audiomisc page if you wish to email me. Electronics https://www.st-andrews.ac.uk/~www_pa/Scots_Guide/intro/electron.htm
    biog http://jcgl.orpheusweb.co.uk/history/ups_and_downs.html
    Audio Misc http://www.audiomisc.co.uk/index.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Aragorn@21:1/5 to All on Wed Mar 30 18:00:14 2022
    On 30.03.2022 at 15:49, Jim Lesurf scribbled:

    Bit more detail in case anyone can spot the gremlin and how to deal
    with it.

    [...]

    Why not use a better tool? I think you'd be better off using ffmpeg
    instead of VLC.

    --
    With respect,
    = Aragorn =

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jim Lesurf@21:1/5 to thorongil@telenet.be on Wed Mar 30 17:59:33 2022
    In article <20220330180014.4dd642ed@nx-74205>, Aragorn
    <thorongil@telenet.be> wrote:
    On 30.03.2022 at 15:49, Jim Lesurf scribbled:

    Bit more detail in case anyone can spot the gremlin and how to deal
    with it.

    [...]

    Why not use a better tool? I think you'd be better off using ffmpeg
    instead of VLC.

    Well, usually Handbrake is 'better' from my POV as it lets me process a
    set of iso images into (h264) mp4 files, one per DVD 'title' all in a batch
    as I do other things. Alas, a few DVDs seem to fail to work, but do render
    with VLC.*

    I'll have a look on the web for how ffmpeg can do this,see what I can find, but...

    If you can tell me the command line for having ffmpeg rip a selected title
    from a DVD disk / iso, please give it, or point to it on the web, and I'll
    be happy if it does the job! I can then automate the process to make life easier in future. :-)

    FWIW I often use ffmpeg for other processing/correcting/altering of AV
    files. But haven't seen a command line for it to generate mp4's from a
    Video DVD/isos.

    *Not sure why this happens. Rare. But mostly seems to occur with early UK
    DVD videos. Normally, HandBrake is also useful in checking which audio
    tracks, etc, I may want. Set it up and leave it chugging for an hour or
    few.

    Thanks,

    Jim

    --
    Please use the address on the audiomisc page if you wish to email me. Electronics https://www.st-andrews.ac.uk/~www_pa/Scots_Guide/intro/electron.htm
    biog http://jcgl.orpheusweb.co.uk/history/ups_and_downs.html
    Audio Misc http://www.audiomisc.co.uk/index.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gordon@21:1/5 to Jim Lesurf on Fri Apr 29 04:49:08 2022
    On 2022-03-30, Jim Lesurf <noise@audiomisc.co.uk> wrote:
    In article <20220330180014.4dd642ed@nx-74205>, Aragorn
    <thorongil@telenet.be> wrote:
    On 30.03.2022 at 15:49, Jim Lesurf scribbled:

    Bit more detail in case anyone can spot the gremlin and how to deal
    with it.

    [...]

    Why not use a better tool? I think you'd be better off using ffmpeg
    instead of VLC.

    Well, usually Handbrake is 'better' from my POV as it lets me process a
    set of iso images into (h264) mp4 files, one per DVD 'title' all in a batch as I do other things. Alas, a few DVDs seem to fail to work, but do render with VLC.*

    I'll have a look on the web for how ffmpeg can do this,see what I can find, but...

    If you can tell me the command line for having ffmpeg rip a selected title from a DVD disk / iso, please give it, or point to it on the web, and I'll
    be happy if it does the job! I can then automate the process to make life easier in future. :-)

    FWIW I often use ffmpeg for other processing/correcting/altering of AV
    files. But haven't seen a command line for it to generate mp4's from a
    Video DVD/isos.

    *Not sure why this happens. Rare. But mostly seems to occur with early UK
    DVD videos. Normally, HandBrake is also useful in checking which audio tracks, etc, I may want. Set it up and leave it chugging for an hour or
    few.

    Off the top of my head. Create an iso file of the DVD and then put that into Handbrake.

    dd BS=4M if=/dev/sr0 of=DVD.iso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jim Lesurf@21:1/5 to All on Fri Apr 29 11:17:05 2022
    In article <jd1924F3n1iU4@mid.individual.net>, Gordon <Gordon@leaf.net.nz> wrote:

    Off the top of my head. Create an iso file of the DVD and then put that
    into Handbrake.

    dd BS=4M if=/dev/sr0 of=DVD.iso

    My SOP is to take an iso image files of some discs and then use Handbrake
    (via its GUI) to work though them as I do something else. This almost
    always works fine. But not in a few cases - which are the ones I raised
    this about. Regardless of being direct from a DVD in the drive, or an iso
    image file of that disc, Handbrake fails in some cases... but vlc works.

    Have no idea why. Presume it is something 'odd' about the specific discs
    that confuses Handbrake, but not VLC.

    Jim

    --
    Please use the address on the audiomisc page if you wish to email me. Electronics https://www.st-andrews.ac.uk/~www_pa/Scots_Guide/intro/electron.htm
    biog http://jcgl.orpheusweb.co.uk/history/ups_and_downs.html
    Audio Misc http://www.audiomisc.co.uk/index.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)