[FFmpeg-user] stereo upmix and matrix_encoding

Martin Thomas Schrott list at mtsonline.at
Sat Jul 22 14:17:45 EEST 2023


Hi,


finally I could sort things

using -ac 2 makes a correct dplii file.

-ac 6 makes a dplii compatible file that keeps six full channels. I 
think this is not a official standard but should be :-D :-D This sounds 
perfect and can be played on all dplii compatible devices I tested. Sad, 
that this is not used in the industrie.


anyway, here is the result and a surround dplii encoded song where 
ffmpeg was used:

Stream and download Virtuality on ...


Amazon Music:

https://music.amazon.de/albums/B0CBKBSDVQ?marketplaceId=A1PA6795UKMFR9&musicTerritory=DE&ref=dm_sh_YxA0Ftqb8YNagSrnYF7WFD9Z0&trackAsin=B0CBKCRL5D


Apple Music:

https://music.apple.com/us/album/virtuality-single/1696588622


Spotify:

https://open.spotify.com/intl-de/track/1CLvv5msj0wuhRSisR1W4M?si=d8b7ee9d644e4384


cheers

Martin




Am 16.06.2023 um 15:52 schrieb Martin Thomas Schrott:
>
>> That should not be needed at all.
>
>
> yes, that is, what the documentation also said. I had -ac2 in front - 
> maybe this caused the problem. But I had thought this would tell, that 
> the original file has two channels - instead -ac2 in front of surround 
> tells surround to use two channels as output - not sure, if this is, 
> what -ac normally means :-/
>
>
>
>> But only logs would show what really happens.
>
>
> the logs did show me this ;-) i used --loglevel debug on ubuntu to get 
> more details on what happened.
>
> As I read in the logs, that the output of surround was set to stereo I 
> got the idea that -ac 2 could cause it and changed it to -ac 6 - maybe 
> removing it would also have done the trick - but this way it should be 
> safe, even if the default changes :-)
>
> Anyway - for me it is strange that -ac 2 does change the output of 
> surround - as surround has its own attributes to configure the output.
>
>
>> thanks!
>>
>> Martin
>>
>>
>>
>> Am 16.06.2023 um 13:51 schrieb Martin Thomas Schrott:
>>>> Hi folgs,
>>>>
>>>>
>>>> I would like to upmix a stereo file to a surround one and came accross
>>>> the "surround" filter in ffmpeg documentation. Seems this does what I
>>>> would like to do, but I could not find how to use it correctly as it
>>>> seems.
>>>>
>>>>
>>>> I would like to combine it with aresample=matrix_encoding=dplii to get
>>>> a correct surround wav out.
>>>>
>>>>
>>>> So I tried to use a -filter_complex with my stereo as an input file.
>>>>
>>>> And send the output from surround to aresample for encoding.
>>>>
>>>>
>>>> -i myfile.wav -filter_complex "[0:a]surround[a1];
>>>> [a1]aresample=matrix_encoding=dplii" outfile.wav
>>>>
>>>>
>>>> The file still is normal stereo and ignored by decoders. :-(
>>>>
>>>> I also tried to add ichl=5.1 to the aresample - which also did not 
>>>> help.
>>>>
>>>>
>>>> Could anyone please either tell me, what I am doing wrong,
>>>>
>>>> or give me another working way to upmix the file and encode it 
>>>> correctly?
>>>>
>>>>
>>>> (I know this way the phaseshift is missing - so if someone could
>>>> include that too, I would appreciate that of course) ;-)
>>>>
>>>>
>>>> If combining does not work properly I also would be fine with
>>>> outputing a six channel wav or six separate wave files, as I have the
>>>> code to encode this correctly. :-)
>>>>
>>>>
>>>> Thanks for any hint and help!
>>>>
>>>>
>>>> cheers
>>>>
>>>> Martin
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ffmpeg-user mailing list
>>>> ffmpeg-user at ffmpeg.org
>>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>>
>>>> To unsubscribe, visit link above, or email
>>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list