Audio mapping

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Audio mapping

Kasper Folman
Hi.

I’m having some issues properly mapping audio in a quicktime.
Say I just wan’t to create a mov file with 2 mono audio tracks.

This command creates the correct file.
ffmpeg -t 1  -i "/Volumes/Storage/_MoveToBackup/formatSamples/1x16-chAudioTest.mov" -filter_complex "[0:0]copy,fps=25,setfield=prog,setdar=dar=16/9,setsar=sar=1/1[vOut]" -c:a pcm_s32le -map 0:1 -filter:a:0 "pan=1c|c0=c0" -map 0:2 -filter:a:1 "pan=1c|c0=c0" -map [vOut] -c:v prores_ks -r 25 -pix_fmt yuv422p10le -profile:v 1 -field_order progressive -y -strict -2 "/Users/kf/Desktop/testfile_working.mov”

This one creates the file sort of correct. The only difference is, when I open it in Quicktime player, only the first audio track is enabled.
ffmpeg -t 1 -i "/Volumes/Storage/_MoveToBackup/formatSamples/1x16-chAudioTest.mov" -filter_complex "[0:0]copy,fps=25,setfield=prog,setdar=dar=16/9,setsar=sar=1/1[vOut];[0:1]pan=1|c0=c0[a1];[0:2]pan=1|c0=c0[a2];[a1]amerge=inputs=1[aOut0];[a2]amerge=inputs=1[aOut1]" -c:a pcm_s24le -map [aOut0] -map [aOut1] -map [vOut] -c:v prores_ks -r 25 -pix_fmt yuv422p10le -profile:v 1 -field_order progressive -y -strict -2 "/Users/kf/Desktop/testfile.mov”

In this example there’s no problem using the first command.

But what if I had a file with 4 mono tracks, and I wanted to merge those 4 tracks into 2 stereo tracks. It does do what I’m asking it to, but again, only the first audio track is enabled.

ffmpeg -t 1 -i "/Volumes/Storage/_MoveToBackup/formatSamples/1x16-chAudioTest.mov" -filter_complex "[0:0]copy,fps=25,setfield=prog,setdar=dar=16/9,setsar=sar=1/1[vOut];[0:1]pan=1c|c0=c0[a1];[0:2]pan=1c|c0=c0[a2];[0:3]pan=1c|c0=c0[a3];[0:4]pan=1c|c0=c0[a4];[a1][a2]amerge=inputs=2[aOut0];[a3][a4]amerge=inputs=2[aOut1]" -c:a pcm_s24le -map [aOut0] -map [aOut1] -map [vOut] -c:v prores_ks -r 25 -pix_fmt yuv422p10le -profile:v 1 -field_order progressive -y -strict -2 "/Users/kf/Desktop/testfile.mov"

Output #0, mov, to '/Users/kf/Desktop/testfile.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    encoder         : Lavf58.12.100
    Stream #0:0: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s
    Metadata:
      encoder         : Lavc58.18.100 pcm_s24le
    Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s
    Metadata:
      encoder         : Lavc58.18.100 pcm_s24le
    Stream #0:2: Video: prores (prores_ks) (apcs / 0x73637061), yuv422p10le(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc58.18.100 prores_ks

Do any of you an idea on how to solve this?
I’ve testet against the latest build. The output of FFMpeg is identical, and this seems to be the case on .mov, prores and h.264, and .mp4, h.264.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio mapping

Moritz Barsnick
On Thu, Jun 07, 2018 at 11:18:53 +0200, Kasper Folman wrote:

> This one creates the file sort of correct. The only difference is,
> when I open it in Quicktime player, only the first audio track is
> enabled.

I don't use Quicktime, but it seems I have heard of this before. It's a
bit like this issue.
https://trac.ffmpeg.org/ticket/3622

> Do any of you an idea on how to solve this?

I have no idea, but you could test the patch in the named ticket.

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio mapping

Kasper Folman
Is this something that would be implemented in the static build, or is there a way to patch the static build?

> On 7 Jun 2018, at 15.12, Moritz Barsnick <[hidden email]> wrote:
>
> On Thu, Jun 07, 2018 at 11:18:53 +0200, Kasper Folman wrote:
>
>> This one creates the file sort of correct. The only difference is,
>> when I open it in Quicktime player, only the first audio track is
>> enabled.
>
> I don't use Quicktime, but it seems I have heard of this before. It's a
> bit like this issue.
> https://trac.ffmpeg.org/ticket/3622
>
>> Do any of you an idea on how to solve this?
>
> I have no idea, but you could test the patch in the named ticket.
>
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio mapping

robertlazarski
In reply to this post by Kasper Folman
On Thu, Jun 7, 2018 at 3:18 AM, Kasper Folman <[hidden email]> wrote:

>
> But what if I had a file with 4 mono tracks, and I wanted to merge those 4
> tracks into 2 stereo tracks. It does do what I’m asking it to, but again,
> only the first audio track is enabled.
>
> ffmpeg -t 1 -i "/Volumes/Storage/_MoveToBacku
> p/formatSamples/1x16-chAudioTest.mov" -filter_complex
> "[0:0]copy,fps=25,setfield=prog,setdar=dar=16/9,setsar=sar=1
> /1[vOut];[0:1]pan=1c|c0=c0[a1];[0:2]pan=1c|c0=c0[a2];[0:3]
> pan=1c|c0=c0[a3];[0:4]pan=1c|c0=c0[a4];[a1][a2]amerge=input
> s=2[aOut0];[a3][a4]amerge=inputs=2[aOut1]" -c:a pcm_s24le -map [aOut0]
> -map [aOut1] -map [vOut] -c:v prores_ks -r 25 -pix_fmt yuv422p10le
> -profile:v 1 -field_order progressive -y -strict -2
> "/Users/kf/Desktop/testfile.mov"
>

I am using separate wav and mov files together however I am on Linux and do
not use quicktime as a player. And I am on 3.3.4.

Anyways using an alternative approach, a BWF works for me as a way to get 8
tracks into Ch1 / Ch2 audio of a mov file. Joining mono WAV files into a
single BWF may or not work for you but thought I'd mention it.

cuts.mov in this example is combined footage from two Zoom Q8 cameras,
f8t.wav is a BWF produced by an 8 track Zoom F8. Only showing first pass of
2pass.

ffmpeg -v error -i cuts.mov -i f8t.wav -pass 1 -passlogfile export.log -c:a
pcm_s16le -c:v libx264 -profile:v main -level 4.0 -refs 1 -x264-params
"keyint=8:b-pyramid=0:no-scenecut:nal-hrd=cbr:force-cfr=1" -r 30000/1001 -s
1920x1080 -b:v: 24M -bufsize 24M -maxrate 24M -b:a 48k -muxrate 24M
-sample_fmt s16 -ac 2 -ar 48000 -af
"aresample=async=1:min_hard_comp=0.000100:first_pts=0"
-crf 18 -metadata comment="Created with parseLTC.sh" -map 0:0 -map 1:0 -y
export.mov

Regards,
Robert
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".