{"id":1396,"date":"2008-04-21T23:04:21","date_gmt":"2008-04-22T04:04:21","guid":{"rendered":"http:\/\/granades.com\/?p=1396"},"modified":"2009-05-27T08:56:33","modified_gmt":"2009-05-27T13:56:33","slug":"sony-vegas-change-pixel-aspect-ratio","status":"publish","type":"post","link":"https:\/\/granades.com\/?p=1396","title":{"rendered":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images"},"content":{"rendered":"<p>I spent far too long getting this to work <i>again<\/i> because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on <i>Battlestar Galactica<\/i>. So for anyone else who might need this, I give you a Sony Vegas script to change the pixel aspect ratio of all images in your media pool, written in C#.<\/p>\n<pre>\r\n<code>\r\n\/**\r\n * This script sets the Pixel Aspect Ratio of all images to be 0.9091.\r\n *\r\n * Author: Stephen Granade      Date: 21 April 2008\r\n **\/\r\n\r\nusing System.Text.RegularExpressions;\r\nusing Sony.Vegas;\r\n\r\npublic class EntryPoint {\r\n  public void FromVegas(Vegas vegas) {\r\n    foreach (Media media in vegas.Project.MediaPool) {\r\n      Match m = Regex.Match(media.FilePath, \"(jpe?g|png|gif)\");\r\n      if (m.Success) {\r\n        VideoStream vs = media.GetVideoStreamByIndex(0);\r\n        vs.PixelAspectRatio = 0.9091;\r\n      }\r\n    }\r\n  }\r\n}\r\n<\/code>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony &hellip; <a href=\"https:\/\/granades.com\/?p=1396\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Sony Vegas Script to Change the Pixel Aspect Ratio of Images<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-1396","post","type-post","status-publish","format-standard","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/granades.com\/?p=1396\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Live Granades - Just another WordPress site\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades\" \/>\n\t\t<meta property=\"og:description\" content=\"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/granades.com\/?p=1396\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2008-04-22T04:04:21+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2009-05-27T13:56:33+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#blogposting\",\"name\":\"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades\",\"headline\":\"Sony Vegas Script to Change the Pixel Aspect Ratio of Images\",\"author\":{\"@id\":\"https:\\\/\\\/granades.com\\\/?author=3#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/granades.com\\\/#organization\"},\"datePublished\":\"2008-04-21T23:04:21+00:00\",\"dateModified\":\"2009-05-27T08:56:33+00:00\",\"inLanguage\":\"en-US\",\"commentCount\":10,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#webpage\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/granades.com\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/granades.com\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#listItem\",\"name\":\"Sony Vegas Script to Change the Pixel Aspect Ratio of Images\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#listItem\",\"position\":2,\"name\":\"Sony Vegas Script to Change the Pixel Aspect Ratio of Images\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/granades.com\\\/#listItem\",\"name\":\"Home\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/granades.com\\\/#organization\",\"name\":\"Live Granades\",\"description\":\"Just another WordPress site\",\"url\":\"https:\\\/\\\/granades.com\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/granades.com\\\/?author=3#author\",\"url\":\"https:\\\/\\\/granades.com\\\/?author=3\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#webpage\",\"url\":\"https:\\\/\\\/granades.com\\\/?p=1396\",\"name\":\"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades\",\"description\":\"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/granades.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/granades.com\\\/?p=1396#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/granades.com\\\/?author=3#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/granades.com\\\/?author=3#author\"},\"datePublished\":\"2008-04-21T23:04:21+00:00\",\"dateModified\":\"2009-05-27T08:56:33+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/granades.com\\\/#website\",\"url\":\"https:\\\/\\\/granades.com\\\/\",\"name\":\"Live Granades\",\"description\":\"Just another WordPress site\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/granades.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades","description":"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony","canonical_url":"https:\/\/granades.com\/?p=1396","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/granades.com\/?p=1396#blogposting","name":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades","headline":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images","author":{"@id":"https:\/\/granades.com\/?author=3#author"},"publisher":{"@id":"https:\/\/granades.com\/#organization"},"datePublished":"2008-04-21T23:04:21+00:00","dateModified":"2009-05-27T08:56:33+00:00","inLanguage":"en-US","commentCount":10,"mainEntityOfPage":{"@id":"https:\/\/granades.com\/?p=1396#webpage"},"isPartOf":{"@id":"https:\/\/granades.com\/?p=1396#webpage"}},{"@type":"BreadcrumbList","@id":"https:\/\/granades.com\/?p=1396#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/granades.com\/#listItem","position":1,"name":"Home","item":"https:\/\/granades.com\/","nextItem":{"@type":"ListItem","@id":"https:\/\/granades.com\/?p=1396#listItem","name":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images"}},{"@type":"ListItem","@id":"https:\/\/granades.com\/?p=1396#listItem","position":2,"name":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images","previousItem":{"@type":"ListItem","@id":"https:\/\/granades.com\/#listItem","name":"Home"}}]},{"@type":"Organization","@id":"https:\/\/granades.com\/#organization","name":"Live Granades","description":"Just another WordPress site","url":"https:\/\/granades.com\/"},{"@type":"Person","@id":"https:\/\/granades.com\/?author=3#author","url":"https:\/\/granades.com\/?author=3"},{"@type":"WebPage","@id":"https:\/\/granades.com\/?p=1396#webpage","url":"https:\/\/granades.com\/?p=1396","name":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades","description":"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/granades.com\/#website"},"breadcrumb":{"@id":"https:\/\/granades.com\/?p=1396#breadcrumblist"},"author":{"@id":"https:\/\/granades.com\/?author=3#author"},"creator":{"@id":"https:\/\/granades.com\/?author=3#author"},"datePublished":"2008-04-21T23:04:21+00:00","dateModified":"2009-05-27T08:56:33+00:00"},{"@type":"WebSite","@id":"https:\/\/granades.com\/#website","url":"https:\/\/granades.com\/","name":"Live Granades","description":"Just another WordPress site","inLanguage":"en-US","publisher":{"@id":"https:\/\/granades.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"Live Granades - Just another WordPress site","og:type":"article","og:title":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades","og:description":"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony","og:url":"https:\/\/granades.com\/?p=1396","article:published_time":"2008-04-22T04:04:21+00:00","article:modified_time":"2009-05-27T13:56:33+00:00","twitter:card":"summary","twitter:title":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images - Live Granades","twitter:description":"I spent far too long getting this to work again because I forgot to transfer the script from one computer to another, and all of the web references to this technique are, shall we say, broken like a character on Battlestar Galactica. So for anyone else who might need this, I give you a Sony"},"aioseo_meta_data":{"post_id":"1396","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-06-25 23:57:39","updated":"2025-11-03 05:53:17","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/granades.com\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSony Vegas Script to Change the Pixel Aspect Ratio of Images\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/granades.com\/"},{"label":"Sony Vegas Script to Change the Pixel Aspect Ratio of Images","link":"https:\/\/granades.com\/?p=1396"}],"_links":{"self":[{"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts\/1396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1396"}],"version-history":[{"count":1,"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts\/1396\/revisions"}],"predecessor-version":[{"id":2936,"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts\/1396\/revisions\/2936"}],"wp:attachment":[{"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}