{"id":11,"date":"2021-01-11T09:37:52","date_gmt":"2021-01-11T09:37:52","guid":{"rendered":"https:\/\/veltzer.net:8890\/?p=11"},"modified":"2021-01-11T09:38:49","modified_gmt":"2021-01-11T09:38:49","slug":"converting-videos-to-xvid-on-linux","status":"publish","type":"post","link":"https:\/\/veltzer.net:8890\/converting-videos-to-xvid-on-linux\/","title":{"rendered":"Converting videos to xvid on Linux"},"content":{"rendered":"\n

I wanted to convert some video files on my Linux system to the xvid codec so that I could see them on my PS3. The solution I found was using the mencoder package.<\/p>\n\n\n\n

#!\/bin\/bash\n \n# this script converts videos given to it to the xvid codec, IN PLACE,\n# this means it replaces the original files...\n \nfor x in \"$@\"; do\n    echo \"$x\"\n    y=\"$x.tmp\"\n    mencoder \"$x\" -ovc xvid -oac copy -xvidencopts fixed_quant=4 -o \"$y\"\n    ret=$?\n    if [[ $ret -eq 0 ]]; then\n        mv \"$y\" \"$x\"\n        ret=$?\n        if [[ $ret -ne 0 ]]; then\n            echo \"problem moving file $x\"\n            break\n        fi\n    else\n        echo \"problem converting file $x\"\n        break\n    fi\ndone<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

I wanted to convert some video files on my Linux system to the xvid codec so that I could see them on my PS3. The solution I found was using the mencoder package.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[4,8,9],"_links":{"self":[{"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/posts\/11"}],"collection":[{"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":1,"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":12,"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/posts\/11\/revisions\/12"}],"wp:attachment":[{"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/veltzer.net:8890\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}