The iOS platform plays HLS jitter problem

Source: Internet
Author: User

Steps:

1.Adobe Flash Media Live Encoder 2.5 pushes H. nginx-rtmp to the main profile;

2.nginx-rtmp do HLS slices;

3.ipad play HLS, screen jitter.

Slice result Analysis:

1.ffmpeg (Adobe Flash Media Live Encoder 2.5, + H. Main profile)

Test Result: jitter, with B-frame, because the P-frame of PTS is smaller than the PTS in the following B-frame

IDR pcr:18900000 pts:126000

P pcr:20736000 pts:132120

B pcr:22572000 pts:138240

B pcr:24408000 pts:144360

B pcr:26244000 pts:150480

P pcr:28080000 pts:156600

2.nginx-rtmp (Adobe Flash Media Live Encoder 2.5, + H. Main profile)

Test Result: jitter, with B-frame, because the P-frame of PTS is smaller than the PTS in the following B-frame

IDR pcr:5044194000 pts:16939980

P pts:16946100

B pts:16949160

B pts:16955280

B pts:16961400

P pts:16967520

3.nginx-rtmp (Adobe Flash Media Live Encoder 2.5, H. Baseline profile)

Test Result: No jitter, no B-frames, each frame is displayed in normal increment pts order

IDR pcr:2576961477600 pts:63000

P pts:77310

P pts:83430

P pts:89460

P pts:95670

P pts:101790

Log:

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1112850, dts=1112850, cts=0

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1118970, dts=1118970, cts=0

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1125090, dts=1125090, cts=0

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1131210, dts=1131210, cts=0

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1137330, dts=1137330, cts=0

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1143450, dts=1143450, cts=0

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1149570, dts=1149570, cts=0

2014/11/05 12:43:44 [Debug] 5741#5741: * Hls:video pts=1155690, dts=1155690, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1161810, dts=1161810, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1167930, dts=1167930, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1174050, dts=1174050, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1180260, dts=1180260, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1186380, dts=1186380, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1192500, dts=1192500, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1198620, dts=1198620, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1204740, dts=1204740, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1210860, dts=1210860, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1216980, dts=1216980, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1220040, dts=1220040, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1226160, dts=1226160, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1232280, dts=1232280, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1238400, dts=1238400, cts=0

2014/11/05 12:43:45 [Debug] 5741#5741: * Hls:video pts=1244520, dts=1244520, cts=0

2014/11/05 12:43:46 [Debug] 5741#5741: * Hls:video pts=1250640, dts=1250640, cts=0

2014/11/05 12:43:46 [Debug] 5741#5741: * Hls:video pts=1256760, dts=1256760, cts=0

2014/11/05 12:43:46 [Debug] 5741#5741: * Hls:video pts=1262880, dts=1262880, cts=0

2014/11/05 12:43:46 [Debug] 5741#5741: * Hls:video pts=1268820, dts=1268820, cts=0

2014/11/05 12:43:46 [Debug] 5741#5741: * Hls:video pts=1275030, dts=1275030, cts=0

2014/11/05 12:43:46 [Debug] 5741#5741: * Hls:video pts=1281150, dts=1281150, cts=0

4.nginx-rtmp (Adobe Flash Media Live Encoder 3.2, + H. Main profile)

Test Result: No jitter, there is a B-frame, because the P-frame of PTS is larger than the PTS in the following B-frame

IDR pcr:1468908000 pts:5028570 dts:5022360

P pts:5053050 dts:5028570

B pts:5034690

B pts:5040810

B pts:5046930

P pts:5065290 dts:5053050

Log:

2014/11/05 12:46:17 [Debug] 5760#5760: * * Hls:video pts=14130, dts=0, cts=157

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=32400, dts=14130, cts=203

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=20250, dts=20250, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=26370, dts=26370, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=50760, dts=32400, cts=204

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=38520, dts=38520, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=44640, dts=44640, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=75150, dts=50760, cts=271

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=56970, dts=56970, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=63090, dts=63090, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=69120, dts=69120, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=93600, dts=75240, cts=204

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=81360, dts=81360, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=87480, dts=87480, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=111960, dts=93600, cts=204

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=99810, dts=99810, cts=0

2014/11/05 12:46:18 [Debug] 5760#5760: * * Hls:video pts=105930, dts=105930, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=130410, dts=112050, cts=204

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=118170, dts=118170, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=124290, dts=124290, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=151830, dts=130410, cts=238

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=136530, dts=136530, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=142650, dts=142650, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=148770, dts=148770, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=179370, dts=154890, cts=272

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=157950, dts=157950, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=164070, dts=164070, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=170190, dts=170190, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=194670, dts=176310, cts=204

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=182430, dts=182430, cts=0

2014/11/05 12:46:19 [Debug] 5760#5760: * * Hls:video pts=188640, dts=188640, cts=0

2014/11/05 12:46:20 [Debug] 5760#5760: * * Hls:video pts=219240, dts=194760, cts=272

2014/11/05 12:46:20 [Debug] 5760#5760: * * Hls:video pts=200880, dts=200880, cts=0

2014/11/05 12:46:20 [Debug] 5760#5760: * * Hls:video pts=207000, dts=207000, cts=0

2014/11/05 12:46:20 [Debug] 5760#5760: * * Hls:video pts=213120, dts=213120, cts=0

2014/11/05 12:46:20 [Debug] 5760#5760: * * Hls:video pts=243720, dts=219240, cts=272

2014/11/05 12:46:20 [Debug] 5760#5760: * * Hls:video pts=225360, dts=225360, cts=0

Conclusion:

1. The reason for jitter is not directly related to the H. C encoding, and the Adobe Flash Media Live Encoder 2.5 version pushes H. main profile, rtmp timestamp and CTS errors, resulting in incorrect B-frame and P-frame pts.

2. The correct pts:p frame of PTS is larger than the PTS at the back B-frame!

3. The problem is caused by the encoder

CTS: reference to ISO 14496-12, 8.15.3

The iOS platform plays HLS jitter problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.