HearthStats / HearthStats.net-Uploader

Auto uploader for HearthStats.net
BSD 3-Clause "New" or "Revised" License
123 stars 54 forks source link

Video Replay Cut Off #590

Open trigun0x2 opened 9 years ago

trigun0x2 commented 9 years ago

Not sure if it's due to the actual recording or the uploading that makes the video end abruptly.

There seems to be some twitching in the video right before it cuts off:

https://s3-us-west-2.amazonaws.com/hearthstats/prem-videos/27891/3849936.mp4 https://s3-us-west-2.amazonaws.com/hearthstats/prem-videos/710/3857846.mp4

This video just ends randomly: https://s3-us-west-2.amazonaws.com/hearthstats/prem-videos/27891/3849904.mp4

trigun0x2 commented 9 years ago

@tyrcho from some debugging it seems like the error occurs during the actual recording phase of the video.

coeing commented 9 years ago

Hey there!

Really love your tool, great work :)

Is there any progress to this issue though? I can confirm the cut-off and twitching at the end of the video. It makes the videos really useless, would be great to have a record of some games.

Cheers Christian

tyrcho commented 9 years ago

Hi,

I don't really reproduce these video issues at the moment, most of the time my recorded video is fine (see for example http://hearthstats.net/matches/4132344).

Would you please post here some match links with bad videos + the details of your config ?

I'll probably be able to have a deeper look in February, this month I'm again shooting seriously for legend so I have less time for the companion project.

coeing commented 9 years ago

Hi @tyrcho,

I don't have a premium account, so my videos are not uploaded. I could upload a video somewhere else if it helps, but in general my videos look like the ones provided by @trigun0x2

Good luck with your legend run! Tried it myself two times, but just reached rank 4 and 3 :/ Maybe next time!

Cheers Christian

tyrcho commented 9 years ago

Thanks ! Maybe you can share one on Google+, or Dropbox ? Also some details about the config (CPU, RAM, OS)

coeing commented 9 years ago

Sure, here's one: https://www.dropbox.com/s/pd6rzjmbzxtgeuk/11_19h44_Mage_Win_VS_Mage.mp4?dl=0

My configuration: CPU Intel Core i5-3450 RAM 8 GB OS Windows 8 GPU ATI Radeon HD 7800

If you point me to the location at the source code where the recording takes place, I could have a look on my own, I'm a programmer, too.

tyrcho commented 9 years ago

OK, it seems to be the same issue I have from time to time. The start of the video is usually fine, then at some point it starts flickering and never improves, right ? It must be an issue with the way the time is encoded.

@coeing if you want to have a look, thanks ! A second eye on this code would be great, I'm not too proud of it. Relevant places :

Basically it's complex because we rely on screenshots to be provided, which arrive ASAP but not very fast (about 10-15 times per seconds depending on resolution, CPU ...) and we would like the video time to follow the game time. Also the encoding sometimes takes more time (I guess when the unredlying encoding library processes a key frame) so we need a batch mechanism to avoid losing frames. Any simplification / optimization would be welcome !

coeing commented 9 years ago

Hi @tyrcho,

I had a short look into the code, but unfortunately Scala is not the language I normally work with. I understood what happens there, but can't say what could cause the cutoffs. One line (link) could be interesting to change, so all exceptions will be logged, for example in a debug mode. Then I could have an eye on the issue, it still occurs regularly at my (new setup) PC.

By the way: There seem to be already some debug logs, how can I enable them?

Hope your legend run goes well! :)