Help with (some) video thumbs not auto-generating

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
midripps Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 0
Post: #1
Hi, new here, so apologies if I am off topic, or in the wrong place.

I'm investigating a problem where thumbs are not auto-generated for videos captured on my iPhone (where thumbs are auto-generated fine for videos from my video camera).

I've traced the difference in behaviour down to DVDFileInfo::ExtractThumb which reads 40 x the number of streams worth of packets (frames the comment says), so 80 packets in the case of these files with one video and one audio stream:

Code:
// num streams * 40 frames, should get a valid frame, if not abort.
int abort_index = pDemuxer->GetNrOfStreams() * 40;

I've found for these iPhone captured mov files, the limit of 40 frames is not enough. I changed this limit in my working dir to 400 and logged what was actually needed and found it took between 89 and 106 frames (for these particular files).

So, before proceeding further, I am wondering:
1. Where did this limit of 40 frames come from and why is it 40? (I saw a post on a different problem mention that thumb generation used to be synchronous so maybe that was why it was necessary to have such a limit).
2. Is it necessary to have any limit given that the existing code will abort if it hits an error?

Any help or guidance would be greatly appreciated.

Thanks
find quote
midripps Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 0
Post: #2
Hi, no response here, I guess I must be doing something wrong.

Should I go ahead and create a ticket in Trac? I have a patch of my changes that extend the logging and increases this constant, but I am not sure if I should attach the patch to the ticket or create a pull request, or both?
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 7,677
Joined: Feb 2011
Reputation: 91
Location: germany
Post: #3
Sry saw this now. I already stumbled about it when implementing the orientation bits from iPhone mov files. I just saw that the decode failed. Nice that you have tracked it down. So on your side you get thumb extraction working with increased number of "frames"? Thats pretty cool then.

Best for discussion is a pull request. So if you would be so kind to post a PR i bet the right devs would jump in (or atleast i will comment on it, but am just not the right person to know anything about it).

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
midripps Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 0
Post: #4
Thanks for the reply, I'll look into making the pull request and go from there.
find quote