Command | Description |
---|---|
ffmpeg -i in.mp4 out.avi |
Convert from one format to another |
ffmpeg -i in.mp4 -preset slower -crf 18 out.mp4 |
Convert with custom quality: lower crf = higher quality (range: 0-51) |
ffmpeg -i in.mkv -c:v copy -c:a copy out.mp4 |
Remux MKV file into MP4 (no quality loss) |
ffmpeg -i onlyvideo.mp4 -i onlyaudio.mp4 -c copy -map 0:0 -map 1:1 -shortest out.mp4 |
Mux video and audio from different videos (no quality loss) |
ffmpeg -i in.mp4 -vf scale=640:480 out.mp4 |
Resize video to 640 x 480 |
ffmpeg -i in.mp4 -vf "transpose=1" out.mp4 |
Rotate video 90 degrees clockwise (range: 0-3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dotNetDave's (David McCarter) Editor Config - dotNetTips.com | |
# Updates to this file are posted quarterly at: https://bit.ly/EditorConfig5 | |
# Updated August 2023 | |
# dotNetDave's books available at: http://bit.ly/RockYourCodeBooks | |
# Rockin' the Code World with dotNetDave (weekly live show): https://www.c-sharpcorner.com/live/rockin-the-code-world-with-dotnetdave | |
root = true | |
# All Files | |
[*] |
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(purrr) | |
library(pwr2) | |
power_analysis_go_brrr <- function(f, n) { | |
res <- pwr.2way(a = 2, b = 2, f.A = f, f.B = f, alpha = .05, size.A = n/2, size.B = n/2) | |
data.frame(f = f, | |
n = n, | |
power_a = res$power.A, | |
power_b = res$power.B, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot2) | |
library(ggrepel) | |
library(tidyr) | |
library(helperutils) # https://github.com/peterdalle/helperutils | |
# Fil nedladdad från: | |
# https://www.vr.se/analys/svensk-forskning-i-siffror/vetenskapsradets-forskningsfinansiering-i-siffror.html | |
file <- "Tillgängliggörande av data_2014-2021.xlsx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(pwr) | |
power_correlation <- function(n, r, alpha=0.05) { | |
power <- pwr.r.test(n=n, r=r, sig.level=alpha) | |
data.frame(n=n, r=r, alpha=alpha, power=power$power) | |
} | |
parameters <- expand.grid(n = seq.int(4, 200, by=2), | |
r = seq.int(.1, .9, by=.1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(rio) | |
xlsx_file <- "https://resource-cms.springernature.com/springer-cms/rest/v1/content/19770948/data/v8" | |
df <- import(xlsx_file, skip=3) | |
journal_apc <- df %>% | |
mutate(cost = as.integer(str_extract(`APC EUR '22`, "\\d+"))) %>% | |
select(journal = `Journal title`, cost) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Out-File long-files.txt ; cmd /c "dir z:\ /b /s /a" | ForEach-Object { if ($_.length -gt 140) {$_ | Out-File -append long-files.txt}} |
NewerOlder