LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-29-2020, 09:54 PM   #1
ricemark20
Member
 
Registered: Aug 2003
Location: Wauconda, Illinois, USA
Distribution: Slackware, OpenSuse, Arch Linux on Pi
Posts: 106

Rep: Reputation: 46
Blu-ray and DVD rip


Disclaimer: I own the DVD's and Blu-rays in question.

I got the DVD rip down using variations of this mplayer script. When it does fail from time to time, depending on how heavy handed the digital restrictions management is, vobcopy is my go-to.

My workflow is:
Code:
chown -R user: /dev/sr0
This avoids repeated sudo commands

Code:
lsdvd /dev/sr0
Gets contents of DVD

Code:
#!/bin/bash
echo "What Series is this?"
read series
echo "Series: $series"
echo "Which disc # is this?"
read disknum
echo "This is disk #$disknum"

episode=1
for track in 1 3 5
do
mplayer dvdnav://$track -dvd-device /dev/sr0 -dumpstream -dumpfile `pwd`"/"$series"_D"$disknum"E"$episode.mpg
episode=$((episode+1))
#var=$((var+1))
done
Selects and rips episode.

If that fails:

Code:
vobcopy -nX /dev/sr0
X being the track number

So I recently got a Blu-ray drive connected to my Raspberry Pi 2, running Fedora. My proof of concept idea is to use the Makemkv libraries copied from a working Makemkv install on my laptop to the Pi. From here symlink them to the correct location for mplayer to allow decryption on the fly.

https://www.makemkv.com/forum/viewtopic.php?t=7009

Quote:
Firstly, make sure that the open-source libaacs is not installed - there can be only one libaacs in the system. On debian-based distribution execute the following command to remove stock libaacs

Code:
sudo apt-get remove libaacs0
Then, open terminal, navigate to directory where libmmbd is installed, and make a symlink to libaacs and libbdplus. The following commands are for default installation

Code:
cd /usr/lib sudo ln -s libmmbd.so.0 libaacs.so.0 sudo ln -s libmmbd.so.0 libbdplus.so.0
You're done. From now on VLC will automatically use MakeMKV for blu-ray decryption.
The purpose would be to have a headless Raspberry Pi in order to play the Blu-ray (in this case, The Life of Pi) on mplayer and dump the output to an mpg container. Later this would be off-loaded to my Pi4 to re-encode to work on the network for Kodi.


-Thanks for your input.
 
Old 01-30-2020, 02:39 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Is there a question?
FWIW, all this seems a little antiquated & complicated
Sorry, you asked for input.
I'd just search my package manager for 'rip dvd'
Possibly use something mpv/ffmpeg-based.

A lightweight media server for your pi, is that what you want?
Playing DVDs and streaming them into the network?
I'm sure VLC can do that, too.
 
Old 01-30-2020, 06:47 PM   #3
ricemark20
Member
 
Registered: Aug 2003
Location: Wauconda, Illinois, USA
Distribution: Slackware, OpenSuse, Arch Linux on Pi
Posts: 106

Original Poster
Rep: Reputation: 46
Re: Is there a question?

In the last part of my post, I mentioned trying to have Makemkv work on raspberry pi, not just an x86 or AMD.
The reason I specifically said 'proof of concept', is because I didn't know if either it was worth the effort to try,
or if anyone else had this idea, with the exception of one poster on the Makemkv forums in 2013.

https://www.makemkv.com/forum/viewtopic.php?t=6632

What I do have:
Pi 2 to rip media
Pi 3 for Kodi
Pi 4 to re-encode videos and serve video on a samba share

Also, part of the post was a reference for myself or others with similar ideas.
Antiquated may be a true description, but it is stable for me, and is more quiet than running a desktop to do the task at hand.
 
Old 02-03-2020, 12:53 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
So you have 3 pis, 1. is only for ripping, 2. is for serving the ripped stuff through Kodi (streaming I guess this should be called), and 3. is for re-encoding the ripped stuff and serving it through samba?

What distros are running on the pis?

Quote:
Originally Posted by ricemark20 View Post
Antiquated may be a true description, but it is stable for me, and is more quiet than running a desktop to do the task at hand.
Do you mean you prefer automated command line solutions that run on a headless machine?
Not sure how you can automate the ripping, though. You have to be there to put the DVDs in the drive etc.
Instead of dumping the raw stream with mplayer (and "in case thatfails...") I would use a dedicated software; I use dvdbackup.
For transcoding an ffmpeg oneliner (or script) is most likely the way to go in 2020.

The streaming is taken care of through Kodi, yes?

Anyhow, your hackish solutions (symlinking libraries) beg the question: what distro are you running on those pis. I'm no expert, but I know support & development is good, so it seems you're doing something wrong.

Quote:
Originally Posted by ricemark20 View Post
Also, part of the post was a reference for myself or others with similar ideas.
Maybe a blog would be more appropriate; you can have one right here on LQ.

Again: it's your business how you do this, but you asked for input.
 
Old 02-03-2020, 09:36 AM   #5
ricemark20
Member
 
Registered: Aug 2003
Location: Wauconda, Illinois, USA
Distribution: Slackware, OpenSuse, Arch Linux on Pi
Posts: 106

Original Poster
Rep: Reputation: 46
Blu-ray and DVD rip

Point taken on the hackiness of using the blu-ray libraries, and also about the blog on LQ. I am looking at Hugo also as a static blogging platform.

Oh, as for the one liner, I do use ffmpeg for encoding the rip.

Code:
#!/bin/bash                                                                                                                                         mkdir encoded                                         
for f in *.mpg; 
do                                                    
ffmpeg -i $f -b:a 128k -b:v 2000k -vcodec mpeg4 "encoded"/"`basename -s .mpg $f`.mkv"                       
done
So at least I got that right. ;-)
 
Old 02-04-2020, 11:46 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ Lacks quotes around "$f".
 
Old 02-11-2020, 08:24 PM   #7
ricemark20
Member
 
Registered: Aug 2003
Location: Wauconda, Illinois, USA
Distribution: Slackware, OpenSuse, Arch Linux on Pi
Posts: 106

Original Poster
Rep: Reputation: 46
Thank you ondoho. Finally got moving on getting ripping and encoding done on the same Raspberry Pi 4 running slackware.
The second Pi is still running Kodi on Raspbian, due to problem compiling it on slackware.
The only reason the Pi's were used for different functions was that the ethernet was in a different room than the entertainment center,
and I had heard it was best to keep a file server on ethernet only.

I may consider using Docker or try compiling Kodi again. For now this is solved.
 
Old 08-22-2020, 05:54 AM   #8
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,040
Blog Entries: 3

Rep: Reputation: 134Reputation: 134
Hi, Interesting thread, similar to what I was encountering and I used lsdvd and HandBrakeCLI check out my latest thread https://www.linuxquestions.org/quest...it-4175680798/
 
  


Reply

Tags
blu-ray, dvd, dvd ripper, raspberry pi


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Determine optical media type (Audio CD, DVD, blu-ray) by using UDEV and scripts jlivin25 Ubuntu 2 05-15-2015 04:48 PM
blu ray player not playing copied dvd's zato no ichi Linux - Newbie 3 12-18-2013 02:02 PM
[SOLVED] Transfering DVD and Blu Ray discs to my Slackware machine lpallard Slackware 101 02-21-2011 10:10 PM
LXer: Michael Bay: 'HD DVD vs Blu-ray is a Microsoft conspiracy' LXer Syndicated Linux News 0 12-10-2007 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:27 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