feat: add ffmpeg
parent
0c02329e13
commit
a18ee76013
|
@ -412,30 +412,30 @@ rsync -avzP src/ dst</pre>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="markdown-heading">
|
<div class="markdown-heading">
|
||||||
<h2 class="heading-element">
|
<h2 class="heading-element">
|
||||||
<a href="https://github.com/ayoisaiah/f2">F2</a>
|
<a href="https://github.com/FFmpeg/FFmpeg">ffmpeg</a>
|
||||||
</h2>
|
</h2>
|
||||||
<a
|
<a
|
||||||
id="user-content-f2"
|
id="user-content-ffmpeg"
|
||||||
class="anchor"
|
class="anchor"
|
||||||
aria-label="Permalink: F2"
|
aria-label="Permalink: ffmpeg"
|
||||||
href="#f2"
|
href="#ffmpeg"
|
||||||
><span aria-hidden="true" class="octicon octicon-link"></span
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
||||||
></a>
|
></a>
|
||||||
</div>
|
</div>
|
||||||
<p>Rename:</p>
|
|
||||||
<div class="highlight highlight-source-shell">
|
<div class="highlight highlight-source-shell">
|
||||||
<pre><span class="pl-c"><span class="pl-c">#</span> If dry run, remove --exec</span>
|
<pre><span class="pl-c"><span class="pl-c">#</span> -crf: quality, 0 is lossless, more is lower quality</span>
|
||||||
f2 --replace <span class="pl-s"><span class="pl-pds">"</span>{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{hash.md5}{ext}<span class="pl-pds">"</span></span> --exec
|
<span class="pl-c"><span class="pl-c">#</span> -an: no audio </span>
|
||||||
|
<span class="pl-c"><span class="pl-c">#</span> -c:a aac -b:a 128k: audio codec and bitrate</span>
|
||||||
<span class="pl-c"><span class="pl-c">#</span> Include ImageSize (require exiftool)</span>
|
ffmpeg -i input -c:v libx265 -crf 26 -preset fast -an output.mp4</pre>
|
||||||
f2 --replace <span class="pl-s"><span class="pl-pds">"</span>{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}_{hash.md5}{ext}<span class="pl-pds">"</span></span> --exec
|
|
||||||
|
|
||||||
<span class="pl-c"><span class="pl-c">#</span> Not include time</span>
|
|
||||||
f2 --exclude=<span class="pl-s"><span class="pl-pds">"</span>\d+x\d+_[a-z\d]{32}<span class="pl-pds">"</span></span> --sort=mtime --replace <span class="pl-s"><span class="pl-pds">"</span>{xt.ImageSize}_{hash.md5}{ext}<span class="pl-pds">"</span></span> --exec
|
|
||||||
|
|
||||||
<span class="pl-c"><span class="pl-c">#</span> Remove space in directory</span>
|
|
||||||
f2 --find <span class="pl-s"><span class="pl-pds">"</span> <span class="pl-pds">"</span></span> --replace <span class="pl-s"><span class="pl-pds">"</span>_<span class="pl-pds">"</span></span> --string-mode --only-dir --exec</pre>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p>Links:</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="https://trac.ffmpeg.org/wiki/Encode/H.265" rel="nofollow"
|
||||||
|
>H.265/HEVC Video Encoding Guide</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<div class="markdown-heading">
|
<div class="markdown-heading">
|
||||||
<h2 class="heading-element">
|
<h2 class="heading-element">
|
||||||
<a href="https://github.com/libvips/libvips">libvips</a>
|
<a href="https://github.com/libvips/libvips">libvips</a>
|
||||||
|
@ -480,6 +480,32 @@ vips rot filename.jxl new_filename.jxl d90</pre>
|
||||||
<div class="highlight highlight-source-shell">
|
<div class="highlight highlight-source-shell">
|
||||||
<pre>yt-dlp -f - <span class="pl-s"><span class="pl-pds">"</span>https://www.youtube.com/watch?v=video_id<span class="pl-pds">"</span></span></pre>
|
<pre>yt-dlp -f - <span class="pl-s"><span class="pl-pds">"</span>https://www.youtube.com/watch?v=video_id<span class="pl-pds">"</span></span></pre>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="markdown-heading">
|
||||||
|
<h2 class="heading-element">
|
||||||
|
<a href="https://github.com/ayoisaiah/f2">F2</a>
|
||||||
|
</h2>
|
||||||
|
<a
|
||||||
|
id="user-content-f2"
|
||||||
|
class="anchor"
|
||||||
|
aria-label="Permalink: F2"
|
||||||
|
href="#f2"
|
||||||
|
><span aria-hidden="true" class="octicon octicon-link"></span
|
||||||
|
></a>
|
||||||
|
</div>
|
||||||
|
<p>Rename:</p>
|
||||||
|
<div class="highlight highlight-source-shell">
|
||||||
|
<pre><span class="pl-c"><span class="pl-c">#</span> If dry run, remove --exec</span>
|
||||||
|
f2 --replace <span class="pl-s"><span class="pl-pds">"</span>{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{hash.md5}{ext}<span class="pl-pds">"</span></span> --exec
|
||||||
|
|
||||||
|
<span class="pl-c"><span class="pl-c">#</span> Include ImageSize (require exiftool)</span>
|
||||||
|
f2 --replace <span class="pl-s"><span class="pl-pds">"</span>{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}_{hash.md5}{ext}<span class="pl-pds">"</span></span> --exec
|
||||||
|
|
||||||
|
<span class="pl-c"><span class="pl-c">#</span> Not include time</span>
|
||||||
|
f2 --exclude=<span class="pl-s"><span class="pl-pds">"</span>\d+x\d+_[a-z\d]{32}<span class="pl-pds">"</span></span> --sort=mtime --replace <span class="pl-s"><span class="pl-pds">"</span>{xt.ImageSize}_{hash.md5}{ext}<span class="pl-pds">"</span></span> --exec
|
||||||
|
|
||||||
|
<span class="pl-c"><span class="pl-c">#</span> Remove space in directory</span>
|
||||||
|
f2 --find <span class="pl-s"><span class="pl-pds">"</span> <span class="pl-pds">"</span></span> --replace <span class="pl-s"><span class="pl-pds">"</span>_<span class="pl-pds">"</span></span> --string-mode --only-dir --exec</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
Feel free to ask me via
|
Feel free to ask me via
|
||||||
|
|
|
@ -296,24 +296,19 @@ Be careful flags (need dry run if not sure):
|
||||||
- `--delete`: delete files in **dst** if not exist in **src**, useful to sync
|
- `--delete`: delete files in **dst** if not exist in **src**, useful to sync
|
||||||
dst with src
|
dst with src
|
||||||
|
|
||||||
## [F2](https://github.com/ayoisaiah/f2)
|
## [ffmpeg](https://github.com/FFmpeg/FFmpeg)
|
||||||
|
|
||||||
Rename:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# If dry run, remove --exec
|
# -crf: quality, 0 is lossless, more is lower quality
|
||||||
f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{hash.md5}{ext}" --exec
|
# -an: no audio
|
||||||
|
# -c:a aac -b:a 128k: audio codec and bitrate
|
||||||
# Include ImageSize (require exiftool)
|
ffmpeg -i input -c:v libx265 -crf 26 -preset fast -an output.mp4
|
||||||
f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}_{hash.md5}{ext}" --exec
|
|
||||||
|
|
||||||
# Not include time
|
|
||||||
f2 --exclude="\d+x\d+_[a-z\d]{32}" --sort=mtime --replace "{xt.ImageSize}_{hash.md5}{ext}" --exec
|
|
||||||
|
|
||||||
# Remove space in directory
|
|
||||||
f2 --find " " --replace "_" --string-mode --only-dir --exec
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Links:
|
||||||
|
|
||||||
|
- [H.265/HEVC Video Encoding Guide](https://trac.ffmpeg.org/wiki/Encode/H.265)
|
||||||
|
|
||||||
## [libvips](https://github.com/libvips/libvips)
|
## [libvips](https://github.com/libvips/libvips)
|
||||||
|
|
||||||
Convert:
|
Convert:
|
||||||
|
@ -341,3 +336,21 @@ Download:
|
||||||
```sh
|
```sh
|
||||||
yt-dlp -f - "https://www.youtube.com/watch?v=video_id"
|
yt-dlp -f - "https://www.youtube.com/watch?v=video_id"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## [F2](https://github.com/ayoisaiah/f2)
|
||||||
|
|
||||||
|
Rename:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# If dry run, remove --exec
|
||||||
|
f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{hash.md5}{ext}" --exec
|
||||||
|
|
||||||
|
# Include ImageSize (require exiftool)
|
||||||
|
f2 --replace "{mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}_{hash.md5}{ext}" --exec
|
||||||
|
|
||||||
|
# Not include time
|
||||||
|
f2 --exclude="\d+x\d+_[a-z\d]{32}" --sort=mtime --replace "{xt.ImageSize}_{hash.md5}{ext}" --exec
|
||||||
|
|
||||||
|
# Remove space in directory
|
||||||
|
f2 --find " " --replace "_" --string-mode --only-dir --exec
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue