Is mixing of audio channels happening by default in ffmpeg?
I have an uncompressed Quicktime with 8 tracks of audio (in addition to it's one video and one Timecode track). I am transcoding it to Quicktime Prores with the following command line (and results): "ffmpeg-20130507-git-399f6ef-win64-static\bin\ffmpeg.exe" -i "C:\Users\root\Desktop\MultiChannel.mov" -vcodec prores_ks -pix_fmt yuv444p10le -profile:v 3 -acodec copy -t 1 -f mov "D:\\MultiChannel\MultiChannel.mov" ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg developers built on May 7 2013 01:14:14 with gcc 4.7.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 52. 29.100 / 52. 29.100 libavcodec 55. 7.100 / 55. 7.100 libavformat 55. 4.101 / 55. 4.101 libavdevice 55. 0.100 / 55. 0.100 libavfilter 3. 63.101 / 3. 63.101 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 3.100 / 52. 3.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #1: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #2: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #3: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #4: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #5: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #6: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #7: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #8: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000239e760] Stream #9: not enough frames to estimate rate; consider increasing probesize Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\root\Desktop\MultiChannel.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2013-07-17 21:37:47 Duration: 00:00:45.05, start: 0.000000, bitrate: 1199347 kb/s Stream #0:0(eng): Video: rawvideo (raw / 0x20776172), rgb24, 1920x1080, 1193199 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 239760 tbn, 239760 tbc Metadata: creation_time : 2013-07-17 21:37:47 handler_name : Apple Alias Data Handler timecode : 00:59:45:00 Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:27 handler_name : Apple Alias Data Handler Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:28 handler_name : Apple Alias Data Handler Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:28 handler_name : Apple Alias Data Handler Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:29 handler_name : Apple Alias Data Handler Stream #0:5(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:30 handler_name : Apple Alias Data Handler Stream #0:6(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:30 handler_name : Apple Alias Data Handler Stream #0:7(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:31 handler_name : Apple Alias Data Handler Stream #0:8(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:31 handler_name : Apple Alias Data Handler Stream #0:9(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2013-07-17 21:40:32 handler_name : Apple Alias Data Handler timecode : 00:59:45:00 Output #0, mov, to 'D:\\MultiChannel\MultiChannel.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt encoder : Lavf55.4.101 Stream #0:0(eng): Video: prores (prores_ks) (apch / 0x68637061), yuv444p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 11988 tbn, 23.98 tbc Metadata: creation_time : 2013-07-17 21:37:47 handler_name : Apple Alias Data Handler timecode : 00:59:45:00 Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:27 handler_name : Apple Alias Data Handler Stream mapping: Stream #0:0 -> #0:0 (rawvideo -> prores_ks) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 24 fps=2.5 q=0.0 Lsize= 8082kB time=00:00:01.00 bitrate=66139.3kbits/s dup=276 drop=0 video:7986kB audio:94kB subtitle:0 global headers:0kB muxing overhead 0.024802% The resulting quicktime appears to contain a single audio track with the contents of original 8 tracks mixed together. I have not provided any audio filtering/mixing options. Wouldn't the default condition to be passing through of the audio tracks exactly as the source contains it? If not, is it possible to pass each track through as such or must it be explicitely told to do so? Ideally if provided with 8 tracks, the resulting file would have 8 tracks. -- sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/>
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
"ffmpeg-20130507-git-399f6ef-win64-static\bin\ffmpeg.exe" -i "C:\Users\root\Desktop\MultiChannel.mov" -vcodec prores_ks -pix_fmt yuv444p10le -profile:v 3 -acodec copy -t 1 -f mov "D:\\MultiChannel\MultiChannel.mov"
The resulting quicktime appears to contain a single audio track with the contents of original 8 tracks mixed together.
This is very unlikely / no. (The amerge filter allows to produce the result that you describe.) The default action - since you did not specify a map parameter - is to output one audio track. See the console output:
Stream mapping: Stream #0:0 -> #0:0 (rawvideo -> prores_ks) Stream #0:1 -> #0:1 (copy)
Input audio track 0:1 is copied into the output file. Note that if you specify -map 0 (to copy all streams), all output audio tracks except the first one will be silent (because that is useful for - imo - typical - usecases). This is probably trivial to fix but I am still searching for somebody to help testing. ;-( Carl Eugen
On 7/18/2013 9:16 AM, Carl Eugen Hoyos wrote: Input audio track 0:1 is copied into the output file. Note that if you specify -map 0 (to copy all streams), all output audio tracks except the first one will be silent (because that is useful for - imo - typical - usecases). This is probably trivial to fix but I am still searching for somebody to help testing. ;-( Is it possible to manually (through commandline args) tell it to copy all streams across without the (apparently bugged) -map 0 option? sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/>
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
Is it possible to manually (through commandline args) tell it to copy all streams across without the (apparently bugged) -map 0 option?
How is this option bugged? Carl Eugen
On 7/18/2013 9:30 AM, Carl Eugen Hoyos wrote: Sam Marrocco <smarrocco <at> ringsidecreative.com> writes: Is it possible to manually (through commandline args) tell it to copy all streams across without the (apparently bugged) -map 0 option? How is this option bugged? Perhaps I am reading what you wrote incorrectly: "Note that if you specify -map 0 (to copy all streams), all output audio tracks except the first one will be silent....This is probably trivial to fix " If when asked to copy all the streams with -map 0 (implying they will be copied as is) they are copied silent (without sound?) doesn't that imply that it does not work correctly? Shouldn't they be copied *with sound* and not silent? Or why would it need to be "fixed"? To me, this implies "bugged"? Am I reading this incorrectly? sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/>
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
On 7/18/2013 9:30 AM, Carl Eugen Hoyos wrote:
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
Is it possible to manually (through commandline args) tell it to copy all streams across without the (apparently bugged) -map 0 option?
How is this option bugged?
Perhaps I am reading what you wrote incorrectly:
"Note that if you specify -map 0 (to copy all streams), all output audio tracks except the first one will be silent.... This is probably trivial to fix "
If when asked to copy all the streams with -map 0 (implying they will be copied as is) they are copied silent (without sound?) doesn't that imply that it does not work correctly?
Sorry I am not a native speaker and probably did not explain well. In the past, when a mov file was written with more than one audio stream, all audio streams were marked as "default" streams, meaning if you prepared a mov file for an iDevice containing a movie with several language tracks, all tracks were played simultaneously on playback. (Making the feature of muxing several audio tracks into mov useless to some degree.) A change was committed that marked the first of several audio tracks as "default" and all other tracks as "non- default" (or as I badly named it: "silent"). This allows to select the language you like at playback and at the same time default playing (without selecting a language) works fine. There is apparently a usecase (that I still don't understand completely) where you want all audio tracks to be marked as "default" (or non-silent). I am searching for a volunteer to help me testing this use-case. Note that even for the mentioned use-case that currently does not work out-of-the-box, it is still possible to activate the silent tracks in your application (iiuc). Carl Eugen
On 7/18/2013 9:47 AM, Carl Eugen Hoyos wrote: Sorry I am not a native speaker and probably did not explain well. In the past, when a mov file was written with more than one audio stream, all audio streams were marked as "default" streams, meaning if you prepared a mov file for an iDevice containing a movie with several language tracks, all tracks were played simultaneously on playback. (Making the feature of muxing several audio tracks into mov useless to some degree.) A change was committed that marked the first of several audio tracks as "default" and all other tracks as "non- default" (or as I badly named it: "silent"). This allows to select the language you like at playback and at the same time default playing (without selecting a language) works fine. There is apparently a usecase (that I still don't understand completely) where you want all audio tracks to be marked as "default" (or non-silent). I am searching for a volunteer to help me testing this use-case. Note that even for the mentioned use-case that currently does not work out-of-the-box, it is still possible to activate the silent tracks in your application (iiuc). Thank you for the explanation. I believe I now understand the issues better. So using -map 0 should "activate" the other tracks and "pass them through". The resulting output is: ffmpeg-20130507-git-399f6ef-win64-static\bin\ffmpeg.exe" -i "C:\Users\root\Desktop\MultiChannel.mov" -vcodec prores_ks -pix_fmt yuv444p10le -profile:v 3 -acodec copy -t 1 -map 0 -f mov "D:\\MultiChannel\MultiChannel.mov" ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg developers built on May 7 2013 01:14:14 with gcc 4.7.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 52. 29.100 / 52. 29.100 libavcodec 55. 7.100 / 55. 7.100 libavformat 55. 4.101 / 55. 4.101 libavdevice 55. 0.100 / 55. 0.100 libavfilter 3. 63.101 / 3. 63.101 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 3.100 / 52. 3.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #1: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #2: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #3: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #4: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #5: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #6: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #7: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #8: not enough frames to estimate rate; consider increasing probesize [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000003ce7e0] Stream #9: not enough frames to estimate rate; consider increasing probesize Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\root\Desktop\MultiChannel.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2013-07-17 21:37:47 Duration: 00:00:45.05, start: 0.000000, bitrate: 1199347 kb/s Stream #0:0(eng): Video: rawvideo (raw / 0x20776172), rgb24, 1920x1080, 1193199 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 239760 tbn, 239760 tbc Metadata: creation_time : 2013-07-17 21:37:47 handler_name : Apple Alias Data Handler timecode : 00:59:45:00 Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:27 handler_name : Apple Alias Data Handler Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:28 handler_name : Apple Alias Data Handler Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:28 handler_name : Apple Alias Data Handler Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:29 handler_name : Apple Alias Data Handler Stream #0:5(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:30 handler_name : Apple Alias Data Handler Stream #0:6(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:30 handler_name : Apple Alias Data Handler Stream #0:7(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:31 handler_name : Apple Alias Data Handler Stream #0:8(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s Metadata: creation_time : 2013-07-17 21:40:31 handler_name : Apple Alias Data Handler Stream #0:9(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2013-07-17 21:40:32 handler_name : Apple Alias Data Handler timecode : 00:59:45:00 Data stream encoding not supported yet (only streamcopy) No file is created--It looks as though the ninth track (apple timecode) is preventing completion using -map 0. sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/>
On Thu, Jul 18, 2013 at 3:01 PM, Sam Marrocco <smarrocco@ringsidecreative.com> wrote:
Thank you for the explanation. I believe I now understand the issues better. So using -map 0 should "activate" the other tracks and "pass them through". The resulting output is:
ffmpeg-20130507-git-399f6ef-win64-static\bin\ffmpeg.exe" -i "C:\Users\root\Desktop\MultiChannel.mov" -vcodec prores_ks -pix_fmt yuv444p10le -profile:v 3 -acodec copy -t 1 -map 0 -f mov "D:\\MultiChannel\MultiChannel.mov"
ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg developers … Data stream encoding not supported yet (only streamcopy)
No file is created--It looks as though the ninth track (apple timecode) is preventing completion using -map 0.
-map 0 means add every input stream in to the output. You've said what you want done with video, encode to prores_ks, and what to do with audio, copy, you just need to either say don't add all streams (just first video and all audio) or copy all input streams, including metadata, and re-encode the video. You can do both with -map, eg to not copy the metadata track: "-map 0:v -map 0:a -c:a copy -c:v prores_ks" or to copy everything, but re-encode the video: "-map 0 -c copy -c:v prores_ks" -c:v is an alias for -vcodec, -c:a for -acodec, in case you were wondering. Cheers Tom
On 7/18/2013 10:34 AM, Tom Evans wrote: -map 0 means add every input stream in to the output. You've said what you want done with video, encode to prores_ks, and what to do with audio, copy, you just need to either say don't add all streams (just first video and all audio) or copy all input streams, including metadata, and re-encode the video. You can do both with -map, eg to not copy the metadata track: "-map 0:v -map 0:a -c:a copy -c:v prores_ks" or to copy everything, but re-encode the video: "-map 0 -c copy -c:v prores_ks" -c:v is an alias for -vcodec, -c:a for -acodec, in case you were wondering. Thanks, Tom. in order to get the video, 8 channels of audio and the ninth track TC (which can't be specified specifically) what you stated might work as: -map 0:v -map 0:a If I'm understanding this seems to indicate "copy all video tracks across, using my pre-specified video codec settings" and "copy across all audio tracks, using my pre-specified audio codec settings". The timecode seems to be brought across by default without specifying. I'll test further, but this seems to do the job. sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/>
Sorry this is so late as a response (I've been away) but the fix is easy Sam; you can exclude the ninth track like this.... ./ffmpeg -i input.mxf -map 0 -map -0:9:0 -c copy -c:v prores -profile:v 3 output.mov The "-map 0 -map -0:9:0" will tell ffmpeg to copy all streams EXCEPT stream 0:9 - which in my case is a metadata track (possibly TC - not sure). HTH someone... Wayne Poll | Technical & IT Systems Manager | NHNZ | 5 Melville Street, Dunedin 9016, New Zealand | p. +64 3 479 9920 | m. +64 27 223 4171 | f. +64 3 479 9917 | www.nhnz.tv | Facebook -----Original Message----- From: ffmpeg-user-bounces@ffmpeg.org [mailto:ffmpeg-user-bounces@ffmpeg.org] On Behalf Of Sam Marrocco Sent: Friday, 19 July 2013 3:08 To: FFmpeg user questions Subject: Re: [FFmpeg-user] Is mixing of audio channels happening by default in ffmpeg? On 7/18/2013 10:34 AM, Tom Evans wrote: -map 0 means add every input stream in to the output. You've said what you want done with video, encode to prores_ks, and what to do with audio, copy, you just need to either say don't add all streams (just first video and all audio) or copy all input streams, including metadata, and re-encode the video. You can do both with -map, eg to not copy the metadata track: "-map 0:v -map 0:a -c:a copy -c:v prores_ks" or to copy everything, but re-encode the video: "-map 0 -c copy -c:v prores_ks" -c:v is an alias for -vcodec, -c:a for -acodec, in case you were wondering. Thanks, Tom. in order to get the video, 8 channels of audio and the ninth track TC (which can't be specified specifically) what you stated might work as: -map 0:v -map 0:a If I'm understanding this seems to indicate "copy all video tracks across, using my pre-specified video codec settings" and "copy across all audio tracks, using my pre-specified audio codec settings". The timecode seems to be brought across by default without specifying. I'll test further, but this seems to do the job. sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/> _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
On 7/29/2013 6:50 PM, Wayne Poll wrote: Sorry this is so late as a response (I've been away) but the fix is easy Sam; you can exclude the ninth track like this.... ./ffmpeg -i input.mxf -map 0 -map -0:9:0 -c copy -c:v prores -profile:v 3 output.mov The "-map 0 -map -0:9:0" will tell ffmpeg to copy all streams EXCEPT stream 0:9 - which in my case is a metadata track (possibly TC - not sure). HTH someone... Wayne, Definitely another useful piece of information, thanks. Unfortunately I *do* need the ninth track (TC) so the tracks must be specified explicitly. sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/>
When I use this process to convert Sony F55 XAVC 4k footage to Apple ProRes 422 (HQ) quick time files, the time code in the resultant quick time matches the original XAVC MXF time code perfectly, even when excluding the metadata track. Wayne Poll | Technical & IT Systems Manager | NHNZ | 5 Melville Street, Dunedin 9016, New Zealand | -----Original Message----- From: ffmpeg-user-bounces@ffmpeg.org [mailto:ffmpeg-user-bounces@ffmpeg.org] On Behalf Of Sam Marrocco Sent: Wednesday, 31 July 2013 0:38 To: FFmpeg user questions Subject: Re: [FFmpeg-user] Is mixing of audio channels happening by default in ffmpeg? On 7/29/2013 6:50 PM, Wayne Poll wrote: Sorry this is so late as a response (I've been away) but the fix is easy Sam; you can exclude the ninth track like this.... ./ffmpeg -i input.mxf -map 0 -map -0:9:0 -c copy -c:v prores -profile:v 3 output.mov The "-map 0 -map -0:9:0" will tell ffmpeg to copy all streams EXCEPT stream 0:9 - which in my case is a metadata track (possibly TC - not sure). HTH someone... Wayne, Definitely another useful piece of information, thanks. Unfortunately I *do* need the ninth track (TC) so the tracks must be specified explicitly. sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/> _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Tom Evans <tevans.uk <at> googlemail.com> writes:
No file is created--It looks as though the ninth track (apple timecode) is preventing completion using -map 0.
You can do both with -map, eg to not copy the metadata track: "-map 0:v -map 0:a -c:a copy -c:v prores_ks"
I didn't test but I expect -dn to also help. Carl Eugen
It appears that the existence of a Timecode (data) track in the source file causes -map 0 to fail with the error "Data stream encoding not supported yet (only streamcopy)" The Timecode track seems to be brought across by default when not using the -map 0 option. If ALL tracks are specified with -map 0, the encode fails because the timecode track is a datatrack. If -map specifies channels, it must specify the video and audio tracks, but NOT the timecode track or the encode will fail. By *not* specifying the Timecode track the encode will succeed, and the Timecode track is brought across by default (somehow ignored by the -map option since it was not specified, unlike audio and video tracks which must be specified). Therefore, given a source of: Track 1: Video Track 2: Audio1 Track 3: Audio2 Track 4: TC You cannot use the -map 0 options (because of the existence of the TC track) and you must specify explicitly: -map 0:0 -map 0:1 -map 0:2 to encode video, audio1, audio2 AND TC, even though the TC track is not (and cannot) be specified. sam marrocco | chief technical officer ringside.cutters.picnic.moonlink 248 548 2500 w 248 910 3344 c ringsidecreative.com <http://ringsidecreative.com/>
Carl, Since i'm working on audio mapping anyways, i can help testing if you like. Since you're not a native english speaker (I'm neither), where are you from / what's your native language? (Concidering your name i would think Spanish, but one never knows...) Bouke VideoToolShed van Oldenbarneveltstraat 33 6512 AS NIJMEGEN, the Netherlands +31 24 3553311 ----- Original Message ----- From: "Carl Eugen Hoyos" <cehoyos@ag.or.at> To: <ffmpeg-user@ffmpeg.org> Sent: Thursday, July 18, 2013 3:47 PM Subject: Re: [FFmpeg-user] Is mixing of audio channels happening by defaultin ffmpeg?
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
On 7/18/2013 9:30 AM, Carl Eugen Hoyos wrote:
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
Is it possible to manually (through commandline args) tell it to copy all streams across without the (apparently bugged) -map 0 option?
How is this option bugged?
Perhaps I am reading what you wrote incorrectly:
"Note that if you specify -map 0 (to copy all streams), all output audio tracks except the first one will be silent.... This is probably trivial to fix "
If when asked to copy all the streams with -map 0 (implying they will be copied as is) they are copied silent (without sound?) doesn't that imply that it does not work correctly?
Sorry I am not a native speaker and probably did not explain well.
In the past, when a mov file was written with more than one audio stream, all audio streams were marked as "default" streams, meaning if you prepared a mov file for an iDevice containing a movie with several language tracks, all tracks were played simultaneously on playback. (Making the feature of muxing several audio tracks into mov useless to some degree.)
A change was committed that marked the first of several audio tracks as "default" and all other tracks as "non- default" (or as I badly named it: "silent"). This allows to select the language you like at playback and at the same time default playing (without selecting a language) works fine.
There is apparently a usecase (that I still don't understand completely) where you want all audio tracks to be marked as "default" (or non-silent). I am searching for a volunteer to help me testing this use-case.
Note that even for the mentioned use-case that currently does not work out-of-the-box, it is still possible to activate the silent tracks in your application (iiuc).
Carl Eugen
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
hmm, all offlist messages are equal, but some... Sorry! (And for Carl, you'll pick it up anyways...) Bouke VideoToolShed van Oldenbarneveltstraat 33 6512 AS NIJMEGEN, the Netherlands +31 24 3553311 ----- Original Message ----- From: "Bouke (VideoToolShed)" <bouke@videotoolshed.com> To: "FFmpeg user questions" <ffmpeg-user@ffmpeg.org> Sent: Friday, July 19, 2013 2:27 AM Subject: [FFmpeg-user] Offlist,Is mixing of audio channels happening by defaultin ffmpeg?
Carl, Since i'm working on audio mapping anyways, i can help testing if you like. Since you're not a native english speaker (I'm neither), where are you from / what's your native language? (Concidering your name i would think Spanish, but one never knows...)
Bouke
VideoToolShed van Oldenbarneveltstraat 33 6512 AS NIJMEGEN, the Netherlands +31 24 3553311 ----- Original Message ----- From: "Carl Eugen Hoyos" <cehoyos@ag.or.at> To: <ffmpeg-user@ffmpeg.org> Sent: Thursday, July 18, 2013 3:47 PM Subject: Re: [FFmpeg-user] Is mixing of audio channels happening by defaultin ffmpeg?
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
On 7/18/2013 9:30 AM, Carl Eugen Hoyos wrote:
Sam Marrocco <smarrocco <at> ringsidecreative.com> writes:
Is it possible to manually (through commandline args) tell it to copy all streams across without the (apparently bugged) -map 0 option?
How is this option bugged?
Perhaps I am reading what you wrote incorrectly:
"Note that if you specify -map 0 (to copy all streams), all output audio tracks except the first one will be silent.... This is probably trivial to fix "
If when asked to copy all the streams with -map 0 (implying they will be copied as is) they are copied silent (without sound?) doesn't that imply that it does not work correctly?
Sorry I am not a native speaker and probably did not explain well.
In the past, when a mov file was written with more than one audio stream, all audio streams were marked as "default" streams, meaning if you prepared a mov file for an iDevice containing a movie with several language tracks, all tracks were played simultaneously on playback. (Making the feature of muxing several audio tracks into mov useless to some degree.)
A change was committed that marked the first of several audio tracks as "default" and all other tracks as "non- default" (or as I badly named it: "silent"). This allows to select the language you like at playback and at the same time default playing (without selecting a language) works fine.
There is apparently a usecase (that I still don't understand completely) where you want all audio tracks to be marked as "default" (or non-silent). I am searching for a volunteer to help me testing this use-case.
Note that even for the mentioned use-case that currently does not work out-of-the-box, it is still possible to activate the silent tracks in your application (iiuc).
Carl Eugen
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Bouke (VideoToolShed <bouke <at> videotoolshed.com> writes:
Since i'm working on audio mapping anyways, i can help testing if you like.
I was hoping somebody could test if writing 0xf for all audio tracks as asked in this mail really helps: http://thread.gmane.org/gmane.comp.video.ffmpeg.user/45089/focus=45134
Since you're not a native english speaker (I'm neither), where are you from / what's your native language? (Concidering your name i would think Spanish, but one never knows...)
No, Carl Eugen isn't really Spanish... Carl Eugen
----- Original Message ----- From: "Carl Eugen Hoyos" <cehoyos@ag.or.at> To: <ffmpeg-user@ffmpeg.org> Sent: Friday, July 19, 2013 10:15 AM Subject: Re: [FFmpeg-user] Offlist,Is mixing of audio channels happening by defaultin ffmpeg?
Bouke (VideoToolShed <bouke <at> videotoolshed.com> writes:
Since i'm working on audio mapping anyways, i can help testing if you like.
I was hoping somebody could test if writing 0xf for all audio tracks as asked in this mail really helps: http://thread.gmane.org/gmane.comp.video.ffmpeg.user/45089/focus=45134
Eehm Carl, What do you want me to do? I'm an end user, not a C coder...
Since you're not a native english speaker (I'm neither), where are you from / what's your native language? (Concidering your name i would think Spanish, but one never knows...)
No, Carl Eugen isn't really Spanish...
But Hoyos is... Bouke VideoToolShed van Oldenbarneveltstraat 33 6512 AS NIJMEGEN, the Netherlands +31 24 3553311
Carl Eugen
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Bouke (VideoToolShed <bouke <at> videotoolshed.com> writes:
I was hoping somebody could test if writing 0xf for all audio tracks as asked in this mail really helps: http://thread.gmane.org/gmane.comp.video.ffmpeg.user/45089/focus=45134
What do you want me to do? I'm an end user, not a C coder...
No C coder is needed, just somebody who can compile FFmpeg. Apparently, this is such an unimportant problem that I will probably not work on it. Thanks, Carl Eugen
On Fri, Jul 19, 2013 at 6:06 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Bouke (VideoToolShed <bouke <at> videotoolshed.com> writes:
I was hoping somebody could test if writing 0xf for all audio tracks as asked in this mail really helps: http://thread.gmane.org/gmane.comp.video.ffmpeg.user/45089/focus=45134
What do you want me to do? I'm an end user, not a C coder...
No C coder is needed, just somebody who can compile FFmpeg. Apparently, this is such an unimportant problem that I will probably not work on it.
Thanks, Carl Eugen
I'd be glad to help test this but I'm not clear on what needs to change. Does avio_wb24(pb, track->secondary ? 0x2 : 0xf); need to become avio_wb24(pb, track->secondary ? 0x2 : 0xF); ?
Nathan Lewis <nlewis <at> crawford.com> writes:
I'd be glad to help test this but I'm not clear on what needs to change. Does avio_wb24(pb, track->secondary ? 0x2 : 0xf); need to become avio_wb24(pb, track->secondary ? 0x2 : 0xF); ?
No, please test: avio_wb24(pb, 0xF); Thank you, Carl Eugen
On Wed, Jul 31, 2013 at 6:12 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
No, please test: avio_wb24(pb, 0xF);
Thank you, Carl Eugen
That does not have any effect on the output file. In QT Player, Sound Track 1 is the only one enabled. I used this command: ./ffmpeg -i A.mov -c:v copy -c:a copy -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -ss 120 -t 60 -r 30000/1001 B.mov ffmpeg version N-55126-g69fe25c Copyright (c) 2000-2013 the FFmpeg developers built on Aug 1 2013 09:35:41 with llvm-gcc 4.2.1 (LLVM build 2336.1.00) configuration: --enable-libopenjpeg --enable-nonfree --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-pthreads --enable-libx264 --enable-version3 libavutil 52. 40.100 / 52. 40.100 libavcodec 55. 19.100 / 55. 19.100 libavformat 55. 12.102 / 55. 12.102 libavdevice 55. 3.100 / 55. 3.100 libavfilter 3. 82.100 / 3. 82.100 libswscale 2. 4.100 / 2. 4.100 libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100 Guessed Channel Layout for Input Stream #0.2 : mono Guessed Channel Layout for Input Stream #0.3 : mono Guessed Channel Layout for Input Stream #0.4 : mono Guessed Channel Layout for Input Stream #0.5 : mono Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'A.mov': Metadata: major_brand : qt minor_version : 537134592 compatible_brands: qt creation_time : 2012-10-18 09:59:25 Duration: 00:25:20.72, start: 0.000000, bitrate: 45253 kb/s Stream #0:0(eng): Data: none (tmcd / 0x64636D74) Metadata: timecode : 01:25:05;00 Stream #0:1(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 720x486, 42159 kb/s, SAR 8:9 DAR 320:243, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc Metadata: timecode : 01:25:05;00 Stream #0:2(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:3(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:4(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:5(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:6(eng): Subtitle: eia_608 (c608 / 0x38303663) File 'B.mov' already exists. Overwrite ? [y/N] y Output #0, mov, to 'B.mov': Metadata: major_brand : qt minor_version : 537134592 compatible_brands: qt encoder : Lavf55.12.102 Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 720x486 [SAR 8:9 DAR 320:243], q=2-31, 42159 kb/s, 29.97 fps, 30k tbn, 29.97 tbc Metadata: timecode : 01:25:05;00 Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:2(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:3(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:4(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream mapping: Stream #0:1 -> #0:0 (copy) Stream #0:2 -> #0:1 (copy) Stream #0:3 -> #0:2 (copy) Stream #0:4 -> #0:3 (copy) Stream #0:5 -> #0:4 (copy) Press [q] to stop, [?] for help Last message repeated 23 times 0kB time=00:00:00.00 bitrate=N/A frame= 1798 fps= 44 q=-1.0 Lsize= 334449kB time=00:01:00.01 bitrate=45653.5kbits/s video:311882kB audio:22498kB subtitle:0 global headers:0kB muxing overhead 0.020677%
Nathan Lewis <nlewis <at> crawford.com> writes:
On Wed, Jul 31, 2013 at 6:12 PM, Carl Eugen Hoyos wrote:
No, please test: avio_wb24(pb, 0xF);
Thank you, Carl Eugen
That does not have any effect on the output file.
Do you mean the output files are binary identical no matter if you use the original line or avio_wb24(pb, 0xF); ? Alternatively, you could test (unchanged) 454c5d1 Carl Eugen
On Thu, Aug 1, 2013 at 10:06 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Do you mean the output files are binary identical no matter if you use the original line or avio_wb24(pb, 0xF); ?
Sorry, I didn't. I meant that no matter what line I used the resultant output files had the same audio configuration with only channel one enabled. Channels 2-4 were disabled. As for the files being binary identical md5 returns different checksums.
Alternatively, you could test (unchanged) 454c5d1
This too results in a file with only channel 1 (QT player "Sound Track 1") enabled. Channels 2-4 are disabled. # ./ffmpeg -i A.mov -c:v copy -c:a copy -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -ss 120 -t 60 -r 30000/1001 C_4545cd1.mov ffmpeg version 1.1.git-454c5d1 Copyright (c) 2000-2013 the FFmpeg developers built on Aug 1 2013 11:30:46 with llvm-gcc 4.2.1 (LLVM build 2336.1.00) configuration: --enable-libopenjpeg --enable-nonfree --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-pthreads --enable-libx264 --enable-version3 libavutil 52. 17.103 / 52. 17.103 libavcodec 54. 92.100 / 54. 92.100 libavformat 54. 63.102 / 54. 63.102 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 41.100 / 3. 41.100 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Guessed Channel Layout for Input Stream #0.2 : mono Guessed Channel Layout for Input Stream #0.3 : mono Guessed Channel Layout for Input Stream #0.4 : mono Guessed Channel Layout for Input Stream #0.5 : mono Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'A.mov': Metadata: major_brand : qt minor_version : 537134592 compatible_brands: qt creation_time : 2012-10-18 09:59:25 Duration: 00:25:20.72, start: 0.000000, bitrate: 45253 kb/s Stream #0:0(eng): Data: none (tmcd / 0x64636D74) Metadata: timecode : 01:25:05;00 Stream #0:1(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 720x486, 42159 kb/s, SAR 8:9 DAR 320:243, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc Metadata: timecode : 01:25:05;00 Stream #0:2(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:3(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:4(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:5(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, s16, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:6(eng): Subtitle: eia_608 (c608 / 0x38303663) Output #0, mov, to 'C_4545cd1.mov': Metadata: major_brand : qt minor_version : 537134592 compatible_brands: qt encoder : Lavf54.63.102 Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 720x486 [SAR 8:9 DAR 320:243], q=2-31, 42159 kb/s, 29.97 fps, 30k tbn, 29.97 tbc Metadata: timecode : 01:25:05;00 Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:2(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:3(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream #0:4(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, mono, 768 kb/s Metadata: timecode : 01:25:05;00 Stream mapping: Stream #0:1 -> #0:0 (copy) Stream #0:2 -> #0:1 (copy) Stream #0:3 -> #0:2 (copy) Stream #0:4 -> #0:3 (copy) Stream #0:5 -> #0:4 (copy) Press [q] to stop, [?] for help frame= 1798 fps= 50 q=-1.0 Lsize= 334449kB time=00:01:00.01 bitrate=45653.5kbits/s video:311882kB audio:22498kB subtitle:0 global headers:0kB muxing overhead 0.020677%
On Thu, Aug 1, 2013 at 11:39 AM, Nathan Lewis <nlewis@crawford.com> wrote:
On Thu, Aug 1, 2013 at 10:06 AM, Carl Eugen Hoyos <cehoyos@ag.or.at>wrote:
Do you mean the output files are binary identical no matter if you use the original line or avio_wb24(pb, 0xF); ?
Sorry, I didn't. I meant that no matter what line I used the resultant output files had the same audio configuration with only channel one enabled. Channels 2-4 were disabled. As for the files being binary identical md5 returns different checksums.
Alternatively, you could test (unchanged) 454c5d1
This too results in a file with only channel 1 (QT player "Sound Track 1") enabled. Channels 2-4 are disabled.
I wanted to circle back to this to see if we can pick up where we left off. Do you have any other suggestions for testing? It would be great if there was a switch to override the default behavior.
On Thu, Jul 18, 2013 at 2:07 PM, Sam Marrocco <smarrocco@ringsidecreative.com> wrote:
I have an uncompressed Quicktime with 8 tracks of audio (in addition to it's one video and one Timecode track). I am transcoding it to Quicktime Prores with the following command line (and results):
"ffmpeg-20130507-git-399f6ef-win64-static\bin\ffmpeg.exe" -i "C:\Users\root\Desktop\MultiChannel.mov" -vcodec prores_ks -pix_fmt yuv444p10le -profile:v 3 -acodec copy -t 1 -f mov "D:\\MultiChannel\MultiChannel.mov"
Add "-map 0" to your command line See example 4 on this page: http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20use%20-map%20option Cheers Tom
participants (6)
-
Bouke (VideoToolShed) -
Carl Eugen Hoyos -
Nathan Lewis -
Sam Marrocco -
Tom Evans -
Wayne Poll