Motion Detection
Track and extract motion data for specific people from a video segment, outputting motion files ready to drive 3D characters. Supports person_ids to precisely target individuals in multi-person scenes.
Typical Application Scenarios
- Single-person motion capture: Extract motion directly from dance or sports videos.
- Multi-person precision tracking: Use pose detection to identify target person_ids, then run motion capture on specific individuals.
API Reference used on this page POST /videos/motion_detections
Basic Examples
bash
curl -X POST 'https://api.v2fun.ai/api/v1/videos/motion_detections' \
-H 'Authorization: Bearer $V2FUN_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input_video": "videos/example.mp4",
"start_time_seconds": 1.5,
"duration_seconds": 3
}'javascript
const response = await fetch('https://api.v2fun.ai/api/v1/videos/motion_detections', {
method: 'POST',
headers: {
'Authorization': 'Bearer $V2FUN_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input_video": "videos/example.mp4",
"start_time_seconds": 1.5,
"duration_seconds": 3
}),
});
const data = await response.json();python
import requests
resp = requests.post(
'https://api.v2fun.ai/api/v1/videos/motion_detections',
headers={
'Authorization': 'Bearer $V2FUN_API_KEY',
'Content-Type': 'application/json',
},
json={
"input_video": "videos/example.mp4",
"start_time_seconds": 1.5,
"duration_seconds": 3
},
)
print(resp.json())java
import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
String body = "{\"input_video\":\"videos/example.mp4\",\"start_time_seconds\":1.5,\"duration_seconds\":3}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.v2fun.ai/api/v1/videos/motion_detections"))
.header("Authorization", "Bearer $V2FUN_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Core Use Cases
Video Segment Motion Capture
Specify a video, start time, and duration. The system cuts the segment, tracks the people in it, and generates standardized motion data. Use person_ids to precisely target specific individuals in multi-person scenes.
bash
curl -X POST 'https://api.v2fun.ai/api/v1/videos/motion_detections' \
-H 'Authorization: Bearer $V2FUN_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input_video": "videos/example.mp4",
"start_time_seconds": 0,
"duration_seconds": 5
}'javascript
const response = await fetch('https://api.v2fun.ai/api/v1/videos/motion_detections', {
method: 'POST',
headers: {
'Authorization': 'Bearer $V2FUN_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input_video": "videos/example.mp4",
"start_time_seconds": 0,
"duration_seconds": 5
}),
});
const data = await response.json();python
import requests
resp = requests.post(
'https://api.v2fun.ai/api/v1/videos/motion_detections',
headers={
'Authorization': 'Bearer $V2FUN_API_KEY',
'Content-Type': 'application/json',
},
json={
"input_video": "videos/example.mp4",
"start_time_seconds": 0,
"duration_seconds": 5
},
)
print(resp.json())java
import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
String body = "{\"input_video\":\"videos/example.mp4\",\"start_time_seconds\":0,\"duration_seconds\":5}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.v2fun.ai/api/v1/videos/motion_detections"))
.header("Authorization", "Bearer $V2FUN_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Input Video
Output
