Showing posts with label dvd. Show all posts
Showing posts with label dvd. Show all posts

Thursday, April 2, 2020

playing dvds in debian10

Steps
1. add the contrib (and probably non-free) repo to your sources list
2. install the libdvd-pkg package, and a player
3. run the libdvdcss library installer
4. (might be necessary to) set the region for your dvd device
5. try playing it

From top to bottom
if necessary, change your sources list

$ cat /etc/apt/sources.list
deb http://debian-mirror.sakura.ne.jp/debian/ buster main non-free contrib
deb-src http://debian-mirror.sakura.ne.jp/debian/ buster main non-free contrib
...


(you need to have the contrib repo as above)
if you did any changes, do "sudo apt-get update" to fetch the new repo data.

install the libdvd-pkg

$ sudo apt-get install libdvd-pkg
or better
$ sudo apt-get install libdvd-pkg libdvdcss-dev libdvdcss2 libdvdcss2-dbgsym libdvdnav4 libdvdread4 lsdvd regionset mpv lsdvd

then run the configure script, to compile the libdvdcss library
$ sudo dpkg-reconfigure libdvd-pkg

I don't remember if you needed to do this the first time, or just if your dvd wouldn't play... but try inserting a dvd, and do
$ sudo regionset
Some commercial DVDs won't play unless you have the "correct" dvd region for the region they were supposed to be sold to. Capitalism can be scary.
So, you can select a region, or just leave it as it is.
More info at /usr/share/doc/regionset/README

Finally, let's try playing something
$ mpv dvd://1

And you can check your dvd contents with
$ lsdvd

I'm sure you can also click around with your favorite desktop environment and find a way to play your dvd as well.

Friday, February 4, 2011

growisofs double layer dvd issue

For some reason using growisofs to burn a dual layer dvd (DVD-DL) was giving me an error that ended with like this line:
:-( write failed: Input/output error growisofs dvd dual layer

The command I used was:
growisofs -Z /dev/scd0 -R -J -V "someID" .
It usually works just fine on regular DVDs.
I thought it was only an option for burning ISO files, but apparently using the -dvd-compat option fixes it (it did for me!). So instead of the above command, you'd type:

growisofs -dvd-compat -Z /dev/scd0  -R -J -V "someID" .
And you'll be able to burn a dual layer DVD(8.5GB) with growisofs without any problem.

Setsubun, Japanese spring welcome day or something

That's the title all my friends in the SNS I'm using (mixi, the most popular in Japan) used in their nikkis. I really have no idea what that is...

Anyway, today at work, after I had the annoying high school guy I have every week this day (who for some reason won't talk with me, but really likes my jokes), I had the usual two guys who are rather fun to teach^^.
I told one of them I won't be teaching on March (being that I'm graduating and having to move to Tokyo to finally work), and told me like "What?... Are you serious?..." in such a sad way^^. I have to admit, all my students (excepting for that annoying high school guy) are great, and I'll greatly miss all of them... I can't believe they pay me for this job! Even as part-time^^, I even get to teach cute girls sometimes, it's really great.
(My part-time job being an English Juku teacher)

After my part-time job, I re-organized my DVDs. After writing my DVD-database-interface, it was very easy to search in which DVD the thing I was looking for was, but not so easy to find the actual DVD...
I organized them by the ID (used in the database), so now it's really easy to search for stuffs!
Here's a pic:


And, it has nothing to do with the above topic, but I really want Koda Kumi to more sexy vids! CRAZY4U was great, and she has a few more sexy vids after that, but lately it's all too-many-clothes-wearing-no-sexy-dancing crap...


Koda Kumi vs Britney Spears

Monday, October 18, 2010

make auto play dvd (pictures and movies) for windows in linux

Ah, every time I have to use windows, my head starts hurting just with the thought of it...
But when you have friends/relatives who don't know/want to use real computers, what can you do.

I burned a dvd with an Autorun.inf file (to auto play in windows) that runs a batch file to:
  1. View all pictures in the disk
  2. Play all the movies in the disk
In linux,
 find . -name "*jpg" -print0 | xargs -0 xzgv ; find . -name "*avi" -print0 | xargs -0 mplayer -fs
would have been pretty much all what I'd need.
Yeah, I know, blaming windows for not having a pipe (or a decent set of commands...) wouldn't be too fair, being that only unix type operating systems do and all... But you can guess how annoying it is when you are used to something this simple.

Anyway, this is what I did:
  1. Output all the picture files (including subdirectories) in a file, and change the "/"s to "\"s so windows can read it...
     find * -name "*JPG" -o -name "*jpg"|sed 's/\//\\/g' > pics_list.txt
  2. Do the same with the video files (3g2 is a cell phone format... apparently not many windows players can play it, so I ended up using linux's mplayer program's windows' version)
    find * -name "*3[Gg]2"|sed 's/\//\\/g' > vids_list.txt
  3. Got IrfanView (a picture/video viewer), because it can accept input from a file (step 1 can be used as a list for the files to view).
    You'll have to do this in windows... zip the IrfanView's directory and use ftp or something to get it into your linux computer.

    IrfanView can also be used to create a binary (a program) of a slideshow of all the pictures you choose in case you want a simple way. However doing this won't allow you to rotate/zoom the picture, etc.

  4. Got SMplayer (a video player---this has to be done in windows too...) but didn't work, so I ended up using the binaries of mplayer that came with that annoying GUI, and using it just like in linux. As above, put it in the directory you are creating the disk.

  5. With all this done I can write the batch file:
    set FILES=%CD%\pics_list.txt
    IrfanView\i_view32.exe /filelist=%FILES%
    mplayer\mplayer.exe -fs -vf scale=320:240 -playlist vids_list.txt
  6. Then make an icon file (optional). Use Gimp to resize any picture to 16x16 pixels, and save it as png.
    Use pngtopnm to change the file's format png->ppm.
    Use ppmtowinicon to make the .ico file.
     pngtopnm file.png > file.ppm
    ppmtowinicon file.ppm >file.ico
    #rm file.png file.ppm
  7. Write the Autorun.inf file with the name of the batch file to run, and the icon file as icon. This file has to be at the top of burned DVD's directory tree.
     [autorun]
    open=playme.bat
    icon=icon.ico
  8. Change all the text files written in windows to a DOS format. If you don't understand why, read here.
     #in the directory where all the text files are
    #Autorun.inf =auto play file
    # playme.bat =the file containing the viewer to view pictures and the player to play the movies.
    # pics_list.txt =list of pictures made by linux' find and sed
    # vids_list.txt =list of vids made by same as above
    for FILE in Autorun.inf pics_list.txt vids_list.txt playme.bat ; do unix2dos $FILE; done
  9. Burn the disk with your favorite program. growisofs example:
     #in the wanted to be top of the dvd's tree structure (where Autorun.inf is)
    growisofs -Z /dev/scd0 -R -J -V "pics2010" .
I did change the scale in order to be able to view some vids with very small screens, but that's about it.
The directory tree would result something like:
  • Autorun.inf
  • pics_list.txt
  • vids_list.txt
  • icon.ico
  • playme.bat
  • IrfanView #the directory containing IrfanView (viewer program)
  • mplayer #the directory containing windows version of mplayer (vid player)
  • pics #the directory containing the pictures
  • vids #the directory containing the vids
At least, after doing all this, there's like no way the person you want the contents to see is not going to be able to!
I think you can just let the OS to kinda guess the dvd's contents, and choose a program to read it. But having strange formats (like 3G2, I don't know if it's a world-wide thing, but in Japan all cell phones use this annoying format, and having so much of them using mencoder to change them to avi wasn't a good option) putting a player in the same dvd needs to be done.