aresample=matrix_encoding=dplii output is still 5.1 ??

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

aresample=matrix_encoding=dplii output is still 5.1 ??

pehache-tolai
Hi,

I used to apply a Dolby Pro Logic II encoding this way :

"-af aresample=matrix_encoding=dplii -ac 2"

But I learned that "-ac 2" does a full downmix of the 5.1 stream, which
is not what I want : after the DPL II resampling one simply want to
extract the 2 (encoded) front channels and that's it...

The other question is: why the output of the DPL II encoding is still a
5.1 stream, and not just a 2.0 stream ?

I'm a bit lost... and will appreciate any explanation.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

Carl Eugen Hoyos-2
2019-01-27 16:44 GMT+01:00, pehache <[hidden email]>:

> I used to apply a Dolby Pro Logic II encoding this way :

Actual command line and complete, uncut console output missing.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

pehache-tolai
Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :
> 2019-01-27 16:44 GMT+01:00, pehache <[hidden email]>:
>
>> I used to apply a Dolby Pro Logic II encoding this way :
>
> Actual command line and complete, uncut console output missing.
>

OK

ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af
aresample=matrix_encoding=dplii -t 300 a.m4a

ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
   built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
   configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
--enable-avresample --enable-libmp3lame --enable-libvorbis
--enable-libopus --enable-librsvg --enable-libtheora
--enable-libopenjpeg --enable-libmodplug --enable-libvpx
--enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray
--enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype
--enable-libfribidi --disable-libjack --disable-libopencore-amrnb
--disable-libopencore-amrwb --disable-indev=jack --enable-opencl
--disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox
--enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man
--enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64
--enable-x86asm --enable-libx265 --enable-gpl --enable-postproc
--enable-libx264 --enable-libxvid
   libavutil      56. 22.100 / 56. 22.100
   libavcodec     58. 35.100 / 58. 35.100
   libavformat    58. 20.100 / 58. 20.100
   libavdevice    58.  5.100 / 58.  5.100
   libavfilter     7. 40.101 /  7. 40.101
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  3.100 /  5.  3.100
   libswresample   3.  3.100 /  3.  3.100
   libpostproc    55.  3.100 / 55.  3.100
[matroska,webm @ 0x7faa6f800000] Could not find codec parameters for
stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
[matroska,webm @ 0x7faa6f800000] Could not find codec parameters for
stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
[matroska,webm @ 0x7faa6f800000] Could not find codec parameters for
stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
Input #0, matroska,webm, from 'test.mkv':
   Metadata:
     CREATION_TIME   : 2019-01-02T11:26:09Z
     ENCODER         : Lavf57.7.2
   Duration: 03:53:49.29, start: 0.000000, bitrate: 3710 kb/s
     Chapter #0:0: start 0.000000, end 301.051000
     Metadata:
       title           : Main Title; a Wounded Man
     Chapter #0:1: start 301.051000, end 706.664000
     Metadata:
       title           : St. David's Field, Tennessee
     Chapter #0:2: start 706.664000, end 1219.760000
     Metadata:
       title           : Fort Hayes
     Chapter #0:3: start 1219.760000, end 1601.350000
     Metadata:
       title           : Journey to the Furthermost Outpost
     Chapter #0:4: start 1601.350000, end 2170.168000
     Metadata:
       title           : Clean-Up Duty
     Chapter #0:5: start 2170.168000, end 2539.620000
     Metadata:
       title           : The Ruthless Pawnee
     Chapter #0:6: start 2539.620000, end 2842.381000
     Metadata:
       title           : Contact with the Sioux
     Chapter #0:7: start 2842.381000, end 3170.626000
     Metadata:
       title           : Riding Out to the Indians
     Chapter #0:8: start 3170.626000, end 3414.036000
     Metadata:
       title           : Meeting with the White Man
     Chapter #0:9: start 3414.036000, end 3837.208000
     Metadata:
       title           : Stands with a Fist (Christine)
     Chapter #0:10: start 3837.208000, end 4189.352000
     Metadata:
       title           : Invited to the Village
     Chapter #0:11: start 4189.352000, end 4307.595000
     Metadata:
       title           : The Buffalo Return
     Chapter #0:12: start 4307.595000, end 4798.961000
     Metadata:
       title           : The Hunt
     Chapter #0:13: start 4798.961000, end 5133.754000
     Metadata:
       title           : A Good Trade
     Chapter #0:14: start 5133.754000, end 5552.922000
     Metadata:
       title           : Dances with Wolves
     Chapter #0:15: start 5552.922000, end 6113.065000
     Metadata:
       title           : Bestowed a Great Honor
     Chapter #0:16: start 6113.065000, end 6824.234000
     Metadata:
       title           : Falling in Love
     Chapter #0:17: start 6824.234000, end 6977.262000
     Metadata:
       title           : Attack of the Pawnee
     Chapter #0:18: start 6977.262000, end 7472.048000
     Metadata:
       title           : Told to Mourn No More
     Chapter #0:19: start 7472.048000, end 7984.226000
     Metadata:
       title           : Like the Stars
     Chapter #0:20: start 7984.226000, end 8334.117000
     Metadata:
       title           : Retrieving the Journal
     Chapter #0:21: start 8334.117000, end 8854.846000
     Metadata:
       title           : Do You Salute Him or Shoot Him?
     Chapter #0:22: start 8854.846000, end 9489.105000
     Metadata:
       title           : A Little Help From Friends
     Chapter #0:23: start 9489.105000, end 9740.814000
     Metadata:
       title           : Leaving for the Good of the Tribe
     Chapter #0:24: start 9740.814000, end 10382.330000
     Metadata:
       title           : End Credits
     Chapter #0:25: start 10382.330000, end 11039.695000
     Metadata:
       title           : Permission to Love
     Chapter #0:26: start 11039.695000, end 11595.709000
     Metadata:
       title           : The Most Important Trail
     Chapter #0:27: start 11595.709000, end 12056.044000
     Metadata:
       title           : "Turned Injun, Didn'cha?"
     Chapter #0:28: start 12056.044000, end 12454.067000
     Metadata:
       title           : Traitor Status
     Chapter #0:29: start 12454.067000, end 12937.341000
     Metadata:
       title           : Wolves and Other Animals
     Chapter #0:30: start 12937.341000, end 13705.317000
     Metadata:
       title           : Parting Gifts
     Chapter #0:31: start 13705.317000, end 14029.224000
     Metadata:
       title           : Epilogue/Credits
     Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 180k tbc
(default)
     Stream #0:1(fre): Audio: aac, 48000 Hz, 5.1, fltp (default)
     Metadata:
       title           : Surround
     Stream #0:2(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp
     Metadata:
       title           : Surround
     Stream #0:3(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
     Metadata:
       title           : Stereo
     Stream #0:4(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
     Metadata:
       title           : Stereo
     Stream #0:5(fre): Subtitle: ass
     Stream #0:6(fre): Subtitle: ass
     Stream #0:7(fre): Subtitle: hdmv_pgs_subtitle
     Stream #0:8(eng): Subtitle: hdmv_pgs_subtitle
     Stream #0:9(eng): Subtitle: hdmv_pgs_subtitle
File 'a.m4a' already exists. Overwrite ? [y/N] y
Stream mapping:
   Stream #0:1 -> #0:0 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, ipod, to 'a.m4a':
   Metadata:
     encoder         : Lavf58.20.100
     Chapter #0:0: start 0.000000, end 300.000000
     Metadata:
       title           : Main Title; a Wounded Man
     Stream #0:0(fre): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
5.1, fltp, 256 kb/s (default)
     Metadata:
       title           : Surround
       encoder         : Lavc58.35.100 aac
size=    8713kB time=00:05:00.00 bitrate= 237.9kbits/s speed=27.4x
video:0kB audio:8659kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.617218%
[aac @ 0x7faa71046200] Qavg: 3048.077


_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

pehache-tolai
Le 28/01/2019 à 09:00, pehache a écrit :

> Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :
>> 2019-01-27 16:44 GMT+01:00, pehache <[hidden email]>:
>>
>>> I used to apply a Dolby Pro Logic II encoding this way :
>>
>> Actual command line and complete, uncut console output missing.
>>
>
> OK
>
> ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af
> aresample=matrix_encoding=dplii -t 300 a.m4a
>

I was classicaly adding the "-ac 2" option, but now I'm not sure if it's
a good idea and what to do to get the 2 DPLII channels without any
further mixing.


_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

Carl Eugen Hoyos-2
In reply to this post by pehache-tolai
2019-01-28 9:00 GMT+01:00, pehache <[hidden email]>:
> Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :
>> 2019-01-27 16:44 GMT+01:00, pehache <[hidden email]>:
>>
>>> I used to apply a Dolby Pro Logic II encoding this way :
>>
>> Actual command line and complete, uncut console output missing.
>
> ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af
> aresample=matrix_encoding=dplii -t 300 a.m4a

You get stereo output with:
-af aresample=matrix_encoding=dplii:out_channel_layout=stereo
And identical output with -af aresample=matrix_encoding=dplii -ac 2

Note that the dplii conversion does not do a correct phase shift,
the output does not have optimal quality.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

pehache-tolai
Le 28/01/2019 à 14:11, Carl Eugen Hoyos a écrit :

> 2019-01-28 9:00 GMT+01:00, pehache <[hidden email]>:
>> Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :
>>> 2019-01-27 16:44 GMT+01:00, pehache <[hidden email]>:
>>>
>>>> I used to apply a Dolby Pro Logic II encoding this way :
>>>
>>> Actual command line and complete, uncut console output missing.
>>
>> ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af
>> aresample=matrix_encoding=dplii -t 300 a.m4a
>
> You get stereo output with:
> -af aresample=matrix_encoding=dplii:out_channel_layout=stereo

OK. but what happens to the other channels (back and central) after the
dplii encoding if out_channel_layout=stereo is not coded ? Are thay
identical to the input ones or set to zero ?

> And identical output with -af aresample=matrix_encoding=dplii -ac 2

Since "-ac 2" performs a full downmixing according to the page I linked
before, that means the others channels are zeroed ?

> Note that the dplii conversion does not do a correct phase shift,
> the output does not have optimal quality.

Do you mean in general with the DPLII principle, or specifically in ffmpeg ?


_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

pehache-tolai
Le 28/01/2019 à 23:58, pehache a écrit :

> Le 28/01/2019 à 14:11, Carl Eugen Hoyos a écrit :
>> 2019-01-28 9:00 GMT+01:00, pehache <[hidden email]>:
>>> Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :
>>>> 2019-01-27 16:44 GMT+01:00, pehache <[hidden email]>:
>>>>
>>>>> I used to apply a Dolby Pro Logic II encoding this way :
>>>>
>>>> Actual command line and complete, uncut console output missing.
>>>
>>> ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af
>>> aresample=matrix_encoding=dplii -t 300 a.m4a
>>
>> You get stereo output with:
>> -af aresample=matrix_encoding=dplii:out_channel_layout=stereo
>
> OK. but what happens to the other channels (back and central) after the
> dplii encoding if out_channel_layout=stereo is not coded ? Are thay
> identical to the input ones or set to zero ?
>
>> And identical output with -af aresample=matrix_encoding=dplii -ac 2
>
> Since "-ac 2" performs a full downmixing according to the page I linked
> before, that means the others channels are zeroed ?

Just checked, the output of:

ffmpeg -i test.mkv -map 0:1 -af
aresample=matrix_encoding=dplii -t 300 a.wav

is bit to bit identical to:

ffmpeg -i test.mkv -map 0:1 -t 300 a.wav

So "aresample=matrix_encoding=dplii" doesn't apply any encoding by
itself, it just sets the downmixing parameters that are applied by "-ac 2" ?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

Carl Eugen Hoyos-2
In reply to this post by pehache-tolai
2019-01-28 23:58 GMT+01:00, pehache <[hidden email]>:
> Le 28/01/2019 à 14:11, Carl Eugen Hoyos a écrit :

>> Note that the dplii conversion does not do a correct phase shift,

(Sorry: "FFmpeg's dplii conversion")

>> the output does not have optimal quality.
>
> Do you mean in general with the DPLII principle, or specifically in ffmpeg ?

I mean that FFmpeg's implementation of DPLII is not as good
as users expect.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: aresample=matrix_encoding=dplii output is still 5.1 ??

Carl Eugen Hoyos-2
In reply to this post by pehache-tolai
2019-01-29 0:50 GMT+01:00, pehache <[hidden email]>:

> Just checked, the output of:
>
> ffmpeg -i test.mkv -map 0:1 -af
> aresample=matrix_encoding=dplii -t 300 a.wav
>
> is bit to bit identical to:
>
> ffmpeg -i test.mkv -map 0:1 -t 300 a.wav

Complete, uncut console output missing.

I just tested that - apart from the limitations that I explained
and that mean that the output is simply not as "good" as
you would hope - the dplii matrix encoding does work.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".