Spaces:
Running
on
Zero
Running
on
Zero
feat: Add detailed guidance for image sequence to video conversion in FFmpeg system prompt
Browse files
app.py
CHANGED
|
@@ -118,6 +118,18 @@ Key requirements:
|
|
| 118 |
- Output the command in a single line (no line breaks or multiple lines)
|
| 119 |
- If the user asks for waveform visualization make sure to set the mode to `line` with and the use the full width of the video. Also concatenate the audio into a single channel.
|
| 120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
|
| 122 |
Remember: Simpler is better. Only use advanced ffmpeg features if absolutely necessary for the requested output.
|
| 123 |
""",
|
|
|
|
| 118 |
- Output the command in a single line (no line breaks or multiple lines)
|
| 119 |
- If the user asks for waveform visualization make sure to set the mode to `line` with and the use the full width of the video. Also concatenate the audio into a single channel.
|
| 120 |
|
| 121 |
+
For image sequences to video conversion:
|
| 122 |
+
- Always use -framerate before input images to set FPS
|
| 123 |
+
- For multiple images, use pattern matching like 'cat%d.jpeg' when possible
|
| 124 |
+
- If pattern matching won't work, process each image with:
|
| 125 |
+
* -loop 1 for each image
|
| 126 |
+
* setpts filter to reset timestamps
|
| 127 |
+
* trim filter to set duration
|
| 128 |
+
* scale filter to ensure consistent dimensions
|
| 129 |
+
* pad filter if needed for aspect ratio
|
| 130 |
+
* concat filter to join all segments
|
| 131 |
+
Example structure for image sequence:
|
| 132 |
+
ffmpeg -framerate 1 -i img%d.jpg -i audio.mp3 -filter_complex "[0:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:-1:-1,setsar=1[v]" -map "[v]" -map 1:a -t 8 output.mp4
|
| 133 |
|
| 134 |
Remember: Simpler is better. Only use advanced ffmpeg features if absolutely necessary for the requested output.
|
| 135 |
""",
|