{"id":4868,"date":"2014-03-30T16:10:58","date_gmt":"2014-03-30T16:10:58","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/need-a-video-format-that-will-play-on-windows-xp-7-out-of-the-box-collection-of-common-programming-errors\/"},"modified":"2014-03-30T16:10:58","modified_gmt":"2014-03-30T16:10:58","slug":"need-a-video-format-that-will-play-on-windows-xp-7-out-of-the-box-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/need-a-video-format-that-will-play-on-windows-xp-7-out-of-the-box-collection-of-common-programming-errors\/","title":{"rendered":"Need a video format that will play on Windows XP\/7 out of the box-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/PR8Bl.png?s=32&amp;g=1\" \/><br \/>\nArtOfWarfare<\/p>\n<p>I am distributing an exe file that contains a video that needs to be able to be played on Windows XP &amp; Windows 7 without ANY other software or codecs installed. This includes Windows Media Player, which many of my customers don&#8217;t have installed.<\/p>\n<p>Formats &#8211; bear with me, I mostly develop apps for other platforms. I don&#8217;t normally deal with a\/v stuff or Windows stuff so my terminology is probably off &#8211; I&#8217;ve tried and had no success with:<\/p>\n<ul>\n<li>.mp4<\/li>\n<li>.ogv<\/li>\n<li>.wmv (ironic, isn&#8217;t it?)<\/li>\n<\/ul>\n<p>I have been able to play the video in a .mpg format, but it has two issues:<\/p>\n<ul>\n<li>Audio doesn&#8217;t play<\/li>\n<li>The file is really big. It&#8217;s 80 MB and I&#8217;d rather have it be no more than 30 MB. I&#8217;m okay with putting it in a zip to keep the size down, but that only gets it down to 50 MB.<\/li>\n<\/ul>\n<p>When I open the file on my Mac, it plays, audio and all.<\/p>\n<p>This is what the QuickTime X movie inspector says about the file format:<\/p>\n<pre><code>MPEG-1 Video, 1,280 x 720\nMPEG Layer 3, 48000 Hz, Stereo (L R)\n<\/code><\/pre>\n<p>I&#8217;d like an FFMPEG command that I can feed my video to and end up with an outputted file that will play on Windows 7, both audio and visual, without any dependencies on other codecs or applications. I&#8217;d like it if it also played on fresh installs of Windows XP although I can live with it if it doesn&#8217;t, and ideally I&#8217;d like it to also be within my size constraints.<\/p>\n<p>Edit with details on the output of ffmpeg when I attempted to follow Darth Android&#8217;s answer:<\/p>\n<pre><code>ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers\nbuilt on Aug 15 2013 10:56:46 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)\nconfiguration: --prefix=\/Volumes\/Ramdisk\/sw --enable-gpl --enable-pthreads\n--enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx\n--enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264\n--enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb\n--enable-filters --enable-libgsm --arch=x86_64 --enable-runtime-cpudetect\n\nlibavutil      52. 38.100 \/ 52. 38.100\nlibavcodec     55. 18.102 \/ 55. 18.102\nlibavformat    55. 12.100 \/ 55. 12.100\nlibavdevice    55.  3.100 \/ 55.  3.100\nlibavfilter     3. 79.101 \/  3. 79.101\nlibswscale      2.  3.100 \/  2.  3.100\nlibswresample   0. 17.102 \/  0. 17.102\nlibpostproc    52.  3.100 \/ 52.  3.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from 'my-video.mp4':\nMetadata:\nmajor_brand     : mp42\nminor_version   : 0\ncompatible_brands: mp42isomavc1\ncreation_time   : 2013-06-10 18:21:11\nencoder         : HandBrake 0.9.9 2013051800\nDuration: 00:01:33.95, start: 0.000000, bitrate: 954 kb\/s\nStream #0:0(und): Video: h264 (Main) (avc1 \/ 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 813 kb\/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc\nMetadata:\n  creation_time   : 2013-06-10 18:21:11\nStream #0:1(eng): Audio: aac (mp4a \/ 0x6134706D), 48000 Hz, stereo, fltp, 136 kb\/s\nMetadata:\n  creation_time   : 2013-06-10 18:21:11\n[vob @ 0x7f8278821000] VBV buffer size not set, muxing may fail\nOutput #0, vob, to 'my-video.mpg':\nMetadata:\nmajor_brand     : mp42\nminor_version   : 0\ncompatible_brands: mp42isomavc1\nencoder         : Lavf55.12.100\nStream #0:0(und): Video: mpeg2video, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb\/s, 90k tbn, 29.97 tbc\nMetadata:\n  creation_time   : 2013-06-10 18:21:11\nStream #0:1(eng): Audio: mp2, 48000 Hz, stereo, s16, 128 kb\/s\nMetadata:\n  creation_time   : 2013-06-10 18:21:11\nStream mapping:\nStream #0:0 -&gt; #0:0 (h264 -&gt; mpeg2video)\nStream #0:1 -&gt; #0:1 (aac -&gt; mp2)\nPress [q] to stop, [?] for help\nframe=  182 fps=0.0 q=24.8 size=     528kB time=00:00:06.25 bitrate= 691.6kbits\nframe=  380 fps=379 q=31.0 size=    1076kB time=00:00:12.97 bitrate= 679.4kbits\nframe=  548 fps=364 q=31.0 size=    1704kB time=00:00:18.49 bitrate= 754.8kbits\nframe=  692 fps=345 q=31.0 size=    2390kB time=00:00:23.26 bitrate= 841.4kbits\nframe=  815 fps=325 q=31.0 size=    3170kB time=00:00:27.30 bitrate= 951.2kbits\nframe=  950 fps=316 q=24.8 size=    4146kB time=00:00:31.78 bitrate=1068.4kbits\nframe= 1079 fps=307 q=31.0 size=    5154kB time=00:00:36.13 bitrate=1168.5kbits\nframe= 1242 fps=309 q=31.0 size=    5868kB time=00:00:41.65 bitrate=1154.0kbits\nframe= 1413 fps=313 q=31.0 size=    6586kB time=00:00:47.31 bitrate=1140.2kbits\nframe= 1587 fps=316 q=31.0 size=    7346kB time=00:00:53.14 bitrate=1132.2kbits\nframe= 1753 fps=318 q=31.0 size=    8026kB time=00:00:58.66 bitrate=1120.7kbits\nframe= 1925 fps=320 q=31.0 size=    8798kB time=00:01:04.35 bitrate=1119.9kbits\nframe= 2091 fps=321 q=31.0 size=    9646kB time=00:01:10.02 bitrate=1128.5kbits\nframe= 2226 fps=317 q=31.0 size=   10484kB time=00:01:14.48 bitrate=1153.0kbits\nframe= 2386 fps=317 q=31.0 size=   11232kB time=00:01:19.86 bitrate=1152.1kbits\nframe= 2554 fps=318 q=31.0 size=   11852kB time=00:01:25.40 bitrate=1136.8kbits\nframe= 2759 fps=324 q=31.0 size=   12396kB time=00:01:32.14 bitrate=1102.0kbits\nframe= 2813 fps=325 q=31.0 Lsize=   12546kB time=00:01:33.94 bitrate=1094.0kbits\/s    \nvideo:10904kB audio:1468kB subtitle:0 global headers:0kB muxing overhead 1.402856%\n<\/code><\/pre>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0645cc3e83aadbe416dc7262aa12b193?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDarth Android<\/p>\n<p>Try:<\/p>\n<pre><code>ffmpeg.exe -i \"C:\/Path\/to\/your\/video.mkv\" -vcodec mpeg2video -acodec mp2 -f vob -y \"C:\/Path\/to\/output\/video.mpg\" \n<\/code><\/pre>\n<p>where <code>video.mkv<\/code> is your source file and and <code>video.mpg<\/code> is your output.<\/p>\n<p><code>-vcodec mpeg2video<\/code> sets the output video format to MPEG2<br \/>\n<code>-acodec mp2<\/code> sets the output audio format to MPEG2 <code>-f vob<\/code> sets the output container\/file format to Vob (*.mpg)<br \/>\n<code>-y<\/code> overwrites target file.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/PR8Bl.png?s=32&amp;g=1\" \/><br \/>\nArtOfWarfare<\/p>\n<p>I finally found a format that worked for me on a fresh install of Windows 7 without Windows Media Player or any other codecs:<\/p>\n<pre><code>MPEG-1 Video, 1,280 x 720\nMPEG Layer 3, 48000 Hz, Mono\n<\/code><\/pre>\n<p>(Note the only change was from Stereo to Mono compared to what I had been using when I first posted the question.)<\/p>\n<p>To get it I typed:<\/p>\n<pre><code>ffmpeg -i my-video.mp4 -vcodec mpeg1video -acodec mp2 -ac 1 -f vob my-video-mono.mpg\n<\/code><\/pre>\n<p>I&#8217;d like to thank Darth Android whose answer greatly helped me with learning more about the arguments I needed to provide to ffmpeg.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>ArtOfWarfare I am distributing an exe file that contains a video that needs to be able to be played on Windows XP &amp; Windows 7 without ANY other software or codecs installed. This includes Windows Media Player, which many of my customers don&#8217;t have installed. Formats &#8211; bear with me, I mostly develop apps for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4868","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4868"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4868\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}