Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion video/beta/src/test/java/com/example/video/DetectIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public void testTrackObjects() throws Exception {

@Test
public void testTrackObjectsGcs() throws Exception {
VideoAnnotationResults result = TrackObjects.trackObjectsGcs("gs://demomaker/cat.mp4");
VideoAnnotationResults result = TrackObjects.trackObjectsGcs(
"gs://cloud-samples-data/video/cat.mp4");

boolean textExists = false;
for (ObjectTrackingAnnotation objectTrackingAnnotation : result.getObjectAnnotationsList()) {
Expand Down
8 changes: 4 additions & 4 deletions video/cloud-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ After you have authorized, you can analyze videos.

Detect Labels
```
mvn exec:java -DDetect -Dexec.args="labels gs://demomaker/cat.mp4"
mvn exec:java -DDetect -Dexec.args="labels gs://cloud-samples-data/video/cat.mp4"

mvn exec:java -DDetect -Dexec.args="labels-file ./resources/cat.mp4"
```

Detect Explicit content annotations
```
mvn exec:java -DDetect -Dexec.args="explicit-content gs://demomaker/gbikes_dinosaur.mp4"
mvn exec:java -DDetect -Dexec.args="explicit-content gs://cloud-samples-data/video/gbikes_dinosaur.mp4"
```

Detect Shots
```
mvn exec:java -DDetect -Dexec.args="shots gs://demomaker/gbikes_dinosaur.mp4"
mvn exec:java -DDetect -Dexec.args="shots gs://cloud-samples-data/video/gbikes_dinosaur.mp4"
```

Transcribe Speech
Expand All @@ -60,7 +60,7 @@ mvn exec:java -DDetect -Dexec.args="speech-transcription gs://python-docs-sample

From Windows, you may need to supply your classpath differently, for example:
```
mvn exec:java -DDetect -Dexec.args="labels gs://demomaker/cat.mp4"
mvn exec:java -DDetect -Dexec.args="labels gs://cloud-samples-data/video/cat.mp4"
```
or
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void main(String[] args) throws Exception {
// Instantiate a video intelligence client
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
// The Google Cloud Storage path to the video to annotate.
String gcsUri = "gs://demomaker/cat.mp4";
String gcsUri = "gs://cloud-samples-data/video/cat.mp4";

// Create an operation that will contain the response when the operation completes.
AnnotateVideoRequest request = AnnotateVideoRequest.newBuilder()
Expand Down
10 changes: 5 additions & 5 deletions video/cloud-client/src/test/java/com/example/video/DetectIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ public class DetectIT {
private ByteArrayOutputStream bout;
private PrintStream out;

static final String LABEL_GCS_LOCATION = "gs://demomaker/cat.mp4";
static final String LABEL_GCS_LOCATION = "gs://cloud-samples-data/video/cat.mp4";
static final String LABEL_FILE_LOCATION = "./resources/cat.mp4";
static final String SHOTS_FILE_LOCATION = "gs://demomaker/gbikes_dinosaur.mp4";
static final String EXPLICIT_CONTENT_LOCATION = "gs://demomaker/cat.mp4";
static final String SHOTS_FILE_LOCATION = "gs://cloud-samples-data/video/gbikes_dinosaur.mp4";
static final String EXPLICIT_CONTENT_LOCATION = "gs://cloud-samples-data/video/cat.mp4";
static final String SPEECH_GCS_LOCATION =
"gs://java-docs-samples-testing/video/googlework_short.mp4";
private static final List<String> POSSIBLE_TEXTS = Arrays.asList(
Expand Down Expand Up @@ -106,7 +106,7 @@ public void testSpeechTranscription() throws Exception {

@Test
public void testTrackObjects() throws Exception {
VideoAnnotationResults result = TrackObjects.trackObjects("resources/cat.mp4");
VideoAnnotationResults result = TrackObjects.trackObjects(LABEL_FILE_LOCATION);

boolean textExists = false;
for (ObjectTrackingAnnotation objectTrackingAnnotation : result.getObjectAnnotationsList()) {
Expand All @@ -121,7 +121,7 @@ public void testTrackObjects() throws Exception {

@Test
public void testTrackObjectsGcs() throws Exception {
VideoAnnotationResults result = TrackObjects.trackObjectsGcs("gs://demomaker/cat.mp4");
VideoAnnotationResults result = TrackObjects.trackObjectsGcs(LABEL_GCS_LOCATION);

boolean textExists = false;
for (ObjectTrackingAnnotation objectTrackingAnnotation : result.getObjectAnnotationsList()) {
Expand Down