[FFmpeg-user] Interleaving problem
László Havasi
laszlo.havasi at gmail.com
Tue Oct 8 22:04:18 EEST 2019
Hi,
I need a "good" interleaved mpeg-ts media. I have found that the ffmpeg is
unable to re-interleave the input data.
As can be seen on the packet list below, the audio and video packets are
not interleaved well. There are several video packets and several audio
packets.
Is it possible to force ffmpeg to mix the packets better?
Command:
ffmpeg -i input.ts -max_delay 100 -c:v mpeg1video -c:a mp2 -ac 1 -vf
showinfo -af asetnsamples=n=100,ashowinfo -f mpegts -max_delay 100 out.ts
The options (max_delay, asetnsamples) have no positive effect in this case.
Sample:
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4021 pts:402100 pts_time:9.11791
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:2F9E80D9 plane_checksums: [ 2F9E80D9 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4022 pts:402200 pts_time:9.12018
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:7F034C8C plane_checksums: [ 7F034C8C ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4023 pts:402300 pts_time:9.12245
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:0E2F633C plane_checksums: [ 0E2F633C ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4024 pts:402400 pts_time:9.12472
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:19FC7A5F plane_checksums: [ 19FC7A5F ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4025 pts:402500 pts_time:9.12698
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:56AB48CB plane_checksums: [ 56AB48CB ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4026 pts:402600 pts_time:9.12925
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:6EAC726E plane_checksums: [ 6EAC726E ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4027 pts:402700 pts_time:9.13152
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:B0D87353 plane_checksums: [ B0D87353 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4028 pts:402800 pts_time:9.13379
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:D62D4CE2 plane_checksums: [ D62D4CE2 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4029 pts:402900 pts_time:9.13605
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:91C1718C plane_checksums: [ 91C1718C ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4030 pts:403000 pts_time:9.13832
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:63EF6E75 plane_checksums: [ 63EF6E75 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4031 pts:403100 pts_time:9.14059
pos:-1 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:74033F9E plane_checksums: [ 74033F9E ]
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 217 pts: 815546 pts_time:9.06162
pos: 532792 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:249E9D8A plane_checksum:[43AFDAD2 5FA2E3C4 4C9DDED6] mean:[114 114
147] stdev:[47.0 29.5 12.4]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 218 pts: 819300 pts_time:9.10333
pos: 533920 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:79B76767 plane_checksum:[69737197 E3D70330 F11FF291] mean:[114 115
147] stdev:[46.9 29.6 12.3]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 219 pts: 823053 pts_time:9.14503
pos: 535424 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:3FA5DC51 plane_checksum:[A090C95B 3DB11875 2A84FA72] mean:[114 115
147] stdev:[46.9 29.7 12.3]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 220 pts: 826807 pts_time:9.18674
pos: 539560 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:68C9BFC8 plane_checksum:[482E7C19 24DC3B9B 72B60814] mean:[114 115
147] stdev:[46.8 29.9 12.4]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 221 pts: 830561 pts_time:9.22846
pos: 540876 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:BB8D296C plane_checksum:[BEDFC4D2 EB1C4850 2EE81C3B] mean:[114 115
147] stdev:[46.8 30.0 12.4]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 222 pts: 834315 pts_time:9.27017
pos: 542004 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:FD32A363 plane_checksum:[04F50701 A85175A9 0A9126B9] mean:[114 115
147] stdev:[46.7 30.1 12.4]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 223 pts: 838068 pts_time:9.31187
pos: 543696 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:D3DAFE93 plane_checksum:[9CEF2F53 FAF29B53 F36733ED] mean:[114 115
147] stdev:[46.6 30.2 12.4]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
12 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 224 pts: 841822 pts_time:9.35358
pos: 545388 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:1 type:I
checksum:1F287AC7 plane_checksum:[37E2068E 70FD323A 647641FF] mean:[114 115
147] stdev:[46.5 30.4 12.3]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0000011a3e9e9880] n: 225 pts: 845576 pts_time:9.39529
pos: 554788 fmt:yuv420p sar:1/1 s:720x302 i:P iskey:0 type:P
checksum:C2E4AB8B plane_checksum:[BD5E1DD7 6306539D 4D6B3A17] mean:[114 115
147] stdev:[46.4 30.5 12.3]
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - pan/scan
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
17 (874 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] side data - unknown side data type
16 (8 bytes)
[Parsed_showinfo_0 @ 0000011a3e9e9880] color_range:tv color_space:unknown
color_primaries:unknown color_trc:unknown
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4032 pts:403200 pts_time:9.14286
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:F783745F plane_checksums: [ F783745F ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4033 pts:403300 pts_time:9.14512
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:670854AE plane_checksums: [ 670854AE ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4034 pts:403400 pts_time:9.14739
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:61825F72 plane_checksums: [ 61825F72 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4035 pts:403500 pts_time:9.14966
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:F0E086FA plane_checksums: [ F0E086FA ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4036 pts:403600 pts_time:9.15193
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:E8714A3D plane_checksums: [ E8714A3D ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4037 pts:403700 pts_time:9.1542
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:34EC7303 plane_checksums: [ 34EC7303 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4038 pts:403800 pts_time:9.15646
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:BCE17618 plane_checksums: [ BCE17618 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4039 pts:403900 pts_time:9.15873
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:5FCE44DC plane_checksums: [ 5FCE44DC ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4040 pts:404000 pts_time:9.161
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:AD19716E plane_checksums: [ AD19716E ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4041 pts:404100 pts_time:9.16327
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:194A68E4 plane_checksums: [ 194A68E4 ]
[Parsed_ashowinfo_1 @ 0000011a3e9e9080] n:4042 pts:404200 pts_time:9.16553
pos:558924 fmt:s16p channels:1 chlayout:mono rate:44100 nb_samples:100
checksum:23663ADE plane_checksums: [ 23663ADE ]
More information about the ffmpeg-user
mailing list