Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gumball12/public-timer-mp4
public timer.mp4
https://github.com/gumball12/public-timer-mp4
ffmpeg mp4 public-video timer-video video
Last synced: 2 days ago
JSON representation
public timer.mp4
- Host: GitHub
- URL: https://github.com/gumball12/public-timer-mp4
- Owner: Gumball12
- License: unlicense
- Created: 2024-05-28T19:52:55.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-28T20:02:14.000Z (6 months ago)
- Last Synced: 2024-05-29T10:46:09.752Z (6 months ago)
- Topics: ffmpeg, mp4, public-video, timer-video, video
- Homepage:
- Size: 225 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Public timer.mp4
```bash
ffmpeg -f lavfi -i color=color=white:size=1280x720:rate=10 -vf \
"drawtext=fontsize=100:fontcolor=black:x=(w-text_w)/2:y=(h-text_h)/2:text='%{eif\:t*10\:d}'" \
-t 60 timer.mp4
```This command generates a video with a white background and a timer that increments by 1 every 0.1 seconds. The video duration is 60 seconds, and the timer numbers are displayed prominently in the center of the video.
- `-f lavfi -i color=color=white:size=1280x720:rate=10`: Creates a 1280x720 video with a white background at 10 frames per second (fps).
- `-vf "drawtext=fontsize=100:fontcolor=black:x=(w-text_w)/2:y=(h-text_h)/2:text='%{eif\:t*10\:d}'"`: Uses the drawtext filter to display text. The text is a number that increases by 1 every 0.1 seconds. The text is centered in the video with a font size of 100 and black color.
- `-t 60`: Sets the video duration to 60 seconds.
- `timer.mp4`: The name of the output video file.By running this command, you will get a 60-second video where the number displayed increases by 1 every 0.1 seconds, resulting in the number "10" appearing exactly at the 1-second mark, "20" at the 2-second mark, and so on until "600" at the 60-second mark.
This video file can be used in HTML as shown below:
```html
```
By embedding the video in this way, you can display the timer video on a webpage, complete with video controls for play, pause, and volume adjustments.