{"id":2381,"date":"2023-07-28T11:06:30","date_gmt":"2023-07-28T10:06:30","guid":{"rendered":"https:\/\/hoover.gplrank.de\/?p=2381"},"modified":"2023-07-28T11:08:24","modified_gmt":"2023-07-28T10:08:24","slug":"ffmpeg-cut-movie-at-beginning-and-end-scale-it-quickly","status":"publish","type":"post","link":"https:\/\/hoover.gplrank.de\/?p=2381","title":{"rendered":"ffmpeg: cut movie at beginning and end, scale it quickly"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"252\" src=\"https:\/\/hoover.gplrank.de\/wp-content\/uploads\/2023\/07\/image-1024x252.png\" alt=\"\" class=\"wp-image-2384\" srcset=\"https:\/\/hoover.gplrank.de\/wp-content\/uploads\/2023\/07\/image-1024x252.png 1024w, https:\/\/hoover.gplrank.de\/wp-content\/uploads\/2023\/07\/image-300x74.png 300w, https:\/\/hoover.gplrank.de\/wp-content\/uploads\/2023\/07\/image-768x189.png 768w, https:\/\/hoover.gplrank.de\/wp-content\/uploads\/2023\/07\/image-1536x379.png 1536w, https:\/\/hoover.gplrank.de\/wp-content\/uploads\/2023\/07\/image-624x154.png 624w, https:\/\/hoover.gplrank.de\/wp-content\/uploads\/2023\/07\/image.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><code>ffmpeg -ss 565 -to 01:56:40 -i input.mpg -c:a copy -c:v libx264 -crf 18 -preset ultrafast -s 1280x720 -pix_fmt yuv420p -map 0:a? -map 0:v -ignore_unknown output.mkv<\/code><\/p>\n\n\n\n<p>Explanation: <\/p>\n\n\n\n<p>-ss 565: cut the first 565 seconds (time format can also be used I think) <\/p>\n\n\n\n<p>-to 01:56:40: cut the movie at 1h56m40secs, discarding the rest<\/p>\n\n\n\n<p>-crf 18: Higher values: smaller file, worse quality; lower values (e. g. 10): bigger file, higher quality. <\/p>\n\n\n\n<p>-i input file<\/p>\n\n\n\n<p>The resulting scaled file will be written to &#8220;output.mkv&#8221;. <\/p>\n\n\n\n<p>Source: <\/p>\n\n\n\n<p><a href=\"https:\/\/superuser.com\/questions\/1527662\/visually-lossless-1080p-to-720p-using-ffmpeg\">https:\/\/superuser.com\/questions\/1527662\/visually-lossless-1080p-to-720p-using-ffmpeg<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ffmpeg -ss 565 -to 01:56:40 -i input.mpg -c:a copy -c:v libx264 -crf 18 -preset ultrafast -s 1280&#215;720 -pix_fmt yuv420p -map 0:a? -map 0:v -ignore_unknown output.mkv Explanation: -ss 565: cut the first 565 seconds (time format can also be used I think) -to 01:56:40: cut the movie at 1h56m40secs, discarding the rest -crf 18: Higher values: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2381","post","type-post","status-publish","format-standard","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/2381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2381"}],"version-history":[{"count":3,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/2381\/revisions"}],"predecessor-version":[{"id":2385,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/2381\/revisions\/2385"}],"wp:attachment":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}