pages*: update outdated pages (#11821)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: Juri Dispan <juri.dispan@posteo.net> Co-authored-by: Isaac Vicente <isaacvicentsocial@gmail.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
- Syntax highlight a JSON file:
|
||||
|
||||
`bat --language json {{file.json}}`
|
||||
`bat --language json {{path/to/file.json}}`
|
||||
|
||||
- Display all supported languages:
|
||||
|
||||
|
@@ -28,9 +28,9 @@
|
||||
|
||||
`curl --data {{'{"name":"bob"}'}} --header {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
||||
|
||||
- Pass a username and password for server authentication:
|
||||
- Pass a username and prompt for a password to authenticate to the server:
|
||||
|
||||
`curl --user myusername:mypassword {{http://example.com}}`
|
||||
`curl --user {{username}} {{http://example.com}}`
|
||||
|
||||
- Pass client certificate and key for a resource, skipping certificate validation:
|
||||
|
||||
|
@@ -5,32 +5,32 @@
|
||||
|
||||
- Extract the sound from a video and save it as MP3:
|
||||
|
||||
`ffmpeg -i {{video.mp4}} -vn {{sound}}.mp3`
|
||||
`ffmpeg -i {{path/to/video.mp4}} -vn {{path/to/sound}}.mp3`
|
||||
|
||||
- Save a video as GIF, scaling the height to 1000px and setting framerate to 15:
|
||||
|
||||
`ffmpeg -i {{video.mp4}} -vf 'scale=-1:{{1000}}' -r {{15}} {{output.gif}}`
|
||||
`ffmpeg -i {{path/to/video.mp4}} -vf 'scale=-1:{{1000}}' -r {{15}} {{path/to/output.gif}}`
|
||||
|
||||
- Combine numbered images (`frame_1.jpg`, `frame_2.jpg`, etc) into a video or GIF:
|
||||
|
||||
`ffmpeg -i {{frame_%d.jpg}} -f image2 {{video.mpg|video.gif}}`
|
||||
`ffmpeg -i {{path/to/frame_%d.jpg}} -f image2 {{video.mpg|video.gif}}`
|
||||
|
||||
- Quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image:
|
||||
|
||||
`ffmpeg -ss {{mm:ss}} -i {{video.mp4}} -frames 1 -s {{128x128}} -f image2 {{image.png}}`
|
||||
`ffmpeg -ss {{mm:ss}} -i {{path/to/video.mp4}} -frames 1 -s {{128x128}} -f image2 {{path/to/image.png}}`
|
||||
|
||||
- Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end):
|
||||
|
||||
`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{video.mp4}} -codec copy {{output.mp4}}`
|
||||
`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{path/to/video.mp4}} -codec copy {{path/to/output.mp4}}`
|
||||
|
||||
- Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23:
|
||||
|
||||
`ffmpeg -i {{input_video}}.avi -codec:a aac -b:a 128k -codec:v libx264 -crf 23 {{output_video}}.mp4`
|
||||
`ffmpeg -i {{path/to/input_video}}.avi -codec:a aac -b:a 128k -codec:v libx264 -crf 23 {{path/to/output_video}}.mp4`
|
||||
|
||||
- Remux MKV video to MP4 without re-encoding audio or video streams:
|
||||
|
||||
`ffmpeg -i {{input_video}}.mkv -codec copy {{output_video}}.mp4`
|
||||
`ffmpeg -i {{path/to/input_video}}.mkv -codec copy {{path/to/output_video}}.mp4`
|
||||
|
||||
- Convert MP4 video to VP9 codec. For the best quality, use a CRF value (recommended range 15-35) and -b:v MUST be 0:
|
||||
|
||||
`ffmpeg -i {{input_video}}.mp4 -codec:v libvpx-vp9 -crf {{30}} -b:v 0 -codec:a libopus -vbr on -threads {{number_of_threads}} {{output_video}}.webm`
|
||||
`ffmpeg -i {{path/to/input_video}}.mp4 -codec:v libvpx-vp9 -crf {{30}} -b:v 0 -codec:a libopus -vbr on -threads {{number_of_threads}} {{path/to/output_video}}.webm`
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
`rm -f {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Remove specific files [i]nteractively prompting before each removal:
|
||||
- Remove specific files interactively prompting before each removal:
|
||||
|
||||
`rm -i {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
|
||||
`rm -v {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Remove specific files and directories [r]ecursively:
|
||||
- Remove specific files and directories recursively:
|
||||
|
||||
`rm -r {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
||||
|
Reference in New Issue
Block a user