{"id":248,"date":"2014-01-04T23:33:45","date_gmt":"2014-01-04T22:33:45","guid":{"rendered":"http:\/\/frosteyes.dk\/?p=248"},"modified":"2021-06-01T21:56:39","modified_gmt":"2021-06-01T20:56:39","slug":"preparing-video-for-editing","status":"publish","type":"post","link":"http:\/\/www.frosteyes.dk\/index.php\/linux\/preparing-video-for-editing","title":{"rendered":"Preparing video for editing"},"content":{"rendered":"<p>I had the pleasure to work with some video editing resently. The background is that my sister got some 8mm cine film from our youth converted to a DVD. As this DVD contains clip from many different 8mm cine films mixed together, I would like to split them up and be able to combine them in a new way.<\/p>\n<p>I got the DVD as a dmg image from a mac, so the first thing was to see what kind of dmg image it was.<\/p>\n<pre lang=\"bash\">xxx@stas ~\/Delta $ file film-compressed.dmg\nfilm-compressed.dmg: VAX COFF executable - version 8343<\/pre>\n<p>This type is a compressed image, so the first thing I need is to decompress it. For this a tool named <a title=\"dmg2img link\" href=\"http:\/\/vu1tur.eu.org\/tools\" target=\"_blank\" rel=\"noopener\">dmg2img<\/a> is available in the Gentoo portage tree.<\/p>\n<pre lang=\"bash\">dmg2img -v film-compressed.dmg film-uncompressed.iso<\/pre>\n<p>Then I can mount the image and copy the contents out. Now I have the raw data for my videos<\/p>\n<pre lang=\"bash\">sudo mount -o loop -t auto film-uncompressed.iso isoMount<\/pre>\n<p>Though was the vob files with error in the form of wrong length. Opening a file in vlc or another tool indicated a length of 9 seconds even though the clip was 3 minutes long. I fixed it together with a conversion using ffmpeg. So a quick script later, my computer was working on the conversion.<\/p>\n<pre lang=\"bash\">#!\/bin\/bash\n\nFILES=.\/isoContents\/VIDEO_TS\/*1.VOB\n\nfor f in $FILES\ndo\n    OUTPUT_FILE=`echo $f | cut -f 4 -d \"\/\" | cut -f 1 -d \".\"`\n    OUTPUT_FILE=\".\/mp4Files\/${OUTPUT_FILE}.mp4\"\n    echo \"Outputfile $OUTPUT_FILE\"\n    ffmpeg -i $f -sameq -vcodec libx264 -acodec libfaac $OUTPUT_FILE\ndone<\/pre>\n<p>Now I have prepared my data, and is ready to do the editing. For this I use <a href=\"http:\/\/www.kdenlive.org\/\" target=\"_blank\" rel=\"noopener\">kdenlive<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had the pleasure to work with some video editing resently. The background is that my sister got some 8mm cine film from our youth converted to a DVD. As this DVD contains clip from many different 8mm cine films mixed together, I would like to split them up and be able to combine them &hellip; <a href=\"http:\/\/www.frosteyes.dk\/index.php\/linux\/preparing-video-for-editing\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Preparing video for editing<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":4,"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":573,"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/posts\/248\/revisions\/573"}],"wp:attachment":[{"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.frosteyes.dk\/index.php\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}