ebr 14925 Posted April 8, 2022 Share Posted April 8, 2022 7 minutes ago, Shindou12 said: The file did start out as AAC 2.O and I was attempting to switch it to AC3 5.1. I was under the impression that if I converted it the app would do so correctly. Is that incorrect? Hi. It did do so "correctly" but it did not attempt to manufacture surround data for the other channels. That would require some sort of advanced processing. Link to comment Share on other sites More sharing options...
rbjtech 4284 Posted April 8, 2022 Share Posted April 8, 2022 (edited) 12 minutes ago, Shindou12 said: The file did start out as AAC 2.O and I was attempting to switch it to AC3 5.1. I was under the impression that if I converted it the app would do so correctly. Is that incorrect? I don't know the software you are using, but by the sounds of it yes - they are upmixing it incorrectly. maybe try ffmpeg - as a test (Audio only) ffmpeg -i INPUTFILE -ac 6 OUTPUT.AC3 Then try and play back the .ac3 file - it should play as 5.1 but may just map it to L R ffmpeg is capable of doing all sorts on channel mapping, levels, upmixing etc - but lets get the basics understood first .. Edited April 8, 2022 by rbjtech Link to comment Share on other sites More sharing options...
ebr 14925 Posted April 8, 2022 Share Posted April 8, 2022 7 minutes ago, rbjtech said: it should play as 5.1 but may just map it to L R That is what is happening now. It is playing as 5.1 - there is just no information in the surround channels. 04-08 09:43:02.609 9189 9189 D EventLogger: MediaCodecAudioRenderer [ 04-08 09:43:02.609 9189 9189 D EventLogger: Group:0, adaptive_supported=N/A [ 04-08 09:43:02.609 9189 9189 D EventLogger: [X] Track:0, id=2, mimeType=audio/ac3, channels=6, sample_rate=48000, language=und, supported=YES 04-08 09:43:02.609 9189 9189 D EventLogger: ] 1 Link to comment Share on other sites More sharing options...
rbjtech 4284 Posted April 8, 2022 Share Posted April 8, 2022 (edited) 1 hour ago, ebr said: That is what is happening now. It is playing as 5.1 - there is just no information in the surround channels. 04-08 09:43:02.609 9189 9189 D EventLogger: MediaCodecAudioRenderer [ 04-08 09:43:02.609 9189 9189 D EventLogger: Group:0, adaptive_supported=N/A [ 04-08 09:43:02.609 9189 9189 D EventLogger: [X] Track:0, id=2, mimeType=audio/ac3, channels=6, sample_rate=48000, language=und, supported=YES 04-08 09:43:02.609 9189 9189 D EventLogger: ] ak ok - so he'll need to add a filter to upmix the channels this assumes the mkv contains the aac 2.0 as the first audio track ffmpeg -i input.mkv -filter_complex "[0:a]pan=5.1(side)|FL=FL|FR=FR|LFE<FL+FR|SL=FL|SR=FR" -ac 6 output.ac3 edit - just tested this and it upmixes to the rears , but forgot the C channel - try ffmpeg -i input.mkv -filter_complex "[0:a]pan=5.1(side)|FL=FL|FR=FR|FC<FL+FR|LFE<FL+FR|SL=FL|SR=FR" -ac 6 output.ac3 edit2 - yep that works - sound out of the 5.1 speakers as - FC and Sub is FL+FR mixed, FL = Rear Left, FR = Rear Right, FL & FR are directly mapped. edit3 - Finally to add (which I just learnt myself haha) you can actually also change the audio level per channel by using a decimal value in the filter. I haven't tried this myself - but probably this is what you should be doing or the 5.1 is going to sound very overwhelming imo. ffmpeg -i input.mkv -filter_complex "[0:a]pan=5.1(side)|FL=0.8*FL|FR=0.8*FR|FC<FL+FR|LFE<FL+FR|SL=0.5*FL|SR=0.5*FR" -ac 6 output.ac3 This reduces the rear volume to 50% of the fronts and L R to 80% of the original volume - the Centre & Sub will remain @ 100%. That's probably about as good as you are going to get without some specialist algorithms etc. Edited April 8, 2022 by rbjtech Link to comment Share on other sites More sharing options...
Shindou12 0 Posted April 9, 2022 Author Share Posted April 9, 2022 (edited) So I have a mac and have attempted to do ffmpeg but have not been able to get it right. Do I just copy and paste it into terminal with the movie name in the input.mkv slot? When I attempted to place the name of a movie in the input it reported that there was not such file or directory. Edited April 9, 2022 by Shindou12 Link to comment Share on other sites More sharing options...
rbjtech 4284 Posted April 9, 2022 Share Posted April 9, 2022 6 hours ago, Shindou12 said: So I have a mac and have attempted to do ffmpeg but have not been able to get it right. Do I just copy and paste it into terminal with the movie name in the input.mkv slot? When I attempted to place the name of a movie in the input it reported that there was not such file or directory. You need to either supply a path for your emby ffmpeg (or download ffmpeg from the net, it doesn't matter which version you use) or run the script from the ..\emby\system folder as that is where ffmpeg is. I don't know where you have installed emby, I don't use Mac's so can't even give you a clue I'm afraid... On the input.mkv - yes, just replace with the full path of your file - likely in quotes. Link to comment Share on other sites More sharing options...
Shindou12 0 Posted April 9, 2022 Author Share Posted April 9, 2022 I have ffmpeg set up. I don't know if it is connected with emby. With mac there is not an app you can download as there is no native support. You have to go through this long terminal process to create the path. Every time I add the path it says Parse error near ')'. Here is what I'm adding into terminal ffmpeg -i “Volumes/Untitled/TV/Movies/Horror/025) The Woman in Black(2012) The Woman in Black.mkv” -filter_complex. "[0:a]pan=5.1(side)|FL=0.8*FL|FR=0.8*FR|FC<FL+FR|LFE<FL+FR|SL=0.5*FL|SR=0.5*FR" -ac 6 output.ac3 Link to comment Share on other sites More sharing options...
rbjtech 4284 Posted April 9, 2022 Share Posted April 9, 2022 ffmpeg -i “Volumes/Untitled/TV/Movies/Horror/025) The Woman in Black(2012) The Woman in Black.mkv” -filter_complex. "[0:a]pan=5.1(side)|FL=0.8*FL|FR=0.8*FR|FC<FL+FR|LFE<FL+FR|SL=0.5*FL|SR=0.5*FR" -ac 6 output.ac3 You appear to have an extra . (dot) after complex ? There is also a ) after the 025 - this is within the quotes, so it shouldn't matter but if that valid ? I have tested the exact syntax in my post - it works fine for the windows version of ffmpeg - sorry I don't know if this these features are even available in the mac version.. Link to comment Share on other sites More sharing options...
Shindou12 0 Posted April 10, 2022 Author Share Posted April 10, 2022 (edited) I think I'm making progress. I know you said you don't know much about mac's but wanted to see if this made any sense to you. This is the error message I'm getting now: % ffmpeg -i /Users/user (put second user so I could take you my name)/ffmpeg/TheWomaninBlack.mkv -filter_complex "[0:a]pan=5.1(side)|FL=0.8*FL|FR=0.8*FR|FC<FL+FR|LFE<FL+FR|SL=0.5*FL|SR=0.5*FR" -ac3 6 output.ac3 ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers built with Apple clang version 13.1.6 (clang-1316.0.21.2) configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox libavutil 57. 17.100 / 57. 17.100 libavcodec 59. 18.100 / 59. 18.100 libavformat 59. 16.100 / 59. 16.100 libavdevice 59. 4.100 / 59. 4.100 libavfilter 8. 24.100 / 8. 24.100 libswscale 6. 4.100 / 6. 4.100 libswresample 4. 3.100 / 4. 3.100 libpostproc 56. 3.100 / 56. 3.100 Unrecognized option 'ac3'. Error splitting the argument list: Option not found Edited April 10, 2022 by Shindou12 Link to comment Share on other sites More sharing options...
rbjtech 4284 Posted April 10, 2022 Share Posted April 10, 2022 (edited) try - ffmpeg -i "/Users/user/ffmpeg/TheWomaninBlack.mkv" -filter_complex "[0:a]pan=5.1(side)|FL=0.8*FL|FR=0.8*FR|FC<FL+FR|LFE<FL+FR|SL=0.5*FL|SR=0.5*FR" -ac 6 output.ac3 You need to COPY the original command I listed above - you have made two mistakes - 1) I never used the argument -ac3 6 - it reads -ac 6 (-ac is the number of channels to use - you want 6) - it knows it is ac3 output with the output filename -ac has nothing to do with the codec used. 2) Note the quotes around where the source file is (bolded) - sorry, beyond that I really can't help you any further as only you know where your file is and how to access it.. You may have to do some research on using ffmpeg with the mac - but those parameters I've provided will 100% produce a 5.1 upmixed AC3 from an AAC 2.0 track. I've personally tried and tested it on my system. If command line is not your thing - then maybe hunt for another application that allows mapping etc. Edited April 10, 2022 by rbjtech Link to comment Share on other sites More sharing options...
Shindou12 0 Posted April 10, 2022 Author Share Posted April 10, 2022 Thanks for all your help. I got it to work. I have one other question. After encoding through terminal the same sounds are coming out from the soundbar and the back left and right speakers at the same time. Is there a way to make the voices come out of the soundbar's central speakers and the sounds from the back-left and right speakers like emby does when it transcodes. If this isn't possible with stereo upmixing that's fine. Once again thanks for you help. Link to comment Share on other sites More sharing options...
rbjtech 4284 Posted April 10, 2022 Share Posted April 10, 2022 1 minute ago, Shindou12 said: Thanks for all your help. I got it to work. I have one other question. After encoding through terminal the same sounds are coming out from the soundbar and the back left and right speakers at the same time. Is there a way to make the voices come out of the soundbar's central speakers and the sounds from the back-left and right speakers like emby does when it transcodes. If this isn't possible with stereo upmixing that's fine. Once again thanks for you help. in short no - you have no discreet channels - you are mixing stereo. To get this channel separation, you need the 5.1 or better audio track to begin with. You can play with the 'balance' if you like - by just changing the number in the command line to reduce or boost a particular channel. So as before FL=0.8*FL reduced that channel (Front Left) to 80% of the original volume, but you could also boost it if you wanted to with FL=1.2*FL = 120% of the original volume. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now