Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] mpv mit Surround Sound?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Thu Mar 19, 2015 5:37 pm    Post subject: [solved] mpv mit Surround Sound? Reply with quote

Guten Nachmittag,

hab grad mal mplayer2 durch mpv2 ersetzt.

Aber ich krieg ums Verrecken keinen 5.1-Sound hin. An meiner Soundkarte ist per Cinch ein billiges Creative-Soundset angeschlossen. Also ist kein DTS-/AC3-Passthrough. Im mplayer 1 und 2 klappte das problemlos. mpv weigert sich hingegen standhaft.

Auch die Option "--audio-channels=6" wird ignoriert.

Beispiel:
Code:
 mpv --audio-channels=6 22\ Jump\ Street\ \(1080p_DTS\).mkv
Playing: 22 Jump Street (1080p_DTS).mkv
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 --alang=ger (*) (dts)
     Audio --aid=2 --alang=eng (dts)
 (+) Subs  --sid=1 --slang=ger (*) 'forced' (dvd_subtitle)
     Subs  --sid=2 --slang=ger 'complete' (dvd_subtitle)
AO: [alsa] 48000Hz stereo 2ch float
VO: [opengl] 1920x800 yuv420p
AV: 00:00:04 / 01:51:56 (0%) A-V: -0.000 Cache:  2s+22149KB


Genauer:
Code:
mpv --audio-channels=6 22\ Jump\ Street\ \(1080p_DTS\).mkv -v
[cplayer] Command line: 'mpv' '--audio-channels=6' '22 Jump Street (1080p_DTS).mkv' '-v'
...
[af] Adding filter lavrresample
[af] Audio filter chain:
[af]   [in] 48000Hz 5.1(side) 6ch floatp
[af]   [lavrresample] 48000Hz 5.1 6ch floatp
[af]   [out] 48000Hz 5.1 6ch floatp
[af]   [ao] 48000Hz 5.1 6ch floatp
[ao] Trying preferred audio driver 'alsa'
[ao/alsa] requested format: 48000 Hz, 5.1 channels, floatp
[ao/alsa] using device: default
[ao/alsa] using ALSA version: 1.0.28
[ao/alsa] got buffersize=12000 samples
[ao/alsa] got period size 708
[ao/alsa] device buffer: 11328 samples.
[ao/alsa] using soft-buffer of 11328 samples.
[cplayer] AO: [alsa] 48000Hz stereo 2ch float
[cplayer] AO: Description: ALSA audio output
[af] Removing filter lavrresample
[af] Adding filter lavrresample
[af] Audio filter chain:
[af]   [in] 48000Hz 5.1(side) 6ch floatp
[af]   [lavrresample] 48000Hz stereo 2ch float
[af]   [out] 48000Hz stereo 2ch float
[af]   [ao] 48000Hz stereo 2ch float
[af] Removing filter lavrresample
[af] Adding filter lavrresample
[af] Audio filter chain:
[af]   [in] 48000Hz 5.1(side) 6ch floatp
[af]   [lavrresample] 48000Hz stereo 2ch float
[af]   [out] 48000Hz stereo 2ch float
[af]   [ao] 48000Hz stereo 2ch float

Der soll da eigentlich gar nichts resamplen, sondern einfach nur die 6 Kanäle ausgeben. Geht das irgendwie bei mpv?


Last edited by musv on Thu Aug 24, 2017 7:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jean-Paul
Guru
Guru


Joined: 13 Apr 2009
Posts: 307

PostPosted: Thu Mar 19, 2015 6:49 pm    Post subject: Reply with quote

Welche Version von mpv hast du installiert.
Zwischen mplayer2 und mpv hat sich etwas geändert. Lese unter "Audio output drivers" die Notes und Warnings - auch sonst ist das eine gute Lektüre.
http://mpv.io/manual/master/
_________________
”Everything should be made as simple as possible, but no simpler.” – Albert Einstein
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Fri Mar 20, 2015 9:04 am    Post subject: Reply with quote

Version 0.8.3 ist installiert.

http://mpv.io/manual/master/#audio-output-drivers
mpv.io wrote:
Examples: …
--ao=alsa:resample=yes:device=[plughw:0,3] Lets ALSA resample and sets the device-name as first card, fourth device.


aplay -l:
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: DS [Xonar DS], Gerät 0: Multichannel [Multichannel]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: DS [Xonar DS], Gerät 1: Digital [Digital]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: Intel [HDA Intel], Gerät 0: ID 194a Analog [ID 194a Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0


mpv 22\ Jump\ Street\ \(1080p_DTS\).mkv -ao=alsa:resample=no:device=[plughw:0,0] -v:


[af] Audio filter chain:
[af]   [in] 48000Hz 5.1(side) 6ch floatp
[af]   [out] 48000Hz 5.1(side) 6ch floatp
[af]   [ao] 48000Hz 5.1(side) 6ch floatp
[ao] Trying preferred audio driver 'alsa'
[ao/alsa] Setting option 'resample' = 'no' (flags = 0)
[ao/alsa] Setting option 'device' = 'plughw:0,0' (flags = 0)
[ao/alsa] requested format: 48000 Hz, 5.1(side) channels, floatp
[ao/alsa] using device: plughw:0,0
[ao/alsa] using ALSA version: 1.0.28
[ao/alsa] got buffersize=12000 samples
[ao/alsa] got period size 708
[ao/alsa] device buffer: 11328 samples.
[ao/alsa] using soft-buffer of 11328 samples.
[cplayer] AO: [alsa] 48000Hz stereo 2ch float
[cplayer] AO: Description: ALSA audio output
[af] Adding filter lavrresample
[af] Audio filter chain:
[af]   [in] 48000Hz 5.1(side) 6ch floatp
[af]   [lavrresample] 48000Hz stereo 2ch float
[af]   [out] 48000Hz stereo 2ch float
[af]   [ao] 48000Hz stereo 2ch float
[af] Removing filter lavrresample
[af] Adding filter lavrresample
[af] Audio filter chain:
[af]   [in] 48000Hz 5.1(side) 6ch floatp
[af]   [lavrresample] 48000Hz stereo 2ch float
[af]   [out] 48000Hz stereo 2ch float
[af]   [ao] 48000Hz stereo 2ch float


8O

Also ab "cplayer" wird irgendwie alles ignoriert, was an Optionen übergeben wurde. Kann mpv überhaupt Multichannel-Soundausgabe?
Back to top
View user's profile Send private message
Jean-Paul
Guru
Guru


Joined: 13 Apr 2009
Posts: 307

PostPosted: Fri Mar 20, 2015 5:25 pm    Post subject: Reply with quote

musv wrote:
Kann mpv überhaupt Multichannel-Soundausgabe?
Hm, laut der Beschreibung ist es sogar automatisch eingeschaltet.
mpv.io wrote:
The new behavior since mpv 0.8.0 always enables multichannel audio, i.e. --audio-channels=auto is the default.


Mal banal gefragt, hörst du was bei
Quote:
aplay -D plughw:0,0 /pfad/zum/lied.wav


Hab hier noch was gefunden, was vielleicht interessant sein könnte
https://github.com/mpv-player/mpv/wiki/ALSA:-Surround-Sound-and-Upmixing
_________________
”Everything should be made as simple as possible, but no simpler.” – Albert Einstein
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Fri Mar 20, 2015 10:31 pm    Post subject: Reply with quote

Jean-Paul wrote:
Mal banal gefragt, hörst du was…

Dieses Stadium der Fehlersuche kann ich ansich ausschließen. Denn:

Code:
mplayer $film <--- spielt den in 5.1 ab.
mpv $film     <---- mixt auf Stereo runter, sowohl auto alsa auch o.g. forsiertes 5.1 + resample aus
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Thu Aug 24, 2017 7:10 pm    Post subject: Reply with quote

Über 2 Jahre ist der Thread jetzt alt. Heute hab ich die Lösung gefunden. MPV hat schon echt grausame Optionen.

Irgendwie bin ich durch diese Threads auf die Lösung gekommen:
https://github.com/mpv-player/mpv/issues/3319
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/102962.html
https://forum.videohelp.com/threads/384267-MPV-downmix-multichannel-DTS-to-stereo

Problem:
Während mplayer (channels=6) und speaker-test -c6 -Dsurround51 das Mapping ordentlich auf die Reihe kriegen, schafft es MPV aus irgendwelchen unerfindlichen Gründen nicht, das Layout meiner Soundkarte (Xonar DS) auszulesen und geht deshalb einfach mal auf Stereo.

Mit folgender Zeile hab ich's dann geschafft:
Code:
mpv -v --audio-device='alsa/surround51:CARD=DS,DEV=0' --audio-channels='5.1(alsa)' --alsa-ignore-chmap "Beliebiger Film (1080p_DTS).mkv"

  • alsa-ignore-chmap: Die wichtigste Option. Damit zwingt man MPV, die Channel-Map nicht vom Alsa-Device auszulesen. Setz ich diese Option nicht, verwendet MPV knallhart Stereo, egal, was ich bei audio-channels angeb.
  • audio-device: die Liste gibt's mit mpv --audio-device=help. Damit kann man das Layout setzen.
  • audio-channels: Liste: mpv --audio-channels=help. Per default verwendet MPV hier 5.1(side), wodurch dann bei mir die ganzen Kanäle nicht mehr stimmen.


In der Config sieht das dann bei mir so aus (5.1 analog angeschlossen):
/etc/mpv/mpv.conf:
vo=vdpau
hwdec=vdpau
fullscreen=yes
alsa-ignore-chmap
audio-device='alsa/surround51:CARD=DS,DEV=0'
audio-channels='5.1(alsa)'


Bei meinem HTPC ist ein AVR angeschlossen. Die Ausgabe erfolgt über SPD/IF:
/etc/mpv/mpv.conf:
vo=vdpau
hwdec=vdpau
fullscreen=yes
audio-device='alsa/iec958:CARD=Intel,DEV=0'
audio-spdif=ac3,dts


War ein harter K(r)ampf.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum