google / spatial-media

Specifications and tools for 360º video and spatial audio.
Other
1.85k stars 428 forks source link

Using the latest binary release for Mac, unable to set the spatial audio flag #110

Open puffpio opened 8 years ago

puffpio commented 8 years ago

Steps to repro:

I have an mp4 container with 1 h264 video stream and 1 4-channel vorbis audio stream Load the video into the tool, I am able to check/uncheck the settings for video and stereoscopy, but not the audio check is greyed out

dcower commented 8 years ago

Hey @puffpio,

I think the issue here is that we only support AAC audio (AAC LTP, value 4 from this page) in the ESDS box (specifically, in get_aac_num_channels, I believe it's the config_descriptor_tag check). I haven't tested removing that restriction in the injector, but it might work to just remove that.

Do you have any resources for how Vorbis audio is signalled in MP4?

Thanks! Dillon

puffpio commented 8 years ago

Ahh that makes sense. I tried using the command line tools and got a more descriptive error message: "Error: failed to read decoder config. descriptor." for the audio channel I do not have a good idea how it is signaled, but using ffprobe -show_streams yields this for the audio channel

[STREAM] index=1 codec_name=vorbis codec_long_name=Vorbis profile=unknown codec_type=audio codec_time_base=1/44100 codec_tag_string=mp4a codec_tag=0x6134706d sample_fmt=fltp sample_rate=44100 channels=4 channel_layout=quad bits_per_sample=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/44100 start_pts=0 start_time=0.000000 duration_ts=6031028 duration=136.758005 bit_rate=968951 max_bit_rate=N/A bits_per_raw_sample=N/A nb_frames=12429 nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=1 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 TAG:language=und TAG:handler_name=SoundHandler [/STREAM]

what are your thoughts on on multichannel AAC as an ingestion fromat versus vorbis/opus?

dcower commented 8 years ago

Ah, neat! I think it should be a pretty simple fix then; we can probably safely ignore the config descriptor. I probably won't get a chance to make the change / verify it works for a bit; feel free to send a pull request if you find it does though!

RE:multichannel AAC vs Vorbis/Opus, I don't see any reason to not support Vorbis/Opus, assuming you can signal them in an MP4. I always recommend folks to crank the audio bitrate for ingest, and I'm not aware of any significant differences between the codecs when they go beyond transparent bitrates for 4-channel audio. Did you have any specific concerns?

puffpio commented 8 years ago

Main concern is that there are several flavors of AAC (eg LC, V2, etc) and some perform better than others with regard to channel separation. The typical person may not be aware of this. Hopefully their spatial audio tool tool export audio with the best possible settings. But then it is also possible for them to run the video/audio through another editing pass and things get a generational loss + lose channel separation (eg how many times has a good 360 video been put through a prosumer video editing package and then mysteriously lost the metadata/suffer a transcode quality loss)

The defaults on the other codecs appear to perform better in that regard so wanted to flag it in case you guys were interested

On Tue, Jul 12, 2016 at 8:20 AM, Dillon Cower notifications@github.com wrote:

Ah, neat! I think it should be a pretty simple fix then; we can probably safely ignore the config descriptor. I probably won't get a chance to make the change / verify it works for a bit; feel free to send a pull request if you find it does though!

RE:multichannel AAC vs Vorbis/Opus, I don't see any reason to not support Vorbis/Opus, assuming you can signal them in an MP4. I always recommend folks to crank the audio bitrate for ingest, and I'm not aware of any significant differences between the codecs when they go beyond transparent bitrates for 4-channel audio. Did you have any specific concerns?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/spatial-media/issues/110#issuecomment-232082042, or mute the thread https://github.com/notifications/unsubscribe/AALS3dU0GPrIUzs8uImOgdfBWmXADREbks5qU7DXgaJpZM4JDemE .