results = video.search("introduction to the topic")# Get all shotsshots = results.get_shots()# Access first resultfirst_shot = shots[0]print(f"Starts at: {first_shot.start}")print(f"Ends at: {first_shot.end}")print(f"Content: {first_shot.text}")print(f"Relevance: {first_shot.search_score}")
# Generate stream from specific time rangestimestamps = [ (10.5, 25.0), # First segment (45.0, 60.0), # Second segment (120.0, 135.5) # Third segment]stream_url = video.generate_stream(timestamps)
results = video.search("key moments")# Get as list of tuplestimestamps = [(shot.start, shot.end) for shot in results.get_shots()]# [(5.2, 15.0), (45.5, 52.3), (120.0, 145.8)]
results = video.search("important moments")# Get high-confidence results onlyshots = results.get_shots()high_confidence = [s for s in shots if s.search_score > 0.5]
results = video.search("long segments")# Get segments longer than 10 secondsshots = results.get_shots()long_segments = [s for s in shots if (s.end - s.start) > 10]