amiaopensource / amiaopensource/ffmprovisr

Inserting timecode into video/ Outputting filename with timecode as filename.

オープン
#461 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
HTML
スター
581
フォーク
74
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi, I recently tried to export one image every ten seconds of a video, outputting files named image-00:00:10:00.jpg image-00:00:20:00.jpg , image-00:00:30:00.jpg , etc. Your formula explains how to export an image from a video, or to create a burnt in timecode on your image. But the problem is: a) when you want every 10-second capture to have the timecode inserted into the name of the filename itself and b) when you do not want to create a burnt in timecode FOR ALL IMAGES being output, but just for the ones exported every X seconds. In my case I want to have any of those solutions, that is, having filenames labeled as timecode position or having images with the timestamp inserted into the image itself. The best solution I came up with is the following:
$ ffmpeg -i myvideo.mp4 -r 0.1 -vf "drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf:fontsize=35:timecode='00\:00\:00\:00':r=25: x=(w-tw)/2:y=h-(2*lh):fontcolor=white:box=1:boxcolor=0x00000000@1" image-%03d.png

I noticed it is quite precise, but you have to adjust the frame rate for EACH VIDEO inside the filter argument. And I haven't found a solution for, instead of printing the timecode into the image, just labeling the filename with it. I just wanted to share this scenario, in case someone encounters the same issue in the future, and in case someone can help me with the second option, that is, labeling a file just with a timecode, without it being stamped inside.

This is very useful when you have hundreds of tapes digitized "in toto", and want to make a quick index of them, without using contact sheets and using a program like Xnview to browse the albums and zoom in into a more quality picture.

Best regards, and thanks for publishing these great guides!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。