{"id":1825,"date":"2023-11-13T10:42:12","date_gmt":"2023-11-13T10:42:12","guid":{"rendered":"https:\/\/howiem.org\/wordpress\/?p=1825"},"modified":"2023-11-13T11:07:40","modified_gmt":"2023-11-13T11:07:40","slug":"splitting-apple-cinematic-videos-into-image-and-depth-vids","status":"publish","type":"post","link":"https:\/\/howiem.org\/wordpress\/2023\/11\/13\/splitting-apple-cinematic-videos-into-image-and-depth-vids\/","title":{"rendered":"Splitting Apple Cinematic videos into image and depth vids"},"content":{"rendered":"<p>Excuse the weird background audio &#8211; got TheRadBrad playing Spiderman 2 on in the background \ud83d\ude09<\/p>\n<p>Okay &#8211; quick vid of Sock, filmed on iPhone 15 Pro Max in Cinematic mode. Nice depth of field effect. Wish Apple didn&#8217;t keep referring to defocus <em>in general<\/em> as &#8220;bokeh&#8221;; it&#8217;s not. Bokeh is the pattern of circles\/iris shapes you see when there are point hilights out of focus, not the overall defocus look. Hey ho.<\/p>\n<p><iframe loading=\"lazy\" title=\"1. Cinematic vid - full\" width=\"1080\" height=\"608\" src=\"https:\/\/www.youtube.com\/embed\/yay24NkVsmA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>This is the video with no depth \/ defocus applied:<\/p>\n<p><iframe loading=\"lazy\" title=\"2. Cinematic vid - no depth info applied\" width=\"1080\" height=\"608\" src=\"https:\/\/www.youtube.com\/embed\/a5jEF8LY3zY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>&#8230; and this is the depth map, extracted using MP4Box and ffmpeg:<\/p>\n<p><iframe loading=\"lazy\" title=\"3. Cinematic vid - extracted depth map\" width=\"1080\" height=\"608\" src=\"https:\/\/www.youtube.com\/embed\/jGOabJlEbgs?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>OK &#8211; to extract the depth map, you need the video file in unprocessed state. From the Photos app in iOS, hit the Share button and choose Export unmodified original. The only destination option I was given was iCloud Drive, but that&#8217;s better than nothing.<\/p>\n<p>Then (and this process is straight from the remarkable Jan Kaiser &#8211; <a href=\"https:\/\/twitter.com\/jankais3r\">https:\/\/twitter.com\/jankais3r<\/a> or <a href=\"https:\/\/defcon.social\/@jankais3r\">@jankais3r@defcon.social<\/a> on Mastodon) &#8230;<\/p>\n<pre>MP4Box -add self#2:hdlr=vide MYCATVIDEO.mov -out remux.mp4 \r\nffmpeg -vcodec hevc -i remux.mp4 -map 0:1 map.mp4<\/pre>\n<p>The MP4Box utility is part of the GPAC app for Macs; install GPAC and you&#8217;ll find MP4Box appears in your Applications folder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excuse the weird background audio &#8211; got TheRadBrad playing Spiderman 2 on in the background \ud83d\ude09 Okay &#8211; quick vid of Sock, filmed on iPhone 15 Pro Max in Cinematic&#8230;<\/p>\n","protected":false},"author":2,"featured_media":1827,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1825","post","type-post","status-publish","format-standard","has-post-thumbnail","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/posts\/1825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/comments?post=1825"}],"version-history":[{"count":4,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/posts\/1825\/revisions"}],"predecessor-version":[{"id":1830,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/posts\/1825\/revisions\/1830"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/media\/1827"}],"wp:attachment":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/media?parent=1825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/categories?post=1825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/tags?post=1825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}