{"id":1055,"date":"2009-02-07T23:31:55","date_gmt":"2009-02-08T07:31:55","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=1055"},"modified":"2009-02-09T22:06:46","modified_gmt":"2009-02-10T06:06:46","slug":"capturing-dv-screenshots","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/capturing-dv-screenshots\/","title":{"rendered":"Capturing DV Screenshots"},"content":{"rendered":"<p>I have a specific task I need to do: I need to view a DV stream captured from an NTSC video source via DV bridge and capture screenshots. Since there is a lot of footage, I need to be able to seek easily through the stream (not unreasonable since DV is purely intra-coded, i.e., it consists of independently coded keyframes). Since this is television source material, I want the data competently deinterlaced while viewing and certainly when the screenshots are taken. One more thing &#8212; I want the screenshots to retain their 720&#215;480 resolution that looks correct on a computer monitor, and not be squished down to 640&#215;480, overscan region and all.<\/p>\n<p>If you must know, it&#8217;s because I play lots of games for my <a href=\"http:\/\/games.multimedia.cx\/\">Gaming Pathology project<\/a> and contribute data for them &#8212; including screenshots &#8212; to the <a href=\"http:\/\/www.mobygames.com\/home\">MobyGames database<\/a> for posterity. I have a huge number of console games yet to cover and the screenshot dilemma is one thing that is holding me up. Consider the need to properly preserve representative screenshots of the Sega Saturn version of <em>Space Jam<\/em> for future generations of video game historians to study.<\/p>\n<p><center><br \/>\n<a href=\"http:\/\/www.mobygames.com\/game\/sega-saturn\/space-jam\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/sega-saturn-space-jam-cover.jpg\" alt=\"Sega Saturn - Space Jam\" title=\"Sega Saturn - Space Jam\" width=\"150\" height=\"254\" class=\"aligncenter size-full wp-image-1058\" border=\"0\" \/><\/a><br \/>\n<\/center><\/p>\n<p>I didn&#8217;t think this would be such a tall order. <!--more--> Apple&#8217;s iMovie, which comes with my Mac Mini, performs admirably, all the way up to that final requirement where it insists on squeezing screenshots horizontally to 640 pixels across. I just can&#8217;t override that behavior.<\/p>\n<p>Next, I tried <a href=\"http:\/\/videolan.org\/\">VLC<\/a>, the awesome, free, open source, cross-platform multimedia player. While I love using VLC for general playback on most non-QuickTime video files, I have never been a fan of using it for screen capture, functionality which was obviously an afterthought (difficult to configure and use, and hard to tell if it&#8217;s really working). However, VLC can play DV and can capture non-squished screenshots. One problem: VLC can not de-interlace DV. Go on, try it, on any platform. Play a DV file and then select a de-interlace mode. VLC will stop playing the video. <em>So close.<\/em><\/p>\n<p>Then I remembered that <a href=\"http:\/\/www.adobe.com\/\">my own company<\/a> has a product or 2 dealing with video. So next is Adobe Premiere Pro CS4. I&#8217;m pleased to report that it actually meets all of my requirements, although it inadvertently raises a new requirement&#8211; the process must use a more streamlined workflow. After loading a DV stream, the screen capture workflow with Premiere Pro works something like this:<\/p>\n<ol>\n<li>Select File | Export | Media&#8230; from the menus<\/li>\n<li>You are presented with a dialog that allows you to seek through the DV stream; find a frame to capture<\/li>\n<li>Select a path and unique filename for the capture and press OK<\/li>\n<\/ol>\n<p>Repeat that same process for each screenshot, starting with the file menu. Don&#8217;t make the mistake I first did of scrubbing through the video in the main editor, then invoking the export media dialog thinking that it would export the frame you were sitting on in the main editor&#8211; I probably captured about 20 screenshots that way before I found out the stream in the dialog is independent of the position of the stream in the main editor and that I managed to capture 20 copies of the first frame. For you see, there is no immediate feedback&#8211; once you press OK on the export media dialog, the export job is actually sent to a queue in Adobe Media Encoder CS4. I let the jobs in the queue sit for awhile before I became suspicious that I was actually just capturing the first frame each time.<\/p>\n<p><center><br \/>\n<a href=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/premiere-pro.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/premiere-pro-small.jpg\" alt=\"Adobe Premiere Pro -- Export Media\" title=\"Adobe Premiere Pro -- Export Media\" width=\"400\" height=\"367\" class=\"aligncenter size-full wp-image-1062\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/premiere-pro-small.jpg 400w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/premiere-pro-small-300x275.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><br \/>\nclick for larger screenshot<br \/>\n<\/center><\/p>\n<p>Officially, I am prohibited from saying anything negative about this particular product. But there&#8217;s really no need to say anything negative about it or any other product on this survey&#8211; I fully accept that these are video processing programs that simply aren&#8217;t designed to perform my specific task with my very specific parameters. Readers know that this <a href=\"http:\/\/multimedia.cx\/eggs\/investigating-alternate-continuous-integration-software\/\">isn&#8217;t the first time I have been in this situation<\/a> (but I <em>really<\/em> hope I don&#8217;t need to resort to writing a custom solution for this task).<\/p>\n<p>I know there are probably plenty more Mac programs I could try out for anywhere from $30-$500 each. But just yesterday, I caught the article <a href=\"http:\/\/techcityinc.com\/2009\/02\/top-10-free-video-editors-for-ubuntu-linux\/\">Top 10 Free Video Editors for Ubuntu Linux<\/a> linked from <a href=\"http:\/\/digg.com\/linux_unix\">Digg&#8217;s Linux page<\/a>. Maybe I&#8217;ll hit paydirt with one of these. The <a href=\"http:\/\/digg.com\/linux_unix\/Top_10_Free_Video_Editors_for_Ubuntu_Linux\">comments in the related Digg post<\/a> chastised the title of the article for claiming that these editors were for &#8220;Ubuntu Linux&#8221;, and rightly so&#8211; many of the editors listed are not even in Ubuntu&#8217;s repository. But I&#8217;ll look at some of the ones that are and try to make some others run by downloading them and perhaps compiling them.<\/p>\n<p>First up is <a href=\"http:\/\/avidemux.berlios.de\/index.html\">Avidemux<\/a> 2.4.3 (packaged by Ubuntu). It doesn&#8217;t go well. The program claims that my DV file looks like MPEG and asks if I would like to index it. If I accept, then the program eventually crashes after giving its best try at indexing; if I decline, the program fails to open the DV file.<\/p>\n<p>Let&#8217;s try <a href=\"http:\/\/www.kinodv.org\/\">Kino<\/a> 1.3.0 (packaged by Ubuntu). I remember Kino from the days when I was all-Linux all the time and had some DV capturing and processing I wanted to try. Unfortunately, I can&#8217;t really get it to do anything useful, even after I read the tutorials and documentation. Kino just sort of stares at me like it <em>wants<\/em> to do something:<\/p>\n<p><center><br \/>\n<div id=\"attachment_1066\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/kinodv-inactivity.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1066\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/kinodv-inactivity-300x228.png\" alt=\"click for larger screenshot\" title=\"Kino DV, not playing DV\" width=\"300\" height=\"228\" class=\"size-medium wp-image-1066\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/kinodv-inactivity-300x228.png 300w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/kinodv-inactivity.png 769w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1066\" class=\"wp-caption-text\">click for larger screenshot<\/p><\/div><br \/>\n<\/center><\/p>\n<p>I can load a video clip into the storyboard but I can&#8217;t play anything. Well, I can hit the play button and the timecode advances, but nothing gets played. Actually, turning up the volume reveals that audio is being played. But no video is being displayed. As you can see from the white block, the video region is not being repainted. I tried to download and compile the latest version (1.3.3) but met with little luck during the configuration phase.<\/p>\n<p>Next up is <a href=\"http:\/\/lives.sourceforge.net\/\">LiVES<\/a> which is not packaged in Ubuntu, but whose website nonetheless has a link to a fairly friendly install mechanism for Ubuntu (covering LiVES 0.9.9.4, where 0.9.9.6 is the latest). This works and LiVES runs. <\/p>\n<p>First impression: What horrifying GUI toolkit is this thing running on top of? So I go to load my modest 3 GB file &#8212; not very large in the grand scheme of video processing &#8212; only to be met with the warning &#8220;LiVES is not currently optimised for larger file sizes.&#8221; I m advised to proceed with caution if opening a file larger than 2 GB. Why? Does it seek through a file index using a linear search? Look, large files are pretty much the norm for video editing. I press on anyway and instruct LiVES to load the file. LiVES doesn&#8217;t believe the DV file is a valid video or image file.<\/p>\n<p>Next is <a href=\"http:\/\/www.cinepaint.org\/\">CinePaint<\/a>. Based on the description from the article as well as the project&#8217;s homepage, I can&#8217;t really see how this pertains to video. It seems to be an image editing application. But I figure that perhaps it is capable of loading and scrubbing through videos in order to touch up and maybe even export individual frames. I&#8217;ll never know. It&#8217;s not in Ubuntu&#8217;s repository and I can&#8217;t get the source code to compile. Searching for &#8216;dv&#8217; or &#8216;ffmpeg&#8217; in the project&#8217;s configure script yields nothing, nor do any filenames contain &#8216;dv&#8217;. It is unlikely that the project can work with DV.<\/p>\n<p>Next I come to <a href=\"http:\/\/cinelerra.org\/\">Cinelerra<\/a>. I remember its creators, <a href=\"http:\/\/heroinewarrior.com\/\">Heroine Warriors<\/a>, from when I was just getting started with multimedia hacking back in 2000. Fortunately, the Cinelerra website provides very streamlined ways for getting the program installed on your system. When I first run the program, it strikes me as the <a href=\"http:\/\/gimp.org\/\">GIMP<\/a> of video editors&#8211; lots of individual windows splattered across the desktop (and each with its own entry in the taskbar). An interesting thing about <a href=\"http:\/\/heroinewarrior.com\/\">Heroine Virtual&#8217;s<\/a> various programs is that they apparently use their own homegrown UI toolkit. They have been doing this for a very long time and I distinctly recall that back in 2000, their UI widgets were notably more useful than GTK. These days, those same widgets are looking a bit dated.<\/p>\n<p><center><br \/>\n<div id=\"attachment_1068\" style=\"width: 259px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cinelerra-in-action.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1068\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cinelerra-in-action-249x300.png\" alt=\"click for larger screenshot\" title=\"Cinelerra In Action\" width=\"249\" height=\"300\" class=\"size-medium wp-image-1068\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cinelerra-in-action-249x300.png 249w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cinelerra-in-action-850x1024.png 850w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cinelerra-in-action.png 948w\" sizes=\"auto, (max-width: 249px) 100vw, 249px\" \/><\/a><p id=\"caption-attachment-1068\" class=\"wp-caption-text\">click for larger screenshot<\/p><\/div><br \/>\n<\/center><\/p>\n<p>However, the program installs, runs, and can play back DV. As you can see, it can not de-interlace on the fly. It has a de-interlace filter than can be applied when rendering, though. Plus, I can&#8217;t find any screenshot facility.<\/p>\n<p><a href=\"http:\/\/vivia-video.org\/\">Vivia<\/a> looked promising, but I couldn&#8217;t make it compile. It&#8217;s just as well; closer reading of the <a href=\"http:\/\/vivia-video.org\/download.html\">download page<\/a> revealed the rather brazen message, &#8220;!!!! Currently only works with PAL DV-format video !!!!&#8221;. I wanted to give <a href=\"http:\/\/jahshaka.org\/\">Jahshaka<\/a> a try but couldn&#8217;t get it to compile nor install through its binary (RPM-based) installer. Finally, I installed <a href=\"http:\/\/www.kdenlive.org\/\">Kdenlive<\/a> from the Ubuntu repository in my Kubuntu VMware session. The program crashed on startup.<\/p>\n<p>The last item on the list of top 10 free video editors is none other than <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a>. I know in advance that it doesn&#8217;t fit my requirements for this particular task.<\/p>\n<p><strong>Alternate Solutions:<\/strong><\/p>\n<p>What about transcoding the DV stream to another format, performing the de-interlacing at that stage and then scrubbing through that to find screenshots? That could probably work. But why should I have to?<\/p>\n<p>There is also the possibility of taking screenshots using a facility outside of a video player or editor. Mac OS X doesn&#8217;t have very good support for doing this, only hotkeys for capturing the entire desktop or a portion that the user specifies with the mouse; the latter is not an acceptable workflow for taking lots of screenshots. I use <a href=\"http:\/\/www.hyperionics.com\/\">Hypersnap<\/a> for capturing all kinds of screenshots in Windows games. It&#8217;s very versatile and I know it would let me capture just the video frame in a media player&#8230; if only I knew of a Windows player that could freely seek through and play back DV while de-interlacing and without deforming the video in any way.<\/p>\n<p>What about my original brainstorm- play back the DV file in any number of de-interlace-capable video players and press a hotkey for capturing screenshots? As mentioned, VLC can&#8217;t handle this. QuickTime Player really likes DV but insists on squeezing them horizontally on playback.<\/p>\n<p>How about the first multimedia program I ever hacked on &#8212; <a href=\"http:\/\/www.mplayerhq.hu\/\">MPlayer<\/a>. I installed it from the Ubuntu repository and it can&#8217;t seem to handle the DV stream. Strange. It seemed to be doing something with my CPU, just not showing me any video (or playing any audio). I tried some other, much more obscure file types (that I always have handy) and they looked fine. Then I played another, short, testing DV clip that I made and it worked. Using the -vf screenshot option, I was even able to capture screenshots in realtime (they were 720&#215;528 but looked okay). But that doesn&#8217;t do me much good if I can&#8217;t use it on certain clips I have that are an hour long. MPlayer also doesn&#8217;t provide very fine-grained seeking controls. Fortunately, SMPlayer solves that problem. But not if MPlayer can&#8217;t play the longer clip.<\/p>\n<p>I tried Totem which was able to play the audio but couldn&#8217;t render the video, same as Kino. I don&#8217;t know what backend it was using.<\/p>\n<p><strong>In Conclusion<\/strong><\/p>\n<p>Don&#8217;t think that this exercise was a total loss. I finally had an opportunity to survey a wide variety of end-user open source software programs that rely on FFmpeg, something I have been resolving to do for some time now. And I even found a few that aren&#8217;t mentioned on the <a href=\"http:\/\/ffmpeg.org\/projects.html\">master list<\/a> yet.<\/p>\n<p>I am still without an adequate solution. But I&#8217;m sure you have some ideas. Let&#8217;s hear &#8217;em. I still have at least 40 games from various consoles that I need to play and capture. For sport, <a href=\"http:\/\/multimedia.cx\/dv\/\">I sliced up a 40 MB portion of the DV stream in question and made it available for download<\/a>. Apple&#8217;s QuickTime Player can play it, so I assume it&#8217;s minimally valid. However, chopping the stream confuses VLC enough that it can&#8217;t handle it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You wouldn&#8217;t believe how hard it is to create an efficient workflow for capturing non-squished, de-interlaced screenshots from a DV stream<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[149],"class_list":["post-1055","post","type-post","status-publish","format-standard","hentry","category-general","tag-dv"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=1055"}],"version-history":[{"count":14,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1055\/revisions"}],"predecessor-version":[{"id":1083,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1055\/revisions\/1083"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=1055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=1055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=1055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}