# mpv cannot read DVD



## mefizto (Feb 26, 2020)

Greetings all,


```
$ mpv dvd://
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Could not open /dev/cd0 with libdvdccs
libdvdread: Can't open /dev/cd0 for reading
libdvdnav: wm: failed to open/read the DVD
```

Any ideas?

Kindest regards,

M


----------



## scottro (Feb 26, 2020)

Hate to ask but have you tried to see if it plays on Linux?  As it is, you haven't given us too much information.  Another option is to see if you can make it into an iso and play that.   There's various ways, I cover a few on my by now somewhat dated page, http://srobb.net/dvds.html


----------



## Alexander88207 (Feb 26, 2020)

Is multimedia/libdvdcss installed?


----------



## mefizto (Feb 26, 2020)

Hi scottro,

thank you for the reply,  I do not have a Linux machine, both mine are runnig FreeBSD.  I am not sure what more information I could add, so if you can advise me, I can do that.

Hi Alexander 88207,

with all respect due, have you read the code that I posted?  See the third line.
Kindest regards,
M


----------



## rigoletto@ (Feb 26, 2020)

Just guessing. Have a look on /dev to see how the your driver is called (eventually /dev/sr0) and then configure multimedia/mpv accordly.

I don't have any "disc" driver to have a look and give you a clue.


----------



## Alexander88207 (Feb 26, 2020)

mefizto said:


> Hi scottro,
> 
> thank you for the reply,  I do not have a Linux machine, both mine are runnig FreeBSD.  I am not sure what more information I could add, so if you can advise me, I can do that.
> 
> ...




```
mpv dvd://
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Could not open /dev/cd0 with libdvdcss.
libdvdread: Can't open /dev/cd0 for reading
libdvdnav: vm: failed to open/read the DVD
[dvdnav] Couldn't open DVD device: /dev/cd0
Failed to open dvd://.


Exiting... (Errors when loading file)
$ sudo mpv dvd://
Password:
libdvdnav: Using dvdnav version 6.0.1
libdvdnav: DVD Title: Disaster_D1
libdvdnav: DVD Serial Number: 36387122
libdvdnav: DVD Title (Alternative): 001
libdvdnav: DVD disk reports itself with Region mask 0x00fd0000. Regions: 2

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000122
libdvdread: Elapsed time 1
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x000039be
libdvdread: Elapsed time 1
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00003a29
libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_01_1.VOB (0x00003a29)!!
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x00003a7c
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x0000a96a
libdvdread: Elapsed time 0
libdvdread: Found 2 VTS's
libdvdread: Elapsed time 2
[dvdnav] Selecting title 1.
[dvdnav] DVDNAV, switched to title: 2
(+) Video --vid=1 (mpeg2video 720x576 25.000fps)
(+) Audio --aid=1 --alang=de (ac3 2ch 48000Hz)
     Audio --aid=2 --alang=en (ac3 2ch 48000Hz)
File tags:
Title: Disaster_D1
error: XDG_RUNTIME_DIR not set in the environment.
AO: [oss] 48000Hz stereo 2ch s32
VO: [gpu] 720x576 => 1024x576 yuv420p
AV: 00:00:06 / 00:49:41 (0%) A-V:  0.000


Exiting... (Quit)
```

This plays for me the first chapter but if i remember i had problems (like using the dvd menu) with mpv as well so i switched to totem.


----------



## mefizto (Feb 26, 2020)

Hi rigoletto,

thatnk you for the reply.  Can you please amplify your response, I am not quite sure what/how I am supposed to look at in the /dev.  The whole issue with DVD is just a consequence of finding that the multimedia/mpv does not play sound on files that I have stored on hard drive, giving me a message "unknown audio track", which is encoded with acc-lc, and very low sound on other clips, even with mixer set at maximum.  I confirmed that both my speaker output and headphone output work, so I thought that I will try to play a DVD to ascertain whether it is a problem with a specific codec or "mpv-wide."

Hi  Alexander88207,

as much as I appreciate you trying to help, please note that the multimedia topic is unfamiliar for me, so far everything, movies, sound worked using multimedia over Internet, so if you could please be more verbose, I would appreciate it.

Kindest regards,
M


----------



## rigoletto@ (Feb 26, 2020)

ls /dev, and do you have the proper codec installed to play that file?


----------



## mefizto (Feb 26, 2020)

Hi rigoletto,

`ls /dev` gives me a content of the entire /dev folder.

Kindest regards,

M


----------



## Alexander88207 (Feb 26, 2020)

mefizto said:


> Hi  Alexander88207,
> 
> as much as I appreciate you trying to help, please note that the multimedia topic is unfamiliar for me, so far everything, movies, sound worked using multimedia over Internet, so if you could please be more verbose, I would appreciate it.
> 
> ...



Oh sorry 

I use normally multimedia/totem to play DVD's.

This how i do it:

`sudo totem dvd://`


----------



## Criosphinx (Feb 26, 2020)

Your user must be member of operator group to read /dev/cd* check the permissions with `ls -l /dev/cd*`

About the files that mpv doesn't play, run `file youraudiofile.aac` to identify them, you can download and play sample files like these. I just tried and mpv can play all of them (first table)


----------



## mefizto (Feb 26, 2020)

Hi Criosphinx,

thank you for the reply.

```
ls -l /dev/cd*
crw-r----- 1 root operator 0x68 Feb 25 20:02 /dev/cd0
```

The mpv cannot play any of the files, all are marked "Audio Track: 1/1 [unknown]."  However, when I check /usr/local/etc/mpv/encoding-profiles.conf, the section * audio codecs * shows, "AAC", "AC3", "MP3", etc.

Any ideas?

Kindest regards,

M


----------



## mefizto (Feb 26, 2020)

Greetings all,

I do not think that the codecs are not the problem.  Trying:

```
$ mpv --ao=oss /path/to/file/ff-16b-2c-44100hz.ac3
  (+) Audio --aid=1 (ac3 2ch 44100Hz)
AO [oss] 44100Hz stereo 2ch s32
A: 00:00:59 /00:03:07 (31%)
```
However, still no sound over either speakers or headphones.  The same result with --ao=sndio.

Kindest regards,

M


----------



## rigoletto@ (Feb 27, 2020)

Just in case, what do mixer(8) return?


----------



## mefizto (Feb 27, 2020)

Hi rigoletto,

I do not think this is the culprit:


```
$ mixer
Mixer vol      is currently set to  67:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to   1:1
Mixer mic      is currently set to  67:67
Mixer mix      is currently set to   1:1
Mixer rec      is currently set to   1:1
Mixer ogain    is currently set to 100:100
Recording source: mic
```

Also both `$ cat /dev/random >> /dev/dsp1.0` and `$ cat /dev/random >> /dev/dsp4.0` generate noise in headphones and speakers respectively.

Kindest regards,

M


----------



## rigoletto@ (Feb 27, 2020)

You multimedia/mpv OPTIONS are default or do you changed something?

*Defaults are:* ARCHIVE ASS DVDNAV MANPAGES OPENGL UCHARDET V4L VAAPI VDPAU VULKAN WAYLAND X11 YTDL


----------



## mefizto (Feb 27, 2020)

Hi rigoletto,

there are way more options listed; the only one I changed is to enable sndio audio support.  But, as noted above, both

Kindest regards,

M


----------



## rigoletto@ (Feb 28, 2020)

Return the port to default OPTIONS and rebuild it to see what happens.


----------



## SirDice (Feb 28, 2020)

Post the output from `id` please.


----------



## mefizto (Feb 28, 2020)

Hi rigoletto,

thank you.  I have rebuilt the port with the default options, _i.e._, with sndio disabled, and when I invoke an_ audio _file_, e.g., _the ff-16b-2c-44100hz.ac3 by double clicking it, the mpv (1) player window appears on a monitor and a _faint _sound is heard.  Similarly, when I invoke the audio file from a command line, _e.g._, `$ mpv --ao=oss /path/to/file/ff-16b-2c-44100hz.ac3` no mpv (1) player window appears on the monitor, but I do have _louder _sound.  The level of the sound is _much_ louder, actually listenable, when the command is run from the root account than when run from the user account.

Hi SirDice,

the output of `id`:
	
	



```
uid=1001(username) gid=1001(username) groups=1001(username),0(wheel),1002(ssh-user)
```

Thus. although this is step forwrd, still the sound level needs to be addressed.  Is there a gain setting apart of the mixer?  Is there any reference on sound in FreeBSD for dummies, so that I can at least attempt to understand the issues?

Kindest regards,

M


----------



## rigoletto@ (Feb 29, 2020)

Have you started the sndio service? IIRC there are some reports of issues when running the service (search on forums), and you indeed don't need to start the service.


----------



## mefizto (Feb 29, 2020)

Hi rigoletto,

I have _initially _compiled the port with the sndio service, but removed it in the _current _recompile based on your recommendation.  What my reply Yesterday at 8:32 PM referred to was all with `ao=oss`.   Thus I am confused by your reply.

Kindest regards,

M


----------



## rigoletto@ (Feb 29, 2020)

I saw that but do you have sndio set in /etc/rc.conf? This is what was asking.


----------



## mefizto (Feb 29, 2020)

Hi rigoletto,

ah, O.K.  No, no sndio in /etc/rc.conf.

Kindest regards,

M


----------



## SirDice (Mar 2, 2020)

Criosphinx said:


> Your user must be member of operator group to read /dev/cd*





mefizto said:


> the output of `id`:
> 
> 
> 
> ...


Notice anything?


----------

