LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-17-2015, 05:27 PM   #1
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Rep: Reputation: 0
Ripped DVD video has scenes out of order


Ripped DVD video has scenes out of order


I recently ripped a copy of "The Hunger Games: Catching Fire"
from DVD and the resulting file was of the entire film, though
the scenes were out of order.

I used Handbrake under Linux Fedora 20.

What did I do wrong? What do I need to
do to make a copy of the film with scenes in
the correct order?

Handbrake listed the tracks on the disk as follows:
Code:
The Hunger Games Catching Fir (Title  1. Chapters 1 through 25. Video Pass) 覧> The Hunger Games Catching Fir -  1.mkv
The Hunger Games Catching Fir (Title  2. Chapters 1 through  2. Video Pass) 覧> The Hunger Games Catching Fir -  2.mkv
The Hunger Games Catching Fir (Title  2. Chapters 1 through  6. Video Pass) 覧> The Hunger Games Catching Fir -  3.mkv
The Hunger Games Catching Fir (Title  4. Chapters 1 through  2. Video Pass) 覧> The Hunger Games Catching Fir -  4.mkv
The Hunger Games Catching Fir (Title  5. Chapters 1 through  2. Video Pass) 覧> The Hunger Games Catching Fir -  5.mkv
The Hunger Games Catching Fir (Title  6. Chapters 1 through  2. Video Pass) 覧> The Hunger Games Catching Fir -  6.mkv
The Hunger Games Catching Fir (Title  7. Chapters 1 through  2. Video Pass) 覧> The Hunger Games Catching Fir -  7.mkv
The Hunger Games Catching Fir (Title  8. Chapters 1 through  2. Video Pass) 覧> The Hunger Games Catching Fir -  8.mkv
The Hunger Games Catching Fir (Title  9. Chapters 1 through  1. Video Pass) 覧> The Hunger Games Catching Fir -  9.mkv
The Hunger Games Catching Fir (Title 10. Chapters 1 through  1. Video Pass) 覧> The Hunger Games Catching Fir - 10.mkv
The Hunger Games Catching Fir (Title 14. Chapters 1 through  1. Video Pass) 覧> The Hunger Games Catching Fir - 11.mkv
The Hunger Games Catching Fir (Title 16. Chapters 1 through 50. Video Pass) 覧> The Hunger Games Catching Fir - 12.mkv
The Hunger Games Catching Fir (Title 17. Chapters 1 through  1. Video Pass) 覧> The Hunger Games Catching Fir - 13.mkv
The Hunger Games Catching Fir (Title 18. Chapters 1 through 25. Video Pass) 覧> The Hunger Games Catching Fir - 14.mkv
etc. ...

And as I wrote above, track 1.mkv was the entire film, a one GB file, but with the scenes not
in the correct order.

Thank you for your help/suggestions.
 
Old 02-17-2015, 06:23 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,165

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Thevlongest title is not always the correct title, it's a simple form of copy bprotection to fool rippers that automatically set the main title to be the longest title, you need to find out whivh is the correct title and select it manually, if you do not own the dvd the copy you are making under the 'fair use' common laws may mean you are breaking the law in your country.
 
1 members found this post helpful.
Old 02-17-2015, 07:39 PM   #3
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
The longest title is not always the correct title, it's a simple form of copy
protection to fool rippers that automatically set the main title to be the
longest title, you need to find out whivh is the correct title and select it
manually,
But I ripped _every_ track off the DVD. Only one of the tracks was
long enough to be the entire film, which it was (but the scenes were
out order).

Quote:
if you do not own the dvd the copy you are making under the 'fair
use' common laws may mean you are breaking the law in your country
I got the DVD from a public library. I don't intend to
distribute the film, but just view it in my home.
 
Old 02-18-2015, 03:25 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,165

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Rip the track with mplayer first using mplayer
Code:
mplayer dvdnav://1 -dumpstream  -dumpfile out.mpg
Where 1 is the title number.
If you are checking out this movie from the library then you are definatly going to be breaking the law if you rip and keep the movie, your choice.
 
1 members found this post helpful.
Old 02-18-2015, 06:25 PM   #5
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
If you are checking out this movie from the library then you are definatly
going to be breaking the law if you rip and keep the movie, your choice.
Ok, I will delete the file after I return the DVD to the library. Never let
it be said that ChicagoCoyote breaks the content protection laws of the land.
I will continue the efforts I have started however as a proof of concept
and as an exercise to obtain knowledge.

Quote:
Rip the track with mplayer first using mplayer

mplayer dvdnav://1 -dumpstream -dumpfile out.mpg

Where 1 is the title number.
Based on this, I executed:
Code:
mplayer dvdnav://1//dev/sr0   -dumpstream  -dumpfile out-again02.mpg
and the resulting file was 1 hour/43 minute file that again,
included scenes from the film, but not in the correct order.

Perhaps this "scene out of order" phenomenon is a
manifestation of the Content Security System?

Thank you for your suggestions.
 
Old 02-18-2015, 06:32 PM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,165

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
You could try putting the dvd in a real player get it playing the main title and then get the info for the movie, most dvd players have some sort of info display, current title, sound track etc etc. then use that track number, don't have hunger games so can't help muh more than general hints.
 
Old 02-18-2015, 06:46 PM   #7
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Well, thank you for some tips on using mplayer as a ripper.

Actually, I currently don't have a standard standalone
DVD player.

I assumed some people would reply that they had
run into this phenomenon before. Perhaps someone might
still.
 
Old 02-18-2015, 06:50 PM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,165

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
If you've got an xbix 360 you can use that, had a quick look on google to see if I could find the correct title and it seems a lot of people are in the smame boat asyou as there seems to be some new copy protection on the disk
 
Old 02-19-2015, 02:55 PM   #9
Bret W
Member
 
Registered: Jan 2015
Posts: 33

Rep: Reputation: Disabled
@ chicagocoyote

If you have the VLC media player, you can get the current title playing.

Load the DVD and then launch VLC. Next, play the main movie title. While the main movie is playing, on the top of the VLC player, click on Playback > Titles. You will see all the titles available for that DVD. The current title playing will be selected by a black dot.

Now that you know the title number, you can now use handbrake, mplayer/mencoder, or even VLC itself to rip or ( borrow ) that title number.

Last edited by Bret W; 02-19-2015 at 03:26 PM.
 
1 members found this post helpful.
Old 02-19-2015, 07:38 PM   #10
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Load the DVD and then launch VLC. Next, play the main movie title. While the
main movie is playing, on the top of the VLC player, click on Playback >
Titles. You will see all the titles available for that DVD. The current title
playing will be selected by a black dot.

Now that you know the title number, you can now use handbrake,
mplayer/mencoder, or even VLC itself to rip or ( borrow  ) that title number.
Gee Brett, thanks.

Actually, you are not following the thread or the issue.
The issue is that there is a difference in scene order of
the film between these two methods of watching the film:

(1) Watch the DVD from a media player (such as VLC).
In these instances, the scene order is correct.

(2) Rip the track from the DVD to the hard disk
and then watch the resulting file from a media player.
In these instances, the scene order is not correct.
This behavior has been duplicated by both handbrake
and mplayer.

Evidently, there is some sort of content protection
system going on.

The full track of the movie on the DVD _really_ does have
the scenes out of order. There must be some sort of
table of contents track that indicates to a DVD player what
the correct sequence of scenes is really supposed to be.

These conclusions are not faulty but are based
on accurate observation.

Maybe some day, handbrake/mplayer/libdvdcss will be able to deal
with this.
 
Old 02-19-2015, 08:50 PM   #11
Bret W
Member
 
Registered: Jan 2015
Posts: 33

Rep: Reputation: Disabled
When watching the main featurette with VLC, the title number is constant from the beginning of the movie and towards the end. In fact, you can test this yourself by checking the current title playing at the beginning of the movie and near at the end of the movie.

Can you do a test with VLC to get the current title playing and then use mplayer to dump the title.

First watch at least 10 to 15 minutes of the DVD with VLC to see the flow of the movie. Then use mplayer to rip that title number. Next, watch the ripped version for the same amount of time and see if things are still in order.

Code:
mplayer -dumpfile output.vob -dumpstream dvd://<title#>

Last edited by Bret W; 02-19-2015 at 09:23 PM.
 
Old 02-19-2015, 10:32 PM   #12
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by chicagocoyote View Post
Maybe some day, handbrake/mplayer/libdvdcss will be able to deal
with this.
This is not a CSS problem. libdvdcss is doing it's job perfectly (otherwise you would not be seeing ANY scenes from the movie, forget about them being in the correct order). handbrake and mplayer deal with it fine too, if you know how to use them, and feed appropriate data to them correctly.

For starters:
(1) You need libdvdcss. You've already got that.
(2) You need to find the correct track to rip. Several people above have already told you how to do this.
(3) You need to rip using "dvdnav", not "dvd".

Those three steps should be enough to get you started.

While this is not CSS causing your issues, it is a form of copy protection. The production of the DVD intentionally includes many bogus titles that have the various things messed up. Scene order is one such thing (but you will run into others - intentional bad sectors, etc.) When you rip with "dvd" it just runs down the scenes in the linear order it finds them. And that linear order has them mixed up in regards to viewing order. And if they threw in intentional bad sectors, "dvd" tries to read these too (in linear order) and chokes. "dvdnav" knows how to navigate the other tables on the DVD to rearrange the scenes into correct order. And dvdnav also navigates around the intentional bad sectors. "dvd" does not know how to do any of this. Another copy protection scheme you will run into is scrambled directory structure. You will see this if you mount the DVD and then run something like "du -sh" on the mountpoint. That will return something ridiculous, like 50Gb, which can't possibly fit on a DVD. With this copy protection scheme, if you do an "ls" on the mountpoint, you will almost always see 99 tracks. These two findings pretty much go hand in hand. You don't want to try to rip the entire DVD if you encounter this directory scrambling scheme. You will end up with one monstrous file that isn't going to be useful. Go for ripping the one track you need. The intentional bad sectors scheme will mess up an "entire DVD" rip as well, so don't try it. Of course, you won't know about the bad sectors until you TRY to rip it, and see all the errors. At that point, abort, and go for a different method. Remember, "dvdnav" is your friend.

Below are some commands you may want to investigate, since you said you want to learn. I cut-n-pasted them from several different PERL scripts I have written over the years to work with DVD's. Because I am not trying to create a tutorial on DVD copying, which is probably illegal in many localities, these commands are intentionally in random order. And some commands are quite archaic and won't work anymore with newer copy protection schemes. But this could serve as a good investigation/learning experience. But the commands below, chosen approprietly for the copy protection scheme at hand, applied in the correct order, should result in you being able to copy anything you want from the command line. I haven't found anything I couldn't copy yet - I use this to rip my personal DVD's and put them on my media server, or create backup copies of the DVD's I really love. I have not messed with Bluray yet, because I don't own any of those disks, so I have nothing to try to rip for my media server.

After you successfully rip a DVD, there's nothing wrong with switching from commandline to some GUI-based tool like handbrake or DVDshrink (run under Wine) if that's what you prefer to do for the remainder of the operations.

Some commands you might want to learn what they do:
---
dvdbackup -Mv -i /dev/dvd
mplayer -frames 0 dvd://$TITLE//$READ_DEVICE 2>&1 | egrep "^audio stream"
dvdxchap -t $TITLE $READ_DEVICE
mplayer -nocache -dumpstream -dumpfile $RIPFILE dvdnav://$TITLE//$READ_DEVICE 1>&2
vamps -v -a $AUDIO_STREAM <"$RIPFILE" >"$VOBFILE"
VIDEO_FORMAT=NTSC dvdauthor -o "$OUTPUTDIR" -x "$XMLFILE" 1>&2
tcrequant -i "$M2VFILE" -o "$SHRINKFILE" -f "$FACTOR"
growisofs -use-the-force-luke=notray -Z $WRITE_DEVICE -speed=$WRITE_SPEED -dvd-video "$OUTPUTDIR" 1>&2
mplayer -nocache -dumpvideo -dumpfile $M2VFILE dvdnav://$TITLE//$DEVICE
vamps -v -e $FACTOR -a $AUDIO_STREAM <"$VOBFILE" >"$MPGFILE"
mplayer -nocache -alang en -dumpaudio -dumpfile $AC3FILE dvdnav://$TITLE//$DEVICE
mplex -f 8 -o "$MPGFILE_TEMPLATE" "$MPLEXFILE" "$AC3FILE"
tcextract -i "$VOBFILE" -t vob -x mpeg2 > "$M2VFILE"
vobcopy -l -n $TITLE -t $VOBFILE
tcextract -i "$VOBFILE" -t vob -x ac3 -a "$AUDIO_TRACK" > "$AC3FILE"
cat > $XMLFILE << 'fubar'
<dvdauthor>
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="movie1.mpg" chapters="$CHAP_LIST" />
</pgc>
</titles>
</titleset>
</dvdauthor>
fubar
 
3 members found this post helpful.
Old 02-19-2015, 11:16 PM   #13
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 334

Rep: Reputation: 60
If all else fails: Virtualbox -> Win XP -> AnyDVD (costs a few $) -> DVDShrink. (This keeps the kids entertained on a long flight/drive with a 12" Android tablet without having to cart along a box full of easily damaged DVDs)
 
Old 02-20-2015, 11:31 AM   #14
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,162
Blog Entries: 6

Rep: Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836
Code:
mplayer dvdnav://
Watch the output of mplayer to see which title it switches to while playing the main video.
 
Old 02-21-2015, 01:40 PM   #15
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Thank you haertig, for that wealth of information.
The explanation of "dvdnav" verses "dvd" option
of mplayer was particularly helpful.


Also, thank you haertig for confirming what I had already
determined, that sometimes on a DVD, the track that that
contains the entire film really does have the scenes
in a bogus order.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No foreground sound when played from hard drive ripped dvd with k9copy XP playback OK moman0791 Linux - General 4 12-14-2008 05:09 PM
No foreground sound when played from hard drive ripped dvd with k9copy XP playback OK moman0791 Linux - Newbie 1 12-14-2008 09:14 AM
unable watch ripped dvd using mplayer sirpelidor Linux - Software 3 10-12-2005 08:54 PM
?Win plays ripped DVD but Xine complains about NAV packet? Velinux Linux - Software 3 02-17-2004 01:47 PM
How can it ell Grip where put my ripped files and sort the in the correct order MvD Linux - Software 2 10-16-2003 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration