Problem solved.  Here's the YouTube version of one of the most downloaded
file from Ambisonia, AJH_eigtht_positions.amb

   https://youtu.be/eY9DMn8pgGA

Thanks to Albert, Dillon, Bruce, and Marc for suggestions.  Dillon
diagnosed the problem, but it took a while to discover that the fix had to
be applied farther upstream in my processing chain.

TL:DR: use a plain old WAV_PCM file for the audio input to FFMPEG, not a
WAVE-EX file.


I am using the remix effect in SOX to convert from AMB format to ACN/SN3D
 -- "remix -m 1 3v0.7071 4v0.7071 2v0.7071".   When sox writes out a
4-channel file it defaults to WAVE-FORMAT-EXTENSIBLE (which is correct
according to the MS standards) with the channel mask set to "quad". I don't
see anyway to change that to 4.0.

Here's the problem .... when writing a video file, FFMPEG appears to use
the channel_mask from the audio file even if a different channel_mask is
specified on the command line.   So even when I specified  "-channel_layout
4.0", the resulting MOV file still had the channel layout set to "quad",
which was then rejected by YouTube.

The workaround is to use the option "-t wavpcm" to force SOX produce a
plain old WAVPCM file.  (note that use of WAVPCM for more then 2 channels
is undocumented).  As a belt-and-suspenders measure, I added
"-guess_layout_max 0" to the input in FFMPEG.

I wrote a Python script that automates the whole process from AMB to MOV
with spatial metadata.  You can find it here:

   https://bitbucket.org/ambidecodertoolbox/amb2yt/src/master/amb2yt.py


--
Aaron Heller (hel...@ai.sri.com)
Menlo Park, CA  US


> On Tue, Apr 26, 2016 at 5:17 PM Dillon Cower <dco...@google.com> wrote:
>
> > Hi Aaron,
> >
> > Currently the channel layout for upload to YouTube must be 4.0 or
> > unspecified <https://support.google.com/youtube/answer/6395969?hl=en>;
> > e.g., with ffmpeg, specify "-channel_layout 4.0". We're working on
> > improving things regarding other channel layouts. Apologies for the
> > confusion in the meantime!
> >
> > Dillon
> >
> > On Mon, Apr 25, 2016 at 2:43 PM Bruce Wiggins <bruce.wigg...@gmail.com>
> > wrote:
> >
> > > I've documented the workflow and commands that worked for me here:
> > > http://www.brucewiggins.co.uk/?p=666
> > >
> > > cheers
> > >
> > > Bruce
> > >
> > > On Mon, Apr 25, 2016 at 10:15 PM Albert Leusink <
alb...@tumbleandyaw.com
> > >
> > > wrote:
> > >
> > > > Aaron Heller <heller@...> writes:
> > > >
> > > > >
> > > > > Is there some trick to uploading these files?  The files I make
> > upload,
> > > > but
> > > > > then fail during processing.
> > > > >
> > > >
> > > >
> > > > Hi Aaron,
> > > >
> > > > Try this, start with an MP4 video file and the 4-channel .wav ACN
audio
> > > > file. Maybe the issue is that you are trying to loop a still image?
> > > Also, I
> > > > did not specify quad layout, I just attached the 4-ch .wav.
> > > >
> > > >
> > > >  -i YT_Videofile.mp4 -i YT_ACN_audiofile.wav -map 0:0 -map 1:0 -c:a
> > copy
> > > > -async 1 -c:v copy -aspect 1920:960 -pix_fmt yuv420p -threads 8
> > -metadata
> > > > creation_time=now -sn -y YoutubeFinal.mov
> > > >
> > > > It takes about 4 hours for the spatial audio (with the rotation) to
> > fully
> > > > process after you upload it (sometimes longer), but you should be
able
> > to
> > > > hear the ACN rendered to stereo pretty soon after you upload.
> > > >
> > > > Hope that helps,
> > > >
> > > > Albert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://mail.music.vt.edu/mailman/private/sursound/attachments/20160507/1b722373/attachment.html>
_______________________________________________
Sursound mailing list
Sursound@music.vt.edu
https://mail.music.vt.edu/mailman/listinfo/sursound - unsubscribe here, edit 
account or options, view archives and so on.

Reply via email to