Skip to content

Commit 99f6c6f

Browse files
committed
docs: update doc
1 parent 2d4f74e commit 99f6c6f

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

DPF/transforms/video_ffmpeg_transforms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ def _process_filepath(self, data: TransformsFileData) -> TransformsFileData:
137137
args_start_str = ' '.join(ffmpeg_args_start)
138138
temp_filename = str(uuid.uuid4()) + '.' + ext
139139
ffmpeg_command = f'ffmpeg -hide_banner {args_start_str} -i {filepath} {args_str} {self.default_args} {temp_filename} -y'
140-
print(ffmpeg_command)
141140
subprocess.run(ffmpeg_command, shell=True, capture_output=True, check=True)
142141
shutil.move(temp_filename, filepath)
143142

docs/transforms.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,19 @@ transforms = VideoFFMPEGTransforms(
3838
workers=8
3939
)
4040
processor.apply_transform(transforms)
41+
```
42+
43+
Fast video cutting:
44+
_cut_start_ and _cut_duration_ columns should have values in seconds.
45+
For example, cutting video from 7 to 11 second should be specified in dataframe as: _cut_start_ = 7, _cut_duration_ = 4
46+
```python
47+
from DPF.transforms import VideoFFMPEGTransforms
48+
49+
transforms = VideoFFMPEGTransforms(
50+
cut_start_col='cut_start',
51+
cut_duration_col='cut_duration',
52+
copy_stream=True,
53+
workers=4,
54+
)
55+
processor.apply_transform(transforms)
4156
```

0 commit comments

Comments
 (0)