Sound volume is very low when playing mkv file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Sound volume is very low when playing mkv file

longkas
gst-launch-1.0.exe -v playbin uri=file:///g:/me.mkv

Comparing to mp4 files, why sound volume is very low coming out from mkv
files

BR



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sound volume is very low when playing mkv file

longkas
I'm not sure if it is because the audio stream in the mkv has 6 channels, I'm
using decodebin to translate streams, maybe I could combine it into 2
channel audio streams, I need some help


BR



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sound volume is very low when playing mkv file

longkas
Ok, my research is to use volume element to raise the volume, and use
audioconvert to downmix the 5.1 DTS audio to stereo, I dont know how to find
the current volume though:

gst-launch-1.0 -v filesrc location=g:/gtg.mkv ! decodebin !
audio/x-raw,channels=6 \
     ! audioconvert mix-matrix="<<(float)1.0, (float)0.0, (float)1.0,
(float)1.0, (float)1.0, (float)0.0>, <(float)0.0, (float)1.0, (float)1.0,
(float)1.0, (float)0.0,(float)1.0>>" !   audio/x-raw,channels=2  \
    ! volume volume=10.0  ! autoaudiosink





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sound volume is very low when playing mkv file

Tim Müller
In reply to this post by longkas
On Wed, 2019-05-22 at 07:23 -0500, longkas wrote:

> I'm not sure if it is because the audio stream in the mkv has 6
> channels, I'm using decodebin to translate streams, maybe I could
> combine it into 2channel audio streams, I need some help

What codec/format is the audio stream (gst-discoverer-1.0 -v file.mkv)?

And what decoder is being used in your case? (see output of gst-play-
1.0 -v or gst-launch-1.0 -v)

Is the decoder outputting 2 channels or 6 channels?

It might be that this is caused by e.g. AC-3 audio being downmixed to 2
channels improperly.

Cheers
 -Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sound volume is very low when playing mkv file

longkas
This post was updated on .
Hello,
Another problem, after I raise the volume, I encode the audio with AAC, but
when I playback there's sometimes glitchy or noisy sound:

#no problem pipeline
gst-launch-1.0 -v filesrc location=d:/file.mp4 ! decodebin ! audioconvert !
audioresample ! audio/x-raw,rate=48000,channels=2 ! volume volume=10.0 !  autoaudiosink

#noisy pipeline
gst-launch-1.0 -v filesrc location=d:/file.mp4 ! decodebin ! audioconvert !
audioresample ! audio/x-raw,rate=48000,channels=2 ! volume volume=10.0 ! voaacenc !
avdec_aac ! audioconvert ! audioresample ! autoaudiosink

By replacing voaacenc to avenc_aac can improve the issue, but it still
happens, what's the problem here,
I tried to add queue, increase  encoder bitrate, no help.  
I tried to using mp3 encoder, even worse, so how does volume=10.0 causes
that?

BR



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel