VideoHelp Forum


Try StreamFab All-in-One and rip streaming video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 21 of 21
Thread
  1. Hello. I have 6 channel AC3 files ( from mpeg2 files). I'm trying to make them stereo because only first 2 channels have sound (other are empty).
    Videos are too quiet when playing.

    I'm searching and searching but I found only about down-mixing 5.1 to stereo

    But I'd like to NOT down-mix , only delete 4 empty channels and keep 1 and 2 channel untouched (WITHOUT re-encoding)

    Does anyone know any tool to accomplish this task?
    Quote Quote  
  2. You could try
    ffmpeg -i your51.ac3 -ac 2 output.ac3
    Quote Quote  
  3. Originally Posted by ProWo View Post
    You could try
    ffmpeg -i your51.ac3 -ac 2 output.ac3
    no, I think that would do a re-encode.
    Maybe try Audacity and delete the channels you don't want, then save.
    Quote Quote  
  4. Tested
    Code:
    ffmpeg -i your51.ac3 -af "pan=stereo|c0=FL|c1=FR" output.ac3
    with an ac3 5.1 audiofile, duration 1h 21m.
    This was done in a few seconds, at 230x speed.
    That's why I think more about copying than recoding.
    Quote Quote  
  5. Sorry, but:
    Code:
    ffmpeg -i your51.ac3 -af "pan=stereo|c0=FL|c1=FR" output.ac3
    are doing re-encoding (bitrate change from 384 to 192)

    Also tried:
    Code:
    ffmpeg -i VTS_01_1.ac3 -af "pan=stereo|c0=FL|c1=FR" -acodec copy output.ac3
    and get error:
    Filtergraph 'pan=stereo|c0=FL|c1=FR' was defined for audio output stream 0:0 but
    codec copy was selected.
    Filtering and streamcopy cannot be used together.


    So probably FFmpeg can't do that.
    Quote Quote  
  6. If you don't specify copy, ffmpeg converts to match a suitable codec for the output container.
    You may have to use -map_channel and then call pan.
    Maybe use ffprobe or mediainfo to get the layout of the streams
    Quote Quote  
  7. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search Comp PM
    I've used BeSweet to get 5 WAV files, then load one LEFT and one RIGHT to save as stereo in Reaper.....removing the LFE and other stuff.
    I have an ancient free version of Reaper....I'm sure something simpler and free with create a stereo file just as easy.
    Quote Quote  
  8. Originally Posted by hech54 View Post
    I've used BeSweet to get 5 WAV files, then load one LEFT and one RIGHT to save as stereo in Reaper.....removing the LFE and other stuff.
    I have an ancient free version of Reaper....I'm sure something simpler and free with create a stereo file just as easy.
    But what are You doing: Load AC3 -> select channels -> encode to WAVs -> load WAVs as channels -> encode to AC3

    I'd like just:
    Load AC3 -> select channels -> Save AC3

    Instead of:
    Load AC3 -> select/mix -> encode AC3->Save AC3
    (this is good if you have true 5.1 and want to mix to stereo)

    All examples from here (https://trac.ffmpeg.org/wiki/AudioChannelManipulation)
    Also doing re-encoding.

    When I was googling I found that many people ask similar questions, but no working solutions

    And for example I was googling about more popular format: MP3. You can trim it, join two files without encoding but why not separate/join channels?
    i know that after 2-3 little encoding quality won't change. But imagine 10 or 20 re-encodings.
    If you just trim file and join trim and join... 200 times, quality you will have the same quality, because you can do it without re-encoding.
    But try to split channels, join, split join,.. After first two or three times you won't hear difference. But after 20?

    Is it technically possible, but no software available, or impossible?
    Quote Quote  
  9. Originally Posted by SmurfRecorder View Post
    I was googling about more popular format: MP3. You can trim it, join two files without encoding but why not separate/join channels?
    Most mp3 files are internally encoded in "joint stereo". Internally the two channels are mixed down to a mono channel (L+R) and a difference channel (L-R), then compressed. The only way to reproduce the original left or right channel is to decompress those two channels and then reverse the down mix.
    Code:
    left =  (L+R) + (L-R) = L+L
    right = (L+R) - (L-R) = R+R
    Quote Quote  
  10. Originally Posted by SmurfRecorder View Post
    Sorry, but:
    Code:
    ffmpeg -i your51.ac3 -af "pan=stereo|c0=FL|c1=FR" output.ac3
    are doing re-encoding (bitrate change from 384 to 192)
    It is expected the overall bitrate will decrease when you discard channels.

    You can separate channels without re-encoding https://forum.videohelp.com/threads/398507-Top10-Commands-for-Lossless-Video-manipulat...e)#post2592759
    Quote Quote  
  11. Originally Posted by butterw View Post
    Originally Posted by SmurfRecorder View Post
    are doing re-encoding (bitrate change from 384 to 192)
    It is expected the overall bitrate will decrease when you discard channels.
    So, it's better to encode audio with MP2 (I still have original DV files)?
    For MP2 I can set bitrate to 384, when using ac3 stereo max bitrate is also 192.

    And by the way, thanks for answers.
    Quote Quote  
  12. Pure channel mapping detected message with the provided command means there is no recompression with ffmpeg.

    AC3 5.1 384kbps to 192kbps stereo is the expected and best possible result.
    Quote Quote  
  13. Originally Posted by blud7 View Post
    Originally Posted by ProWo View Post
    You could try
    ffmpeg -i your51.ac3 -ac 2 output.ac3
    no, I think that would do a re-encode.
    Maybe try Audacity and delete the channels you don't want, then save.
    lol, Audacity as well as any audio editor will re-encoded AC3 when opening and saving
    Quote Quote  
  14. Originally Posted by butterw View Post
    Pure channel mapping detected message with the provided command means there is no recompression with ffmpeg.

    AC3 5.1 384kbps to 192kbps stereo is the expected and best possible result.
    Hey butterw, I have to disappoint you, it's still doing recompression.

    I tested this because I was curious and first thing I noticed compared to original audio is that this has additional 256 audio samples added like it's always doing when using ac3 encoder. Second is that spectrogram display is not the same for these two. New file is a little worse so to speak so this only means ffmpeg is using its own ac3 encoder and encoding 2 channels.
    Quote Quote  
  15. You are likely correct, it seems ffmpeg -af forces a (quick) re-encode.

    It's possible to uncompress to wav or re-encode to lossless (flac).
    Quote Quote  
  16. I don't know how ffmpeg chooses the bitrate when you don't specify one, but it seems to choose a CBR so it's possible it could appear to be halving the bitrate by throwing one of the channels away, but I'm pretty sure any compressor will take advantage of the commonality between channels to compress, even a lossless one. For VBR, dual mono and single channel audio should be close to the same bitrate.

    The easiest way to confirm 2 channels are exactly the same in Audacity is to open the "stereo" audio, split it into two mono tracks, pan them both centre, highlight one and select Edit/Invert. If they were identical they'll cancel each other out and you'll hear nothing but silence. Anything you do hear is effectively the difference between them.
    Image Attached Files
    Quote Quote  
  17. 192kbps seems to be the default bitrate for ffmpeg stereo AC3.
    Quote Quote  
  18. Thinking about it, for AC3 it's probably the same as Aften.
    http://aften.sourceforge.net/longhelp.html

    Code:
    [-b #]         CBR bitrate in kbps
                           CBR mode is selected by default. This option allows for
                           setting the fixed bitrate. The default bitrate depends
                           on the number of channels (not including LFE).
                           1 = 96 kbps
                           2 = 192 kbps
                           3 = 256 kbps
                           4 = 384 kbps
                           5 = 448 kbps
    Quote Quote  
  19. to reencode to ac3 256kbps with ffmpeg:
    -acodec ac3 -b:a 256k "out.ac3"
    Quote Quote  
  20. Use -map command and copy the 2 channels. No encode necessary.
    Quote Quote  
  21. Originally Posted by 4kblurayguru View Post
    Use -map command and copy the 2 channels. No encode necessary.
    if the output is wav.
    Quote Quote  



Similar Threads