YouTube Ingest by Hand (Part 3)
Progress! "The ingestion stream does not contain any audio streams, but it must contain exactly one audio stream."

First thing this morning I noticed that while the MPD's SegmentTemplate "media" attribute was set to "file=media$Number$.mp4", I was sending files with a "%09d" formatted number, so my PUT files were never matching. Easy fix.
I'm going to ignore the audio error for now and instead address the keyframe frequency and see if that helps. I'll also bump up the encoder bitrate next.

Call me crazy, but I was hoping for a more vivid image than a black rectangle. Still, progress is progress. I wonder if it is waiting for audio. I hope not.

I increased the keyframe frequency (3s instead of 5s) and I bumped up the bitrate to get rid of the Warning messages. @YouTube is insistent on an audio stream though. I'm guessing that's the reason for the video-less stream? Referring again to the ISO BMFF media segment diagram, they want both streams contained in the one media file, which AVAssetWriter won't do.
SO.
What if we instead run two separate AVAssetWriters (one for each media type) and merge the files together by extracting the TRAF and MDAT from one and inserting it into the other. My limited understanding of these atoms suggests that I need to update some offsets.



Before I go down this rabbit-hole of on-the-fly M4F file editing, it occurred to me that VLC probably supports MPEG-DASH, so I fed it my MPD (s/dynamic/static/, fix file paths), and it worked like a charm. I'm only like 20% confident that the missing audio track is the problem.
It also occurs to me that I need to extract the TRAK from the initialization segment of one fragmented movie writer and merge it into the other initialization segment, otherwise it'll just be video and not audio or vice versa. That merge should be easy though.

To be continued.
