{"id":54357,"date":"2021-12-22T03:01:44","date_gmt":"2021-12-21T17:01:44","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=54357"},"modified":"2021-12-23T13:46:26","modified_gmt":"2021-12-23T03:46:26","slug":"more-ffmpeg-edited-videos-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/more-ffmpeg-edited-videos-tutorial\/","title":{"rendered":"More ffmpeg Edited Videos Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/HouseRotate.mp4\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"More ffmpeg Edited Videos Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/more_ffmpeg_video_edits.gif\" title=\"More ffmpeg Edited Videos Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">More ffmpeg Edited Videos Tutorial<\/p><\/div>\n<p>Now that yesterday&#8217;s <a title='Making of Sepia Video via ffmpeg Tutorial' href='#msvt'>Making of Sepia Video via ffmpeg Tutorial<\/a> has outlined some media sharing strategies, let&#8217;s look at more of what <a target=_blank title=ffmpeg href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a> can do for you in the video editing woooooorrrrrllllllddd.<\/p>\n<p>As far as media creation goes, are you like me and think in terms of videos being much harder to edit than images, and maybe even audio media files?   But have you considered global video editing via great command line products like <a target=_blank title=ffmpeg href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a>?<\/p>\n<p>We normally end up at the excellent <a target=_blank href='https:\/\/stackoverflow.com\/' title='StackOverflow, thanks for most advice'>StackOverflow<\/a> to find methodologies to use, but today &#8230;<\/p>\n<table>\n<tr>\n<th>Input House.m4v video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/m4v' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/House.m4v'><\/source><\/video><\/td>\n<\/tr>\n<tr>\n<th>macOS Terminal command line ffmpeg command to &#8220;emboss&#8221; &#8230; thanks to <a target=_blank title='ffmpeg help' href='https:\/\/hhsprings.bitbucket.io\/docs\/programming\/examples\/ffmpeg\/manipulating_video_colors\/geq_vignette.html'>geq, vignette &#8212; ffmpeg examples<\/a><\/th>\n<\/tr>\n<tr>\n<td>$ ffmpeg -y -i House.m4v -vf &#8221;<br \/>\ngeq=<br \/>\nlum='(lum(X,Y)+(256-lum(X-4,Y-4)))\/2&#8242;:<br \/>\ncr='(cr(X,Y)+(256-cr(X-6,Y-6)))\/2&#8242;:<br \/>\ncb='(cb(X,Y)+(256-cb(X-8,Y-8)))\/2&#8242;<br \/>\n&#8221; -an HouseEmboss.mp4<\/td>\n<\/tr>\n<tr>\n<th>Output HouseEmboss.mp4 &#8220;emboss&#8221; video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/mp4' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/HouseEmboss.mp4'><\/source><\/video><\/td>\n<\/tr>\n<tr>\n<th>macOS Terminal command line ffmpeg command to &#8220;vignette&#8221; &#8230; thanks to <a target=_blank title='ffmpeg help' href='https:\/\/hhsprings.bitbucket.io\/docs\/programming\/examples\/ffmpeg\/manipulating_video_colors\/geq_vignette.html'>geq, vignette &#8212; ffmpeg examples<\/a><\/th>\n<\/tr>\n<tr>\n<td>$ ffmpeg -y -i House.m4v  -vf &#8220;vignette&#8221;  -an HouseVignette.mp4<\/td>\n<\/tr>\n<tr>\n<th>Output HouseVignette.mp4 &#8220;vignette&#8221; video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/mp4' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/HouseVignette.mp4'><\/source><\/video><\/td>\n<\/tr>\n<tr>\n<th>macOS Terminal command line ffmpeg command with &#8220;luminance in the centre&#8221; &#8230; thanks to <a target=_blank title='ffmpeg help' href='https:\/\/hhsprings.bitbucket.io\/docs\/programming\/examples\/ffmpeg\/manipulating_video_colors\/geq_vignette.html'>geq, vignette &#8212; ffmpeg examples<\/a><\/th>\n<\/tr>\n<tr>\n<td>$ ffmpeg -y -i House.m4v  -vf &#8220;\\ngeq=\\nlum=&#8217;max(lum(X,Y) &#8211; ((X-W\/2)^2+(Y-H\/2)^2)\/5000., 0)&#8217;:\\ncr=&#8217;cr(X,Y)&#8217;:\\ncb=&#8217;cb(X,Y)&#8217;\\n&#8221; -an HouseLuminance.mp4<\/td>\n<\/tr>\n<tr>\n<th>Output HouseLuminance.mp4 &#8220;luminance in the centre&#8221; video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/mp4' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/HouseLuminance.mp4'><\/source><\/video><\/td>\n<\/tr>\n<tr>\n<th>macOS Terminal command line ffmpeg command with &#8220;rotation&#8221; &#8230; thanks to <a target=_blank title='ffmpeg help' href='https:\/\/superuser.com\/questions\/616311\/ffmpeg-filter-to-rotate-image-through-arbitrary-angle'>video &#8211; FFmpeg filter to rotate image through arbitrary angle &#8211; Super User<\/a><\/th>\n<\/tr>\n<tr>\n<td>$ ffmpeg -y -i House.m4v -vf &#8220;rotate=angle=-20*PI\/180:fillcolor=yellow&#8221; HouseRotate.mp4<\/td>\n<\/tr>\n<tr>\n<th>Output HouseRotate.mp4 &#8220;rotate&#8221; video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/mp4' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/HouseRotate.mp4'><\/source><\/video><\/td>\n<\/tr>\n<\/table>\n<p>Cutish, huh?!<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank href='\/\/www.rjmprogramming.com.au\/ITblog\/new-making-of-sepia-video-via-ffmpeg-tutorial\/'>New Making of Sepia Video via ffmpeg Tutorial<\/a> ...<\/p>\n\n\n\n\n<hr>\n\n\n\n\n\n<p id='msvt'>Previous relevant <a target=_blank title='Making of Sepia Video via ffmpeg Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/making-of-sepia-video-via-ffmpeg-tutorial\/'>Making of Sepia Video via ffmpeg Tutorial<\/a> is shown below.<\/p>\n\n\n\n[caption id=\"\" align=\"alignnone\" width=\"220\" caption=\"Making of Sepia Video via ffmpeg Tutorial\"]<a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/HouseSepia.mp4\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Making of Sepia Video via ffmpeg Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/making_of_sepia_video_via_ffmpeg.gif\" title=\"Making of Sepia Video via ffmpeg Primer Tutorial\"  style=\"float:left;\" \/><\/a>[\/caption]\n\n\n\n<p>Yesterday's <a title='Sepia Video via ffmpeg Primer Tutorial' href='#svpt'>Sepia Video via ffmpeg Primer Tutorial<\/a> was the salient step, for us, regarding the \"Making Of\" a sepia video.   But that was \"for us\" and we were involved in the whole production, and so was a bit biassed here.  Other readers might be curious about any\/all of the steps getting there, which we outline below ...<\/p>\n\n\n\n\n\n<ol>\n\n\n<li>opened an iPad's Camera app in front of target subject for video ... our house ...<\/li>\n\n\n\n\n<li>selected Video radio button<\/li>\n\n\n\n\n<li>clicked round red Play button and panned and zoomed around the house for a 16 second video ...<\/li>\n\n\n\n\n<li>opened iPad's Photos app and clicked on Videos folder and two finger gestured our House video and unsuccessfully Shared via Mail option and AirDrop option and so settled for Slideshow option then Messages option, sending to my own mobile number ...<\/li>\n\n\n\n\n<li>and in that way, back at this MacBook Air (from here and on), opened its Messages application to that SMS ...<\/li>\n\n\n\n\n<li>two finger gesture on that SMS and chose Add to Photos Library ...<\/li>\n\n\n\n\n<li>in Photos application in its Videos folder clicked Export button to Save a House.m4v in the MAMP $_SERVER['DOCUMENT_ROOT'] folder ( which corresponds to URL HTTP:\/\/localhost:8888\/House.m4v ) ...<\/li>\n\n\n\n\n<li>\n\n\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/sepia-video-via-ffmpeg-primer-tutorial\/'>\n\n\n<table>\n\n\n<tr>\n\n<th>Input House.m4v video ...<\/th>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td><video style='width:100%;height:500px;' type='video\/m4v' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/House.m4v'><\/source><\/video><\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<th>macOS Terminal command line ffmpeg command to make \"sepia\" ...<\/th>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td>$ ffmpeg -i House.m4v -filter_complex colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131 -pix_fmt yuv420p  HouseSepia.mp4<\/td>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<th>Output HouseSepia.mp4 \"sepia\" video ...<\/th>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td><video style='width:100%;height:500px;' type='video\/mp4' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/HouseSepia.mp4'><\/source><\/video><\/td>\n\n<\/tr>\n\n\n<\/table>\n\n\n<\/blockquote>\n\n\n<\/li>\n\n\n\n\n<li>sftp'ed, via FileZilla both of House.m4v and HouseSepia.mp4, to be able to show them and have the user play them, above<\/li>\n\n\n<\/ol>\n\n\n\n\n\n<p>Generally speaking images can often be shared via Mail sharing option in an iOS Photos app scenario.  Videos and Audios of lengths greater than a few seconds may need, for iOS sharing to macOS, AirDrop and a little counterintuitively, Messages SMS might work where a Mail Email Attachment does not.<\/p>\n\n\n\n<!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/making-of-sepia-video-via-ffmpeg-tutorial\/'>Making Of Sepia Video via ffmpeg Tutorial<\/a>.<\/p-->\n<hr>\n<p id='msvt'>Previous relevant <a target=_blank title='Making of Sepia Video via ffmpeg Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/making-of-sepia-video-via-ffmpeg-tutorial\/'>Making of Sepia Video via ffmpeg Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/HouseSepia.mp4\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Making of Sepia Video via ffmpeg Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/making_of_sepia_video_via_ffmpeg.gif\" title=\"Making of Sepia Video via ffmpeg Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Making of Sepia Video via ffmpeg Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Sepia Video via ffmpeg Primer Tutorial' href='#svpt'>Sepia Video via ffmpeg Primer Tutorial<\/a> was the salient step, for us, regarding the &#8220;Making Of&#8221; a sepia video.   But that was &#8220;for us&#8221; and we were involved in the whole production, and so was a bit biassed here.  Other readers might be curious about any\/all of the steps getting there, which we outline below &#8230;<\/p>\n<ol>\n<li>opened an iPad&#8217;s Camera app in front of target subject for video &#8230; our house &#8230;<\/li>\n<li>selected Video radio button<\/li>\n<li>clicked round red Play button and panned and zoomed around the house for a 16 second video &#8230;<\/li>\n<li>opened iPad&#8217;s Photos app and clicked on Videos folder and two finger gestured our House video and unsuccessfully Shared via Mail option and AirDrop option and so settled for Slideshow option then Messages option, sending to my own mobile number &#8230;<\/li>\n<li>and in that way, back at this MacBook Air (from here and on), opened its Messages application to that SMS &#8230;<\/li>\n<li>two finger gesture on that SMS and chose Add to Photos Library &#8230;<\/li>\n<li>in Photos application in its Videos folder clicked Export button to Save a House.m4v in the MAMP $_SERVER[&#8216;DOCUMENT_ROOT&#8217;] folder ( which corresponds to URL HTTP:\/\/localhost:8888\/House.m4v ) &#8230;<\/li>\n<li>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/sepia-video-via-ffmpeg-primer-tutorial\/'>\n<table>\n<tr>\n<th>Input House.m4v video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/m4v' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/House.m4v'><\/source><\/video><\/td>\n<\/tr>\n<tr>\n<th>macOS Terminal command line ffmpeg command to make &#8220;sepia&#8221; &#8230;<\/th>\n<\/tr>\n<tr>\n<td>$ ffmpeg -i House.m4v -filter_complex colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131 -pix_fmt yuv420p  HouseSepia.mp4<\/td>\n<\/tr>\n<tr>\n<th>Output HouseSepia.mp4 &#8220;sepia&#8221; video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/mp4' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/HouseSepia.mp4'><\/source><\/video><\/td>\n<\/tr>\n<\/table>\n<\/blockquote>\n<\/li>\n<li>sftp&#8217;ed, via FileZilla both of House.m4v and HouseSepia.mp4, to be able to show them and have the user play them, above<\/li>\n<\/ol>\n<p>Generally speaking images can often be shared via Mail sharing option in an iOS Photos app scenario.  Videos and Audios of lengths greater than a few seconds may need, for iOS sharing to macOS, AirDrop and a little counterintuitively, Messages SMS might work where a Mail Email Attachment does not.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/making-of-sepia-video-via-ffmpeg-tutorial\/'>Making Of Sepia Video via ffmpeg Tutorial<\/a>.<\/p-->\n<hr>\n<p id='svpt'>Previous relevant <a target=_blank title='Sepia Video via ffmpeg Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/sepia-video-via-ffmpeg-primer-tutorial\/'>Sepia Video via ffmpeg Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/HouseSepia.mp4\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Sepia Video via ffmpeg Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/HouseSepia.jpg\" title=\"Sepia Video via ffmpeg Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Sepia Video via ffmpeg Primer Tutorial<\/p><\/div>\n<p>As far as media creation goes, are you like me and think in terms of videos being much harder to edit than images, and maybe even audio media files?   But have you considered global video editing via great command line products like <a target=_blank title=ffmpeg href='https:\/\/www.ffmpeg.org\/'>ffmpeg<\/a>?<\/p>\n<p>We normally end up at the excellent <a target=_blank href='https:\/\/stackoverflow.com\/' title='StackOverflow, thanks for most advice'>StackOverflow<\/a> to find methodologies to use, but today the most succinct and working advice on this topic came from <a target=_blank href='https:\/\/www.youtube.com\/watch?v=nIHnpWTXsjk' title='The FFMPEG guy'>&#8220;The FFMPEG guy&#8221;<\/a> in the form &#8230;<\/p>\n<table>\n<tr>\n<th>Input House.m4v video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/m4v' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/House.m4v'><\/source><\/video><\/td>\n<\/tr>\n<tr>\n<th>macOS Terminal command line ffmpeg command to make &#8220;sepia&#8221; &#8230;<\/th>\n<\/tr>\n<tr>\n<td>$ ffmpeg -i House.m4v -filter_complex colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131 -pix_fmt yuv420p  HouseSepia.mp4<\/td>\n<\/tr>\n<tr>\n<th>Output HouseSepia.mp4 &#8220;sepia&#8221; video &#8230;<\/th>\n<\/tr>\n<tr>\n<td><video style='width:100%;height:500px;' type='video\/mp4' controls><source src='http:\/\/www.rjmprogramming.com.au\/Mac\/HouseSepia.mp4'><\/source><\/video><\/td>\n<\/tr>\n<\/table>\n<p>Cute, huh?!<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d54345' onclick='var dv=document.getElementById(\"d54345\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ffmpeg\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54345' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d54345' onclick='var dv=document.getElementById(\"d54345\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ffmpeg\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54345' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d54357' onclick='var dv=document.getElementById(\"d54357\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/command-line\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54357' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Now that yesterday&#8217;s Making of Sepia Video via ffmpeg Tutorial has outlined some media sharing strategies, let&#8217;s look at more of what ffmpeg can do for you in the video editing woooooorrrrrllllllddd. As far as media creation goes, are you &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/more-ffmpeg-edited-videos-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,12,37],"tags":[183,233,234,2457,384,407,415,431,2178,760,774,1725,1071,1072,2384,2293,1159,1252,1319,1369,3881,3230,1374],"class_list":["post-54357","post","type-post","status-publish","format-standard","hentry","category-animation","category-elearning","category-tutorials","tag-camera","tag-command","tag-command-line","tag-editing","tag-emboss","tag-export","tag-ffmpeg","tag-filter","tag-macos","tag-media","tag-messages","tag-photos","tag-rotate","tag-rotation","tag-save","tag-sepia","tag-sms","tag-terminal","tag-tutorial","tag-video","tag-video-editing","tag-video-editor","tag-vignette"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54357"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=54357"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54357\/revisions"}],"predecessor-version":[{"id":54390,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54357\/revisions\/54390"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=54357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=54357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=54357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}