Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th December 2015, 00:34   #1  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
FFMpeg 3 x Stereo tracks to 5.1 LPCM/FLAC?

Hi All,

currently have been using this to merge 3 x stereo tracks (mp2) to AC3, but I want to merge them to LPCM/FLAC (along with the original video track in the file).

Here's what I've currently been using:
ffmpeg -i "f:\inputfile.ts" -c:v copy -filter_complex [0:1][0:2][0:3]amerge=inputs=3,pan=5.1:FL=c0:FR=c1:FC=c2:LFE=c3:BL=c4:BR=c5 -c:a ac3 "f:\outputfile.ts"

I tried changing ac3 to flac or lpcm but no dice. Any help is greatly appreciated! Thanks!
alanisrox69 is offline   Reply With Quote
Old 11th December 2015, 11:18   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,130
I'm not a ffmpeg expert but maybe you can try other output container, like .mkv, AFAIK than at least FLAC is not supported in .ts container.

I think than only AC3 (I see also E-AC3) multichannel is allowed in .ts container: https://en.wikipedia.org/wiki/MPEG_Multichannel

EDIT: for LPCM multichannel you can try .m2ts container.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 11th December 2015 at 11:24. Reason: Add info
tebasuna51 is offline   Reply With Quote
Old 11th December 2015, 15:58   #3  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
I semi figured it out, I had to revert to ffmpeg 2.1.3 because all the latest builds give a:
Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
or
av_interleaved_write_frame(): Invalid argument

error.

but once I reverted to that old version (after some googling those errors), I got this to work:
ffmpeg -i "inputfile.ts" -c:v copy -filter_complex [0:1][0:2][0:3] amerge=inputs=3,pan=5.1:FL=c0:FR=c1:FC=c2:LFE=c3:BL=c4:BR=c5 -c:a pcm_s16le "outputfile.mkv"

I am OK with it being in mkv container. I guess I could also try .m2ts, but for now, the Popcorn Hour A400 that I use plays the files perfectly.

seems like FFMpeg has a bug with h264 video that doesn't allow the newer versions to mux it properly (at least with this h264 video!)
alanisrox69 is offline   Reply With Quote
Old 14th December 2015, 18:32   #4  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,044
Quote:
Originally Posted by alanisrox69 View Post

seems like FFMpeg has a bug with h264 video that doesn't allow the newer versions to mux it properly (at least with this h264 video!)
Perhaps? https://www.ffmpeg.org/ffmpeg-bitstr...05fmp4toannexb
pandy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.