vigata / vgtmpeg

a Versed Generalist Transcoder
http://godromo.com/gmt/vgtmpeg
Other
22 stars 5 forks source link

Example to read title 2 chapter 3 #10

Closed J-G-Froejk closed 1 year ago

J-G-Froejk commented 4 years ago

Hi Alberto or others. Can you please give me and example how to read/open title 2 chapter 3 on a DVD with vgtmpeg.exe If...it is possibly to read a specific chapter at all. I have tried:

  vgtmpeg.exe -i dvd://VIDEO_TS?title=2#3
  vgtmpeg.exe -i dvd://VIDEO_TS?title=2,chapter=3

and many more.

More info I have tried to search in your Github repository. Find some url_parse and a "typedef struct dvdurl_s" that seams to have a selected_chapter variable. So i looks like it is possible. I just can read the code to find the syntax.

More info 2 Just want to copy those old Home DVDs to my media folder, one chapter in each file. I copy the disk to my HD first. My full vgtmpeg statement to read the hole title 2, looks like:

vgtmpeg.exe -hide_banner -loglevel debug -analyzeduration 922337203685477580 -probesize 922337203685477580 -fflags +genpts -i dvd://VIDEO_TS?title=2 -map 0:v -c:v copy -map 0:a -c:a copy  DVD_T01.mpeg.mkv

I do not want to re-encode anything by now. And the MKV format looks like it get the chapters info. This is my second best option, if I can not read chapter by chapter ;-) __ oh, maybe I have to re-encode anyway, because it do log this error: "parser not found for codec pcm_dvd"

/George

vigata commented 4 years ago

Hello J-G-Froejk,

chapter selection through the URL is not implemented at the moment although it should be fairly trivial to add. Chapters are just metadata passed on to the output mux on ffmpeg at the moment, and AFAIK there's no way to make ffmpeg output on a per chapter basis.

As a workaround, one can extract the chapter information with "vgtmpeg -i" and use the start times to drive ffmpeg/vgtmpeg with the '-ss' and '-t' option for every chapter with an external script. '-ss' specifies the start time in H:MM:SS and '-t' the duration from start time to output. This should be chapter length in your case, or any length you may want up to end of title.

Found some example scripts that do this here: https://stackoverflow.com/questions/30305953/is-there-an-elegant-way-to-split-a-file-by-chapter-using-ffmpeg

J-G-Froejk commented 4 years ago

Thank you for the answer. Yes, I do know about the '-ss' and '-t', was just hoping for the easier Chapter thing ;-) _ PS. Any idea why I get the "parser not found for codec pcm_dvd" ?

/George