Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having trouble with -map_channel options. I am using two seperate scripts (yeah I know I could do this in one script).

ffmpeg -threads "16" -i example.mov -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.1.0 left.wav -map_channel 0.1.1 right.wav

This script starts to transcode my audiostream with two channels and both logfiles look like everything worked perfectly fine, but I only have sound on channel 0.1.0 whereas channel 0.1.1 is silenced.

Before someone asks for transcoding log, here it is for my first script:

ffmpeg version 0.10.2.git Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 16 2013 15:47:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --extra-cflags=-fPIC --enable-libfreetype
libavutil      51. 55.100 / 51. 55.100
libavcodec     54. 23.100 / 54. 23.100
libavformat    54.  6.101 / 54.  6.101
libavdevice    54.  0.100 / 54.  0.100
libavfilter     2. 77.100 /  2. 77.100
libswscale      2.  1.100 /  2.  1.100
libswresample   0. 15.100 /  0. 15.100
libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/content/flowcenter/qt/preti_hd_eng_15.mp4':
Metadata:
major_brand     : mp42
minor_version   : 1
compatible_brands: mp42mp41
creation_time   : 2013-09-02 15:48:40
LOGGER: set frames to 22825
Duration: 00:15:13.56, start: 0.000000, bitrate: 4588 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 4328 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
  creation_time   : 2013-09-02 15:48:40
  handler_name    : Apple Video Media Handler
  Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 255 kb/s
Metadata:
  creation_time   : 2013-09-02 15:48:40
  handler_name    : Apple Sound Media Handler
-map_channel is forwarded to lavfi similarly to -af pan=0x4:c0=c0.
[aformat @ 0x3d3c1c0] auto-inserting filter 'auto-inserted resampler 0' between the filter     'Parsed_anull_0' and the filter 'aformat'
[aresample @ 0x3e0e0a0] chl:stereo fmt:s16 r:48000Hz -> chl:mono fmt:s32 r:48000Hz
[pan @ 0x3d3c7c0] o0 = 1 i0
[pan @ 0x3d3c7c0] Pure channel mapping detected: 0
Output #0, wav, to '/content/flowcenter/other/preti_hd_eng_15_0_1_0.wav':
Metadata:
major_brand     : mp42
minor_version   : 1
compatible_brands: mp42mp41
creation_time   : 2013-09-02 15:48:40
encoder         : Lavf54.6.101
Stream #0:0(eng): Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
  creation_time   : 2013-09-02 15:48:40
  handler_name    : Apple Sound Media Handler
Stream mapping:
Stream #0:1 -> #0:0 (aac -> pcm_s24le)
Executing:
"/home/mfc/ffmpeg/0_1_0.wav.sh" 1316720 "/content/flowcenter/qt/preti_hd_eng_15.mp4" "/content/flowcenter/other/preti_hd_eng_15_0_1_0.wav"
ffmpeg -threads 16 -i /content/flowcenter/qt/preti_hd_eng_15.mp4 -acodec pcm_s24le -ar 48000 -ac  1 -map_channel 0.1.0 /content/flowcenter/other/preti_hd_eng_15_0_1_0.wav
 needed 2 seconds
Moved outputfile to new location
198
File MIME Content-Type:audio/x-wav
get video file informations for /content/flowcenter/other/preti_hd_eng_15_0_1_0.wav
index file for cut is enabled.
execute: /home/mfc/bin/mpeginfo --logfile /dev/null --idx-file "/content/flowcenter/mpeg2idx/988409"  "/content/flowcenter/other/preti_hd_eng_15_0_1_0.wav"
* * * Arthur Kleer, v0.9.F.4, r09.10.2011, compiled on Oct  6 2011 (nike) * * *

And this one is for my second script:

-map_channel is forwarded to lavfi similarly to -af pan=0x4:c0=c1.
[aformat @ 0x2fb31c0] auto-inserting filter 'auto-inserted resampler 0' between the filter  'Parsed_anull_0' and the filter 'aformat'
[aresample @ 0x30850a0] chl:stereo fmt:s16 r:48000Hz -> chl:mono fmt:s32 r:48000Hz
[pan @ 0x2fb37c0] o0 = 0 i0
[pan @ 0x2fb37c0] Pure channel mapping detected: M
Output #0, wav, to '/content/flowcenter/other/preti_hd_eng_15_0_1_1.wav':
Metadata:
major_brand     : mp42
minor_version   : 1
compatible_brands: mp42mp41
creation_time   : 2013-09-02 15:48:40
encoder         : Lavf54.6.101
Stream #0:0(eng): Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
  creation_time   : 2013-09-02 15:48:40
  handler_name    : Apple Sound Media Handler
Stream mapping:
Stream #0:1 -> #0:0 (aac -> pcm_s24le)
Executing:
"/home/mfc/ffmpeg/0_1_1.wav.sh" 1316719 "/content/flowcenter/qt/preti_hd_eng_15.mp4" "/content/flowcenter/other/preti_hd_eng_15_0_1_1.wav"
ffmpeg -threads 16 -i /content/flowcenter/qt/preti_hd_eng_15.mp4 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.1.1 /content/flowcenter/other/preti_hd_eng_15_0_1_1.wav
needed 33 seconds
Moved outputfile to new location
198
File MIME Content-Type:audio/x-wav
get video file informations for /content/flowcenter/other/preti_hd_eng_15_0_1_1.wav
index file for cut is enabled.
execute: /home/mfc/bin/mpeginfo --logfile /dev/null --idx-file "/content/flowcenter/mpeg2idx/988408"  "/content/flowcenter/other/preti_hd_eng_15_0_1_1.wav"
* * * Arthur Kleer, v0.9.F.4, r09.10.2011, compiled on Oct  6 2011 (nike) * * *

Does anybody know why this happens or has anybody an alternative way for getting a stereo into two mono files? Also tried pan option but I couldn't find a way to figure the pan option out (ffmpeg documentation does not help very much in this case)

EDIT: Trying the same thing with pan option works fine, but only if the input file has one audiostream with two audiochannels, with just one audiochannel ffmpeg also creates two audiochannels although there should be only one to create. I know I could do this manually for every single clip but I would like to have a universal solution.

pan script: ffmpeg -threads "16" -i example.mov -acodec pcm_s24le -ar 48000 -af pan=1:c0=c0 left.wav -af pan=1:c0=c1 right.wav

share|improve this question
    
To clarify, you want to create two mono outputs (one for each channel) from a stereo input? –  LordNeckbeard Mar 19 at 18:43
    
@LordNeckbeard yes my goal is to find a solution with map_channel or pan option which creates two mono wave files, even if the input is already wave. I saw many examples where you do it the way I did, but like I said my second audio file is muted. –  sebastian Mar 20 at 8:22
    
Please exclude the script. You should show your actual, unscripted ffmpeg commands and complete console outputs. The inclusion of the additional information is just adding clutter. The 0.10 branch is old. You should go to the FFmpeg Download page and try a recent build. Also, provide a short input sample if possible so I can attempt to duplicate the issue, because so far I am unable to. –  LordNeckbeard Mar 20 at 17:56
    
@LordNeckbeard I am not authorized to update FFmpeg although I would like to update it, because I think it is a bug in the older branch which should be fixed now. I will exclude my script right after my answer and repost an unscripted command version. –  sebastian Mar 21 at 11:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.