hongzimao / pensieve

Neural Adaptive Video Streaming with Pensieve (SIGCOMM '17)
http://web.mit.edu/pensieve/
MIT License
517 stars 280 forks source link

Possible bug in env.py implementation #67

Open boria-k opened 5 years ago

boria-k commented 5 years ago

It seems that the sim/env.py (and also fixed_env.py) never plays the last segment of the playlist due to the following problem:

The number of segments is set to 48 by TOTAL_VIDEO_CHUNCK constant, but the counter self.video_chunk_counter is compared to this value after it is incremented already, so end_of_video is set to True for the segment before the last. Therefore, the last chunk is never played.

hongzimao commented 5 years ago

You might be right. Could you check if the last chunk is really never played? If that's the case, fixing it in the real environment should help improving the results (since it's a discrepancy between real environment and simulator).

boria-k commented 5 years ago

From what I've seen, the last chunk is not played. I'm not sure it influences the results significantly, the last chunk is just ignored. It behaves as if the video had 48 chunks and not 49. Can it be that the last segment was discarded on purpose? Many times the last segment has different duration, could it be a problem?

hongzimao commented 5 years ago

Hmm in simulation the chunk duration should be fixed (https://github.com/hongzimao/pensieve/blob/master/sim/env.py#L101). Where did you observe the chunk duration being different?

boria-k commented 5 years ago

I just thought that probably in the actual video pensive is trained on, the last segment is shorter (I could not verify it), so the last segment was discarded in the simulation.