OpenVisualCloud / CDN-Transcode-Sample

Media transcoding is a key function for live video broadcasting, streaming, and video on demand use cases in a CDN network. The CDN Transcode sample (not a finished product) provides a reference pipeline to build an out-of-box 1:N CDN streaming transcode service example.
Other
120 stars 37 forks source link

Segment ts files deletion speed is faster than index.m3u8 updated speed that caused the output stream can’t be played when the input is IP camera. #23

Open enzomao opened 5 years ago

enzomao commented 5 years ago

[Issue Description] When use IP camera stream as input to do SVT-HEVC transcoding with ffmpeg, the output stream can’t be played after about three minutes of transcoding. The error message of VLC is "Failed reading https://host IP/hls/4kStream/0.ts: HTTP/1.1 404 Not Found", please refer to VCL.png attach file for details. After checking index.m3u8 file, it was found that Segment ts files deletion speed is faster than index.m3u8 updated speed.Please refer to ts.png attach file for details. The issue only can't be reproduced on E3 server and VCA2 server.

[Reproduce Steps]

  1. Setup 1toN Xcode Sample test environment based on the guide (CDN_Transcode_Sample_Getting_Started_Guide.md).
  2. Run below command line to do transcoding: ffmpeg -i rtsp://admin:password@IP cameras/101 -s 40962160 -c:a copy -c:v libsvt_hevc -f flv rtmp://CDN IP/hls/4kStream -s 20481024 -c:a copy -c:v libsvt_hevc -f flv rtmp://CDN IP/hls/2kStream -s 19201080 -c:a copy -c:v libsvt_hevc -f flv rtmp://CDN IP/hls/1080Stream -s 1080720 -c:a copy -c:v libsvt_hevc -f flv rtmp://CDN IP/hls/720Stream -s 720480 -c:a copy -c:v libsvt_hevc -f flv rtmp://CDN IP/hls/480Stream -s 320240 -c:a copy -c:v libsvt_hevc -f flv rtmp://CDN IP/hls/240Stream
  3. Run below command to use VLC playback after about three minutes. vlc https://host IP/hls/4kStream/index.m3u8
  4. Check Segment ts files and index.m3u8 file under /var/www/hls/4kStream

[Actual Phenomenon]

  1. The output stream can’t be played.
  2. Segment ts files deletion speed is faster than index.m3u8 updated speed.

ts VLC

TangZhiZhen commented 5 years ago

we need check its env.

xinglongx commented 5 years ago

still exist in the lastest code. commit id: 9512773a1091dade41a9271f0a4b24182a1044d9 vlc client will hangup after play finish one ts file. Segment ts files deletion speed is faster than index.m3u8 updated speed in the live transcode server. index hang