{"id":210,"date":"2020-10-22T12:08:34","date_gmt":"2020-10-22T04:08:34","guid":{"rendered":"http:\/\/blog.lijishi.com\/?p=210"},"modified":"2020-10-22T12:08:34","modified_gmt":"2020-10-22T04:08:34","slug":"reprint-ffmpeg","status":"publish","type":"post","link":"https:\/\/blog.lijishi.com\/index.php\/2020\/10\/22\/reprint-ffmpeg\/","title":{"rendered":"Repost | FFmpeg \u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"<blockquote><p>\u7b14\u8bb0<\/p>\n<p>\u5728\u8fc7\u5f80WEBDL\u7684\u8fc7\u7a0b\u4e2d\uff0cFFmpeg\u53ef\u4ee5\u8bf4\u662f\u6700\u597d\u7684\u5de5\u5177\uff0cnilaoda&amp;danni\u7b49\u5927\u4f6c\u4e5f\u90fd\u91c7\u7528\u8fd9\u4e00\u5f00\u6e90\u5de5\u5177\uff0c\u5bf9\u6211\u800c\u8a00\u8981\u5b66\u7684\u8fd8\u6709\u5f88\u591a\uff0c\u8f6c\u5b58<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote><p>\u8f6c\u8f7d\u81ea\uff1ahttps:\/\/www.bfdz.ink\/2018\/04\/25\/91\/<\/p>\n<p>\u4e8c\u6b21\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u6765\u6e90\u53ca\u4f5c\u8005\uff0c\u4fb5\u5220<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<section class=\"meta\">\n<div id=\"header-meta\" class=\"meta\">\n<h1 class=\"title\"><a href=\"https:\/\/www.bfdz.ink\/2018\/04\/25\/91\/\">ffmpeg \u5e38\u7528\u547d\u4ee4<\/a><\/h1>\n<\/div>\n<\/section>\n<section class=\"article typo\">\n<div class=\"article-entry\">\n<hr \/>\n<p>1.\u526a\u5207\u89c6\u9891<\/p>\n<p>ffmpeg -ss xx:xx:xx -i URL\\inputfile_name.format -vcodec copy -acodec copy -t xx:xx:xx outputfile_name.format<\/p>\n<p>||-ss \u5f00\u59cb\u65f6\u95f4 xx:xx:xx \uff1b-t \u6301\u7eed\u65f6\u95f4 xx:xx:xx \u65f6\u95f4\u53ef\u4ee5\u5177\u4f53\u5230\u5e27\u6570\uff0c\u4f46\u662f\u4f60\u8981\u81ea\u5df1\u770b\u6e05\u695a\uff1bformat \u5e38\u89c1\u6709mp4\\ts\\mov\\flv\\f4v\\avi||<\/p>\n<p>eg\uff1affmpeg -ss 00:00:07.800 -i E:\\test.ts -vcodec copy -acodec copy -t 00:00:19.640 test_new.ts<\/p>\n<hr \/>\n<p>2.\u52a0\u9ed1\u8fb9<br \/>\n1\u3001ffmpeg \u2013i URL\\inputfile_name.format \u2013vcodec Codec_Type \u2013s 1280<em>720 \u2013an \u2013f Codec_Type outputfile_name.format<br \/>\n||Codec_Type \u5e38\u89c1\u6709 h264\\x264\\f4v\\Xvid\uff1b\u2013s \u5f3a\u5236\u5206\u8fa8\u7387,\u4e00\u822c\u90fd\u662f1280<\/em>720\u6216\u662f1920*1080 ||<br \/>\n2\u3001-vf pad=1920:1080:0:140 w,h,x,y<\/p>\n<p>eg1:ffmpeg -i F:\\2_new.ts \u2013 vcodec h264 \u2013 s 1920*1080 \u2013 an \u2013f h264 2_newget.ts<br \/>\neg2:ffmpeg -i F:\\01test.264 -vf pad=1920:1080:0:140 F:\\01test2.264<\/p>\n<hr \/>\n<p>3.\u5206\u79bb\u89c6\u9891\u97f3\u9891\u6d41<br \/>\nffmpeg -i URL\\input_file.format -vcodec copy -an output_file.video_format\u3000\u3000 \/\/\u5206\u79bb\u89c6\u9891\u6d41<br \/>\nffmpeg -i URL\\input_file.format -acodec copy -vn output_file.audio_format\u3000\u3000 \/\/\u5206\u79bb\u97f3\u9891\u6d41<\/p>\n<p>eg:ffmpeg -i M:\\test.ts -acodec copy -vn output_file.ac3<\/p>\n<hr \/>\n<p>4.\u6307\u5b9a\u97f3\u9891\u8f6c\u6362\u7801\u7387<br \/>\nffmpeg -i URL\\input_file.format -acodec copy -ab bitrats -vn output_file.audio_format<\/p>\n<p>eg:ffmpeg -i F:\\test\\test_file.flv -acodec aac -ab 127.55k -vn test_audio.m4a<\/p>\n<p><em>-ab 127.55k\u8f93\u51fa\u662f128kb\/s,\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\uff0c\u9700\u8981\u8fdb\u4e00\u6b65\u7814\u7a76<\/em><\/p>\n<hr \/>\n<p>5.ts\/flv\/f4v\/mp4\u65e0\u635f\u4e92\u8f6c<br \/>\nffmpeg -i URL\\input_file.format -vcodec copy -acodec copy URL\\output_file.format<br \/>\nffmpeg -i URL\\input_file.format -c copy -bsf h264_mp4toannexb URL\\output_file.format<br \/>\nffmpeg -i URL\\input_file.ts -c copy -bsf:a aac_adtstoasc URL\\output_file.mp4<\/p>\n<p>eg:ffmpeg -i F:\\test.f4v -vcodec copy -acodec copy S05EP01.mp4<br \/>\neg:ffmpeg -i F:\\ls\\P01.flv -c copy -bsf h264_mp4toannexb F:\\ls2\\P01.ts<\/p>\n<hr \/>\n<p>6.\u5408\u5e76\u97f3\u9891\u89c6\u9891<br \/>\nffmpeg -i URL\\input_video_file.format -i URL\\input_audio_file.format -vcodec copy -acodec copy output_file.format<\/p>\n<hr \/>\n<p>7.\u4e0b\u8f7dm3u8\u6587\u4ef6\u5bf9\u5e94\u7684\u89c6\u9891<br \/>\nffmpeg -i m3u8_links -acodec copy -vcodec copy -f mp4 output.mp4<br \/>\nffmpeg -i m3u8_links -c copy -bsf:a aac_adtstoasc output.mp4<\/p>\n<p>eg:ffmpeg -i D:\\Downloads\\test.ts -c copy -bsf:a aac_adtstoasc D:\\Downloads\\test_new.mp4<\/p>\n<hr \/>\n<p>8.\u5bfc\u51fa\u5e8f\u5217\u56fe\u7247<br \/>\nffmpeg -i URL\\input_video_file.format URL\\example.%d.jpg<br \/>\nFfmpeg \u2013i F:\\test\\test.mp4 \u2013r 25 \u2013f image2 F:\\test\\jpg\\image-%3d.jpg<br \/>\neg:ffmpeg -i F:\\test\\test.mp4 F:\\test\\jpg\\example.%d.jpg<\/p>\n<hr \/>\n<p>9.\u5207\u9ed1\u8fb9<\/p>\n<p>ffmpeg -i F:\\test\\38.mp4 -vf \u201ccrop=1920:800:0:140\u201d -b 6000k F:\\38.mp4<\/p>\n<hr \/>\n<p>10.\u5408\u5e76\u5206\u6bb5\uff0c\u8f93\u51fa\u5355\u6587\u4ef6<br \/>\nWin\u7cfb\u7edf\uff1a<br \/>\nffmpeg -f concat -i E:\\test\\list.txt -c copy output.mp4<br \/>\nLinux\u7cfb\u7edf\uff1a<br \/>\nffmpeg -f concat -i\u00a0<strong>list.txt<\/strong>\u00a0-c copy output.mp4 \uff08\u6ce8\uff1a\u6b64\u65f6list\u8981\u5728\u8fd0\u884cffmpg\u7684\uff0c\u76ee\u5f55\u91cc\uff09<\/p>\n<p>ffmpeg -ss 00:00:00 -i<\/p>\n<hr \/>\n<p>Links:<br \/>\n1.Video codec<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Video_codec\" target=\"_blank\" rel=\"noopener\">https:\/\/en.wikipedia.org\/wiki\/Video_codec<\/a><br \/>\n2.x264<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/X264\" target=\"_blank\" rel=\"noopener\">https:\/\/en.wikipedia.org\/wiki\/X264<\/a><\/p>\n<hr \/>\n<p>via:<a href=\"https:\/\/www.web-dl.cc\/?page_id=141\" target=\"_blank\" rel=\"noopener\">https:\/\/www.web-dl.cc\/?page_id=141<\/a><\/p>\n<\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u7b14\u8bb0 \u5728\u8fc7\u5f80WEBDL\u7684\u8fc7\u7a0b\u4e2d\uff0cFFmpeg\u53ef\u4ee5\u8bf4\u662f\u6700\u597d\u7684\u5de5\u5177\uff0cnilaoda&amp;danni\u7b49\u5927\u4f6c\u4e5f\u90fd\u91c7 &hellip; <a href=\"https:\/\/blog.lijishi.com\/index.php\/2020\/10\/22\/reprint-ffmpeg\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Repost | FFmpeg \u5e38\u7528\u547d\u4ee4<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":211,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[14],"class_list":["post-210","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-repeat","tag-ffmpeg"],"_links":{"self":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":0,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/posts\/210\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/media\/211"}],"wp:attachment":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/media?parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/categories?post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/tags?post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}