Move track length into struct
Move track length into struct
Zero out struct on re-creation
Cleanup output formatting
Document function; pass return value
Use function to set video codec directly