8000 feat: add player by ankit-v2-3 · Pull Request #2 · video-db/videodb-python · GitHub
[go: up one dir, main page]

Skip to content

feat: add player #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: fix typos
  • Loading branch information
ankit-v2-3 committed Dec 28, 2023
commit c860321e55a04c2bd81ba369d36753adcf36f0d7
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ collection = conn.get_collection()
# get the video from the collection
video = collection.get_video("video_id")

# index the video for symantic search
# index the video for semantic search
video.index_spoken_words()

# search relevant moment in video and stream resultant video clip instantly.
Expand Down
2 changes: 1 addition & 1 deletion videodb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging

from typing import Optional
from videodb._utils.video import play_hls
from videodb._utils._video import play_hls
from videodb._constants import VIDEO_DB_API
from videodb.client import Connection
from videodb.exceptions import (
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion videodb/search.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
from videodb._utils.video import play_hls
from videodb._utils._video import play_hls
from videodb._constants import (
SearchType,
ApiPath,
Expand Down
4 changes: 2 additions & 2 deletions videodb/shot.py
10000
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


from typing import Optional
from videodb._utils.video import play_hls
from videodb._utils._video import play_hls
from videodb._constants import (
ApiPath,
)
Expand Down Expand Up @@ -72,7 +72,7 @@ def generate_stream(self) -> str:
return self.stream_url

def play(self) -> str:
"""Generate a stream url for the shot and open it in the default browser
"""Generate a stream url for the shot and open it in the default browser/ notebook

:return: The stream url
:rtype: str
Expand Down
6 changes: 3 additions & 3 deletions videodb/video.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Optional
from videodb._utils.video import play_hls
from videodb._utils._video import play_hls
from videodb._constants import (
ApiPath,
SearchType,
Expand Down Expand Up @@ -114,7 +114,7 @@ def get_transcript_text(self, force: bool = False) -> str:
return self.transcript_text

def index_spoken_words(self) -> None:
"""Symantic indexing of spoken words in the video
"""Semantic indexing of spoken words in the video

:raises InvalidRequestError: If the video is already indexed
:return: None if the indexing is successful
Expand Down Expand Up @@ -182,4 +182,4 @@ def play(self) -> str:
:return: The stream url
:rtype: str
"""
return play_hls(self.player_url)
return play_hls(self.stream_url)
0