From 26637ca68e677d1980d004aa514500ad8651f521 Mon Sep 17 00:00:00 2001 From: caitlinwheeless Date: Mon, 3 Mar 2025 12:05:10 -0600 Subject: [PATCH 1/8] docs: Add context to Video tag page --- .../editor/src/tags/object/Video/Video.js | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/web/libs/editor/src/tags/object/Video/Video.js b/web/libs/editor/src/tags/object/Video/Video.js index c0c3586dd81b..585d89b68dbb 100644 --- a/web/libs/editor/src/tags/object/Video/Video.js +++ b/web/libs/editor/src/tags/object/Video/Video.js @@ -11,7 +11,30 @@ import ObjectBase from "../Base"; /** * Video tag plays a simple video file. Use for video annotation tasks such as classification and transcription. - * + * Label Studio relies on your web browser to play videos, so it's essential that your videos use a format and codecs that are universally supported. To ensure maximum compatibility, we recommend using an MP4 container with video encoded using the H.264 (AVC) codec and audio encoded with AAC. This combination is widely supported across all modern browsers and minimizes issues like incorrect total duration detection or problems with playback. In addition, it's important to convert your videos to a constant frame rate (CFR), ideally around 30 fps, to avoid discrepancies in frame counts and issues with duplicated or missing frames. + * + * Converting your videos to this recommended format will help ensure that they play smoothly in Label Studio and that the frame rate and duration are correctly recognized for accurate annotations. To convert any video to this format, you can use FFmpeg. For example, the following command converts an input video to MP4 with H.264 video, AAC audio, and a constant frame rate of 30 fps: + * + * ```bash + * ffmpeg -i input_video.mp4 -c:v libx264 -profile:v high -level 4.0 -pix_fmt yuv420p -r 30 -c:a aac -b:a 128k output_video.mp4 + * ``` + * + * In this command: + * - `-i input_video.mp4` specifies your source video. + * - `-c:v libx264` uses the H.264 codec for video encoding. + * - `-profile:v high -level 4.0` sets compatibility parameters for a broad range of devices. + * - `-pix_fmt yuv420p` ensures the pixel format is compatible with most browsers. + * - `-r 30` forces a constant frame rate of 30 fps. You can also omit the -r option, ffmpeg will save your current frame rate. This is fine if you are 100% certain that your video has a constant frame rate. + * - `-c:a aac -b:a 128k` encodes the audio in AAC at 128 kbps. + * - `output_video.mp4` is the converted video file ready for use in Label Studio. + * + * Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. + * + * It is a good idea to check all parameters of your video using this command: + * ```bash + * ffprobe -v error -show_format -show_streams -print_format json input.mp4 + * ``` + * * Use with the following data types: video * @example * From 3011dad84d51c1ad864db213134ad95c1f00fd82 Mon Sep 17 00:00:00 2001 From: robot-ci-heartex Date: Mon, 3 Mar 2025 18:08:16 +0000 Subject: [PATCH 2/8] ci: Build frontend Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/13637403926 --- docs/source/tags/video.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/source/tags/video.md b/docs/source/tags/video.md index 0fb55a6de114..d8549e3e0696 100644 --- a/docs/source/tags/video.md +++ b/docs/source/tags/video.md @@ -7,6 +7,29 @@ meta_description: Customize Label Studio with the Video tag for basic video anno --- Video tag plays a simple video file. Use for video annotation tasks such as classification and transcription. +Label Studio relies on your web browser to play videos, so it's essential that your videos use a format and codecs that are universally supported. To ensure maximum compatibility, we recommend using an MP4 container with video encoded using the H.264 (AVC) codec and audio encoded with AAC. This combination is widely supported across all modern browsers and minimizes issues like incorrect total duration detection or problems with playback. In addition, it's important to convert your videos to a constant frame rate (CFR), ideally around 30 fps, to avoid discrepancies in frame counts and issues with duplicated or missing frames. + +Converting your videos to this recommended format will help ensure that they play smoothly in Label Studio and that the frame rate and duration are correctly recognized for accurate annotations. To convert any video to this format, you can use FFmpeg. For example, the following command converts an input video to MP4 with H.264 video, AAC audio, and a constant frame rate of 30 fps: + +```bash +ffmpeg -i input_video.mp4 -c:v libx264 -profile:v high -level 4.0 -pix_fmt yuv420p -r 30 -c:a aac -b:a 128k output_video.mp4 +``` + +In this command: +- `-i input_video.mp4` specifies your source video. +- `-c:v libx264` uses the H.264 codec for video encoding. +- `-profile:v high -level 4.0` sets compatibility parameters for a broad range of devices. +- `-pix_fmt yuv420p` ensures the pixel format is compatible with most browsers. +- `-r 30` forces a constant frame rate of 30 fps. You can also omit the -r option, ffmpeg will save your current frame rate. This is fine if you are 100% certain that your video has a constant frame rate. +- `-c:a aac -b:a 128k` encodes the audio in AAC at 128 kbps. +- `output_video.mp4` is the converted video file ready for use in Label Studio. + +Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. + +It is a good idea to check all parameters of your video using this command: +```bash +ffprobe -v error -show_format -show_streams -print_format json input.mp4 +``` Use with the following data types: video From 87afdd5e220e56f1bf07c7feac2b80634c234168 Mon Sep 17 00:00:00 2001 From: caitlinwheeless Date: Mon, 3 Mar 2025 14:13:26 -0600 Subject: [PATCH 3/8] Formatting --- web/libs/editor/src/tags/object/Video/Video.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/libs/editor/src/tags/object/Video/Video.js b/web/libs/editor/src/tags/object/Video/Video.js index 585d89b68dbb..1dd1fd2f220d 100644 --- a/web/libs/editor/src/tags/object/Video/Video.js +++ b/web/libs/editor/src/tags/object/Video/Video.js @@ -11,6 +11,11 @@ import ObjectBase from "../Base"; /** * Video tag plays a simple video file. Use for video annotation tasks such as classification and transcription. + * + * Use with the following data types: video + * + * ### Video format + * * Label Studio relies on your web browser to play videos, so it's essential that your videos use a format and codecs that are universally supported. To ensure maximum compatibility, we recommend using an MP4 container with video encoded using the H.264 (AVC) codec and audio encoded with AAC. This combination is widely supported across all modern browsers and minimizes issues like incorrect total duration detection or problems with playback. In addition, it's important to convert your videos to a constant frame rate (CFR), ideally around 30 fps, to avoid discrepancies in frame counts and issues with duplicated or missing frames. * * Converting your videos to this recommended format will help ensure that they play smoothly in Label Studio and that the frame rate and duration are correctly recognized for accurate annotations. To convert any video to this format, you can use FFmpeg. For example, the following command converts an input video to MP4 with H.264 video, AAC audio, and a constant frame rate of 30 fps: @@ -35,7 +40,6 @@ import ObjectBase from "../Base"; * ffprobe -v error -show_format -show_streams -print_format json input.mp4 * ``` * - * Use with the following data types: video * @example * * From 5828ead45997c0b7689f4b643166e2090b96ad41 Mon Sep 17 00:00:00 2001 From: robot-ci-heartex Date: Mon, 3 Mar 2025 20:15:25 +0000 Subject: [PATCH 4/8] ci: Build frontend Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/13639573864 --- docs/source/tags/video.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/source/tags/video.md b/docs/source/tags/video.md index d8549e3e0696..6b528fa424fb 100644 --- a/docs/source/tags/video.md +++ b/docs/source/tags/video.md @@ -7,6 +7,11 @@ meta_description: Customize Label Studio with the Video tag for basic video anno --- Video tag plays a simple video file. Use for video annotation tasks such as classification and transcription. + +Use with the following data types: video + +### Video format + Label Studio relies on your web browser to play videos, so it's essential that your videos use a format and codecs that are universally supported. To ensure maximum compatibility, we recommend using an MP4 container with video encoded using the H.264 (AVC) codec and audio encoded with AAC. This combination is widely supported across all modern browsers and minimizes issues like incorrect total duration detection or problems with playback. In addition, it's important to convert your videos to a constant frame rate (CFR), ideally around 30 fps, to avoid discrepancies in frame counts and issues with duplicated or missing frames. Converting your videos to this recommended format will help ensure that they play smoothly in Label Studio and that the frame rate and duration are correctly recognized for accurate annotations. To convert any video to this format, you can use FFmpeg. For example, the following command converts an input video to MP4 with H.264 video, AAC audio, and a constant frame rate of 30 fps: @@ -31,8 +36,6 @@ It is a good idea to check all parameters of your video using this command: ffprobe -v error -show_format -show_streams -print_format json input.mp4 ``` -Use with the following data types: video - ### Parameters | Param | Type | Default | Description | From 951b1e398ffc0669fe2122c9b50e1a04f092a439 Mon Sep 17 00:00:00 2001 From: caitlinwheeless Date: Mon, 3 Mar 2025 14:37:39 -0600 Subject: [PATCH 5/8] removing trailing space --- web/libs/editor/src/tags/object/Video/Video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/libs/editor/src/tags/object/Video/Video.js b/web/libs/editor/src/tags/object/Video/Video.js index 1dd1fd2f220d..d0823208f80a 100644 --- a/web/libs/editor/src/tags/object/Video/Video.js +++ b/web/libs/editor/src/tags/object/Video/Video.js @@ -33,7 +33,7 @@ import ObjectBase from "../Base"; * - `-c:a aac -b:a 128k` encodes the audio in AAC at 128 kbps. * - `output_video.mp4` is the converted video file ready for use in Label Studio. * - * Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. + * Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. * * It is a good idea to check all parameters of your video using this command: * ```bash From e839a02e7b17d7735d6066b970c472af74bb6564 Mon Sep 17 00:00:00 2001 From: robot-ci-heartex Date: Mon, 3 Mar 2025 20:40:05 +0000 Subject: [PATCH 6/8] ci: Build frontend Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/13639959918 --- docs/source/tags/video.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/tags/video.md b/docs/source/tags/video.md index 6b528fa424fb..00a7e387806d 100644 --- a/docs/source/tags/video.md +++ b/docs/source/tags/video.md @@ -29,7 +29,7 @@ In this command: - `-c:a aac -b:a 128k` encodes the audio in AAC at 128 kbps. - `output_video.mp4` is the converted video file ready for use in Label Studio. -Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. +Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. It is a good idea to check all parameters of your video using this command: ```bash From 2912e268fa413b8653e6dff90219f7c2cd8ff31a Mon Sep 17 00:00:00 2001 From: caitlinwheeless Date: Mon, 3 Mar 2025 14:52:45 -0600 Subject: [PATCH 7/8] removing trailing space --- web/libs/editor/src/tags/object/Video/Video.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/web/libs/editor/src/tags/object/Video/Video.js b/web/libs/editor/src/tags/object/Video/Video.js index d0823208f80a..6fed75b33def 100644 --- a/web/libs/editor/src/tags/object/Video/Video.js +++ b/web/libs/editor/src/tags/object/Video/Video.js @@ -11,19 +11,19 @@ import ObjectBase from "../Base"; /** * Video tag plays a simple video file. Use for video annotation tasks such as classification and transcription. - * + * * Use with the following data types: video - * + * * ### Video format - * + * * Label Studio relies on your web browser to play videos, so it's essential that your videos use a format and codecs that are universally supported. To ensure maximum compatibility, we recommend using an MP4 container with video encoded using the H.264 (AVC) codec and audio encoded with AAC. This combination is widely supported across all modern browsers and minimizes issues like incorrect total duration detection or problems with playback. In addition, it's important to convert your videos to a constant frame rate (CFR), ideally around 30 fps, to avoid discrepancies in frame counts and issues with duplicated or missing frames. - * + * * Converting your videos to this recommended format will help ensure that they play smoothly in Label Studio and that the frame rate and duration are correctly recognized for accurate annotations. To convert any video to this format, you can use FFmpeg. For example, the following command converts an input video to MP4 with H.264 video, AAC audio, and a constant frame rate of 30 fps: - * + * * ```bash * ffmpeg -i input_video.mp4 -c:v libx264 -profile:v high -level 4.0 -pix_fmt yuv420p -r 30 -c:a aac -b:a 128k output_video.mp4 * ``` - * + * * In this command: * - `-i input_video.mp4` specifies your source video. * - `-c:v libx264` uses the H.264 codec for video encoding. @@ -32,14 +32,14 @@ import ObjectBase from "../Base"; * - `-r 30` forces a constant frame rate of 30 fps. You can also omit the -r option, ffmpeg will save your current frame rate. This is fine if you are 100% certain that your video has a constant frame rate. * - `-c:a aac -b:a 128k` encodes the audio in AAC at 128 kbps. * - `output_video.mp4` is the converted video file ready for use in Label Studio. - * + * * Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. - * + * * It is a good idea to check all parameters of your video using this command: * ```bash * ffprobe -v error -show_format -show_streams -print_format json input.mp4 * ``` - * + * * @example * * From c30487cc7c24d7ab82574fce9f1662d44cce6e55 Mon Sep 17 00:00:00 2001 From: robot-ci-heartex Date: Mon, 3 Mar 2025 20:55:06 +0000 Subject: [PATCH 8/8] ci: Build frontend Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/13640193454 --- docs/source/tags/video.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/tags/video.md b/docs/source/tags/video.md index 00a7e387806d..376f3dc99f0e 100644 --- a/docs/source/tags/video.md +++ b/docs/source/tags/video.md @@ -28,7 +28,7 @@ In this command: - `-r 30` forces a constant frame rate of 30 fps. You can also omit the -r option, ffmpeg will save your current frame rate. This is fine if you are 100% certain that your video has a constant frame rate. - `-c:a aac -b:a 128k` encodes the audio in AAC at 128 kbps. - `output_video.mp4` is the converted video file ready for use in Label Studio. - + Using this FFmpeg command to re-encode your videos will help eliminate playback issues and ensure that Label Studio detects the total video duration accurately, providing a smooth annotation experience. It is a good idea to check all parameters of your video using this command: