Recently ran into an issue where videos from the latest iPhones were failing in both my Vantage(flip64) and FFAStrans worfklows. After poking around I find that their spatial audio, tagged as "apac", shows up as a second four channel audio stream. Both Vantage and FFAStrans default is to decode all audio streams so the user can do what they want with them downstream, unfortunately this fails when one of those audio streams has no decoders available. It's unfortunate as the first stream is completely normal AAC stereo stream.
I've attached(Merry Xmas!) my current workaround in FFAStrans, a snip from a larger workflow. It uses mediainfo to see if apac is present, if yes then it hits a custom FFMPEG block that removes the second audio stream. It's clunky and will break if any of the assumptions change, so if the codec name changes from apac, or if it's not the second audio stream, etc.
This brings up a feature request for the devs. Perhaps when no decoder is available instead of failing the whole thing just ignore the non-decodable stream? Or maybe there is a better way to do this with existing workflow nodes?
iPhone spatial audio issue
-
- Posts: 108
- Joined: Wed Dec 27, 2017 3:21 am
iPhone spatial audio issue
- Attachments
-
- apac_workaround.json
- (7.63 KiB) Downloaded 7 times
Re: iPhone spatial audio issue
Aye Mr. Crispy, i am excited to see you back in business Thank you so much for your contribution, very much appreciated!
It would be good to have some sample file, unfortunately i did not find any. I'm pretty sure steinar wants to add support for it and if not then i shall implement it.
There are also chances that we get a fix for the failure because ffmpeg has an apac decoder. If we can submit some sample file in the ffmpeg bugtracker, there are chances that someone takes care about identifying and fixing the shortcoming.
If by chance anyone has such a phone and can produce a file for debugging, please generate the shortest and smallest possible file that you can. E.g. just film some clap for 0.5 seconds, lowest possible resolution and framerate, hevc encoding. The use of this can potentially be to end up in the ffmpeg "fate" suite which would ensure that this exact file type stays supported in future.
It would be good to have some sample file, unfortunately i did not find any. I'm pretty sure steinar wants to add support for it and if not then i shall implement it.
There are also chances that we get a fix for the failure because ffmpeg has an apac decoder. If we can submit some sample file in the ffmpeg bugtracker, there are chances that someone takes care about identifying and fixing the shortcoming.
If by chance anyone has such a phone and can produce a file for debugging, please generate the shortest and smallest possible file that you can. E.g. just film some clap for 0.5 seconds, lowest possible resolution and framerate, hevc encoding. The use of this can potentially be to end up in the ffmpeg "fate" suite which would ensure that this exact file type stays supported in future.
emcodem, wrapping since 2009 you got the rhyme?
Re: iPhone spatial audio issue
Vantage? Brrrrrrr that word is like Voldemort in Harry Potter, it can't be pronounced here.
Besides, it should really be called "DisadVantage" given that it sets you back compared to using FFAStrans.
FFAStrans for life!
Ok, jokes aside, I'm very happy to see that you reported this 'cause this is perfect for testing! I actually faced the same issue and so did Grandmaster Steinar who implemented a workaround in the master branch two weeks ago. (Yes, he's fast). As of now, the latest FFAStrans 1.4.1 should be able to handle this.
You can actually test it yourself if you click on "code" and "download .zip".
https://github.com/steipal/FFAStrans-Public
This is why I'm happy to see that you reported it: we actually need more people to test it.
When you go back to the office please try it out 'cause the tests we can make on our own will always be limited and we're always happy to have other people try things out. This is especially important if you have different recordings with different devices.
By the way, the fix is implemented in exactly the same way you described, namely in the audio functions not only FFAStrans checks that the codec type is audio using ffprobe like before but now it also makes sure that the codec is known by checking the codec name. If it's not known, then it doesn't attempt to decode it, thus solving the issue. This should be future proof (which is what you would expect from Grandmaster) as it's not limited to this particular scenario but also any other possible future codec until an open source decoder is available.
Anyway, please let us know and remember that FFAStrans 1.4.1 was built directly from master (well... fine, before the other guys scold me saying that it wasn't, it was built from the 1.4.1 branch which right now is master anyway ) so there might be other bugs as it hasn't been released as stable just yet.
I'm eager to know the results but if it works then happy days!
Oh, I almost forgot: Merry Christmas!
Besides, it should really be called "DisadVantage" given that it sets you back compared to using FFAStrans.
FFAStrans for life!
Ok, jokes aside, I'm very happy to see that you reported this 'cause this is perfect for testing! I actually faced the same issue and so did Grandmaster Steinar who implemented a workaround in the master branch two weeks ago. (Yes, he's fast). As of now, the latest FFAStrans 1.4.1 should be able to handle this.
You can actually test it yourself if you click on "code" and "download .zip".
https://github.com/steipal/FFAStrans-Public
This is why I'm happy to see that you reported it: we actually need more people to test it.
When you go back to the office please try it out 'cause the tests we can make on our own will always be limited and we're always happy to have other people try things out. This is especially important if you have different recordings with different devices.
By the way, the fix is implemented in exactly the same way you described, namely in the audio functions not only FFAStrans checks that the codec type is audio using ffprobe like before but now it also makes sure that the codec is known by checking the codec name. If it's not known, then it doesn't attempt to decode it, thus solving the issue. This should be future proof (which is what you would expect from Grandmaster) as it's not limited to this particular scenario but also any other possible future codec until an open source decoder is available.
Anyway, please let us know and remember that FFAStrans 1.4.1 was built directly from master (well... fine, before the other guys scold me saying that it wasn't, it was built from the 1.4.1 branch which right now is master anyway ) so there might be other bugs as it hasn't been released as stable just yet.
I'm eager to know the results but if it works then happy days!
Oh, I almost forgot: Merry Christmas!
-
- Posts: 108
- Joined: Wed Dec 27, 2017 3:21 am
Re: iPhone spatial audio issue
I can confirm that the very latest version of the master branch downloaded as @FranceBB directed seems to deal with apac/spatial audio without failing. It's only installed on my desktop that I use for testing, haven't tried it in production. I can also confirm that the latest version downloaded via the releases page (1.4.0.7) will fail on the same file. So it does appear @admin has figured this out since that release.
@emcodem I am working to get you a test file that is 1) tiny enough to upload here and 2) I feel comfortable uploading as the other files are not mine to distribute.
I must stick up for Vantage, I've dealt with companies that will sell you far less, have worse support, all for much more money$$$. I've been using their product since it was called "Flip Factory" back about 2011ish. Their killer-app for our operation is Avid (the real Voldemort) integration. Their GPU accelerated "lightspeed" is also very faaaaasssst! And (hate to admit it) I'd rather tell my boss "the thing corporate bought us broke and it's not my fault they can't fix it" vs "the thing I downloaded that I'm the only who can work on broke and I haven't figure it out yet....I guess it is my fault?"
Seriously though, if I didn't need the Avid stuff, FFAStrans could do everything we need and is genuinely amazing. FFAStrans for life!
@emcodem I am working to get you a test file that is 1) tiny enough to upload here and 2) I feel comfortable uploading as the other files are not mine to distribute.
I must stick up for Vantage, I've dealt with companies that will sell you far less, have worse support, all for much more money$$$. I've been using their product since it was called "Flip Factory" back about 2011ish. Their killer-app for our operation is Avid (the real Voldemort) integration. Their GPU accelerated "lightspeed" is also very faaaaasssst! And (hate to admit it) I'd rather tell my boss "the thing corporate bought us broke and it's not my fault they can't fix it" vs "the thing I downloaded that I'm the only who can work on broke and I haven't figure it out yet....I guess it is my fault?"
Seriously though, if I didn't need the Avid stuff, FFAStrans could do everything we need and is genuinely amazing. FFAStrans for life!