I've discovered the method used by FFmpeg to assign maps, and it seems that it could easily be improved and that it's potentially a big deal.

My specimens are VOBs, reported by FFprobe.

For VTS_02_1.VOB, FFmpeg assigns streams as follows:
  Stream #0:0[0x1bf]: Data: dvd_nav_packet
  Stream #0:1[0x1e0]: Video: ...etc.
  Stream #0:2[0x83]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s ...5.1 
isolated score
  Stream #0:3[0x82]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s    ...2.0 
commentary
  Stream #0:4[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s ...5.1 
dialog
  Stream #0:5[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s    ...2.0 
dialog

For VTS_02_2.VOB, FFmpeg assigns streams as follows:
  Stream #0:0[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s ...5.1 
dialog
  Stream #0:1[0x1e0]: Video: ...etc.
  Stream #0:2[0x82]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s    ...2.0 
commentary
  Stream #0:3[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s    ...2.0 
dialog
  Stream #0:4[0x83]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s ...5.1 
isolated score
  Stream #0:5[0x1bf]: Data: dvd_nav_packet

Question: Does this make any sense at all?


Further Investigation. The summary below easily shows the audio streams 'move' 
between maps.

                    VTS_02_1.VOB map    VTS_02_2.VOB map    actual stream IDs
2.0 dialog                a:3                 a:2                 0x80
5.1 dialog                a:2                 a:0                 0x81
2.0 commentary            a:1                 a:1                 0x82
5.1 isolated score        a:0                 a:3                 0x83

Confirmed: That FFmpeg's maps are not assigned by audio stream IDs, but are assigned in the order in which they are first encountered.
That is not the least bit sensible.


The following would make sense.

                    VTS_02_1.VOB map    VTS_02_2.VOB map    actual stream IDs
2.0 dialog                a:0                 a:0                 0x80
5.1 dialog                a:1                 a:1                 0x81
2.0 commentary            a:2                 a:2                 0x82
5.1 isolated score        a:3                 a:3                 0x83

Can this be corrected?

--Mark.

--
Met-a-verse:
While I was going up the stair,
I met-a man who wasn't there.
He wasn't there again today.
I wish, I wish he'd go away.
-- "IDENTITY", 2003, Columbia Pictures
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to