Skip to content

Commit

Permalink
Update vid_cut_merge.R
Browse files Browse the repository at this point in the history
  • Loading branch information
nykfank authored Jan 8, 2023
1 parent 56c2a38 commit 4d3bb8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vid_cut_merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ for (f in filme) {
dauer <- nb_seconds + sum(f == lange, na.rm=TRUE) * nb_seconds
writeLines(sprintf("%d/%d: %s %d to %d seconds", which(f == filme), length(filme), f, start, start+dauer))
if (re_encoding == TRUE) {
cmd <- sprintf("ffmpeg -hide_banner -loglevel panic -y -ss %d -i %s -t %d -vf scale=%s -codec:a aac -b:a 128k -ar %d -af aresample=async=1000 -codec:v libx264 -crf 20 -profile:v baseline -pix_fmt yuv420p -r %d -avoid_negative_ts make_zero -fflags +genpts %s",
# crf was 20, then 23 (default), now 24
cmd <- sprintf("ffmpeg -hide_banner -loglevel panic -y -ss %d -i %s -t %d -vf scale=%s -codec:a aac -b:a 128k -ar %d -af aresample=async=1000 -codec:v libx264 -crf 24 -profile:v baseline -pix_fmt yuv420p -r %d -avoid_negative_ts make_zero -fflags +genpts %s",
start, f, dauer, top_resolution, top_sampling_rate, top_fps, outfile)
} else {
cmd <- sprintf("ffmpeg -hide_banner -y -ss %d -i %s -t %d -c copy %s", start, f, dauer, outfile)
Expand Down

0 comments on commit 4d3bb8b

Please sign in to comment.