Audio and video streams change in MP4 files  

This forum is dedicated to Autopano Video bug reports and features discussion.
Please read the posting rules before starting a topic!
no avatar
OpusMcN
Member
 
Topic author
Posts: 26
Likes: 0 post
Liked in: 4 posts
Joined: Wed Nov 04, 2015 1:43 am
Info

Audio and video streams change in MP4 files

by OpusMcN » Sun May 01, 2016 1:53 am

I've noticed when re-rendering a video multiple times to MP4 files that the index of the audio and video streams in the file seem to be different across multiple renders.

Here's the ffprobe result from a first render (at 3072x1536) with audio on stream index 0 and video on stream index 1

Code: Select all
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'shot7_3k.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2016-04-28 05:36:33
  Duration: 00:00:13.82, start: 0.000000, bitrate: 26093 kb/s
    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 156 kb/s (default)
    Metadata:
      creation_time   : 2016-04-28 05:36:35
      handler_name    : Mainconcept MP4 Sound Media Handler
    Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709
), 3072x1536 [SAR 1:1 DAR 2:1], 25995 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.8
8 tbc (default)
    Metadata:
      creation_time   : 2016-04-28 05:36:35
      handler_name    : Mainconcept MP4 Video Media Handler
      encoder         : AVC Coding


Re-rendering exactly the same file at 4k resolution gives me this with the video on index 0 and audio on index 1

Code: Select all
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'shot7_4k.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2016-04-30 20:48:07
  Duration: 00:00:13.82, start: 0.000000, bitrate: 26543 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709
), 4096x2048 [SAR 1:1 DAR 2:1], 26447 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.8
8 tbc (default)
    Metadata:
      creation_time   : 2016-04-30 20:48:16
      handler_name    : Mainconcept MP4 Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 156 kb/s (default)
    Metadata:
      creation_time   : 2016-04-30 20:48:25
      handler_name    : Mainconcept MP4 Sound Media Handler



This can seriously confuse video editing systems, if the stream indices get changed outside the video editor then things stop loading correctly and you have to rebuilt chunks of the timeline.

It would be a very good thing in the stream indices could be consistent for a project every time it gets rendered.

no avatar
Kash
Member
 
Posts: 22
Likes: 1 post
Liked in: 2 posts
Joined: Tue Dec 22, 2015 3:09 pm
Location: Brussels, Belgium
Info

Re: Audio and video streams change in MP4 files

by Kash » Mon May 02, 2016 9:21 am

Hey mate,

This is an interesting discover you've made. We have some post production problem with After Effect and Premiere some times, this could be an explaination of why some footage are totaly broken while some other drop frames occasionally.

Hope the Kolor team are going to work on that.

User avatar
Emeric
Kolor Team
 
Posts: 156
Likes: 3 posts
Liked in: 14 posts
Joined: Tue Apr 12, 2016 9:45 am
Info

Re: Audio and video streams change in MP4 files

by Emeric » Mon May 02, 2016 12:48 pm

Hi,
I investigated your issue and sometimes track headers storage order (that's what ffprobe print) does seems to permute. However their internal IDs (that's what softwares like mediainfo will print) do not changes, so video editing software should not be impacted by this.

no avatar
OpusMcN
Member
 
Topic author
Posts: 26
Likes: 0 post
Liked in: 4 posts
Joined: Wed Nov 04, 2015 1:43 am
Info

Re: Audio and video streams change in MP4 files

by OpusMcN » Tue May 03, 2016 4:38 am

As stated this does affect video editing software. Randomly permuting the stream ID's in your output for identical renders seems like a bug. It would be great if this could be fixed.

User avatar
martin.arnoux
Kolor Team
 
Posts: 544
Likes: 1 post
Liked in: 27 posts
Joined: Wed Feb 26, 2014 2:57 pm
Info

Re: Audio and video streams change in MP4 files

by martin.arnoux » Tue May 03, 2016 1:21 pm

Hi,

Can you clarify your workflow? Is the idea to use "proxy footages" (lower resolutions) for your editing in Premiere / After Effects and exchange the source video at the very end of the workflow?

I guess that your source files must have the same size for the kind of workflow...?

Cheers,

Martin

no avatar
OpusMcN
Member
 
Topic author
Posts: 26
Likes: 0 post
Liked in: 4 posts
Joined: Wed Nov 04, 2015 1:43 am
Info

Re: Audio and video streams change in MP4 files

by OpusMcN » Tue May 03, 2016 9:35 pm

Our workflow is to stitch all the shots of our video, edit those together into a single final movie (with soundtrack) , then get feedback on that from the client, who generally watches it in a gear Vr. If there are aspects of the stitch/stabilize they don't like we work more on that, re-render those shots, re create the full movie.. And repeat until we get sign off.


Who is online

Users browsing this forum: No registered users and 2 guests

cron