<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; CMD/BAT: Снимок с web-камеры]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8088&amp;type=atom" />
	<updated>2013-03-04T14:05:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8088</id>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69929#p69929" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DnsIs пишет:</cite><blockquote><p>Сегодня еще вечером потрепал ffmpeg-20130217-git-b8bb661-win32-shared - версию, в которой dll ки скомпилены отдельно. Что заинтерисовало:</p><div class="codebox"><pre><code>ffmpeg.exe -f dshow -i video=&quot;Philips SPC 1030NC Webcam&quot; -s 1280x1024 out.mp4</code></pre></div><p>Делает захват в разрешении 640*480 растянутом до 1280*1024, а вот<br /></p><div class="codebox"><pre><code>ffplay.exe -f dshow -i video=&quot;Philips SPC 1030NC Webcam&quot; -s 1280x1024</code></pre></div><p>Захватывает в честном 1280*1024.</p><p>У кого-нибудь есть мысли по поводу ffmpeg, ffplay?</p></blockquote></div><br /><p>Мужики, смотрите что мне на эту загадку ответили на хабре.<br /></p><div class="quotebox"><blockquote><p>Проблема достаточно странная, но обсуждаемая на зарубежных форумах у ffmpeg&#039;а есть конкретное представление о входных параметрах и о параметрах того что должно получиться на выходе. Так, если Вы укажете -s 1280x1024 до -i — тоже получите желаемый результат захвата без растягивания.</p><p>т.е.<br />ffmpeg.exe -f dshow -s 1280x1024 -i video=«Philips SPC 1030NC Webcam» out.mp4<br />ffmpeg -f video4linux2 -s 1280x1024 -i /dev/video0 out.mp4</p></blockquote></div><p>Проверил, работает. Ура!</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2013-03-04T14:05:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69929#p69929</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69690#p69690" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DnsIs пишет:</cite><blockquote><p>Пока курил маны к Mplayer, наткнулся на список разработчиков, и оказалось, что ответственный за TV-модуль разработчик, Владимир Ворошилов, живет со мной в одном городе - Омске. Я очень удивился и обрадовался. Написал ему, отправил отладочную информацию + лог с версии Mplayer-debug и получил ответ.</p><p>Баг, был. За 2 дня, с третьей попытки, я получил рабочий Mplayer.</p></blockquote></div><p>Бывает <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" />. Передавайте ему наши искренние благодарности и наилучшие пожелания в дальнейшей работе.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2013-02-21T17:22:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69690#p69690</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69689#p69689" />
			<content type="html"><![CDATA[<p>Ну вот и решилась моя задачка.</p><p>Все таки сделать скриншоты с камеры монстром VLC не очень понравилось, стал копать дальше.<br />Сначала решил отступиться от желания сделать кроссплатформенный вариант, стал рассматривать предложенный alexii-ом путь, через WIA. Ничего не вышло.</p><p>Пока курил маны к Mplayer, наткнулся на список разработчиков, и оказалось, что ответственный за TV-модуль разработчик, Владимир Ворошилов, живет со мной в одном городе - Омске. Я очень удивился и обрадовался. Написал ему, отправил отладочную информацию + лог с версии Mplayer-debug и получил ответ.<br />Баг, был. За 2 дня, с третьей попытки, я получил рабочий Mplayer.<br />Оказалось что Владимир очень отзывчивый и грамотный человек. Огромнейшее ему спасибо.</p><p>Еще я вспомнил прогу <a href="http://preyproject.com/download">Prey</a>, в которой естьвозможность снятия скриншотов с камеры. Покопался в архиве и нашел таки там утилиту (17Кб-exe + 300Кб-dll), которая без лишних вопросов делает снимок с камеры.</p><p>Сегодня еще вечером потрепал ffmpeg-20130217-git-b8bb661-win32-shared - версию, в которой dll ки скомпилены отдельно. Что заинтерисовало:</p><div class="codebox"><pre><code>ffmpeg.exe -f dshow -i video=&quot;Philips SPC 1030NC Webcam&quot; -s 1280x1024 out.mp4</code></pre></div><p>Делает захват в разрешении 640*480 растянутом до 1280*1024, а вот<br /></p><div class="codebox"><pre><code>ffplay.exe -f dshow -i video=&quot;Philips SPC 1030NC Webcam&quot; -s 1280x1024</code></pre></div><p>Захватывает в честном 1280*1024.</p><p>У кого-нибудь есть мысли по поводу ffmpeg, ffplay?</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2013-02-21T16:46:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69689#p69689</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69673#p69673" />
			<content type="html"><![CDATA[<p>Наверное, никуда <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" />.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2013-02-20T18:57:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69673#p69673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69670#p69670" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p><strong>DnsIs</strong>, а скриптом через WIA — не пробовали?</p></blockquote></div><div class="codebox"><pre><code>var Device = new ActiveXObject(&quot;WIA.DeviceManager&quot;);
WScript.Echo(Device.DeviceInfos.Count);</code></pre></div><p>Получаю &quot;0&quot;</p><p>Куда копать?</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2013-02-20T16:09:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69670#p69670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69607#p69607" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DnsIs пишет:</cite><blockquote><p>Стыдно признать, но я не до конца понимаю вообще логику построения командной строки этого загадочного VLC.</p></blockquote></div><p>Аналогично... <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Может быть:<br /></p><div class="codebox"><pre><code>
  -d, --daemon, --no-daemon      Запускать в фоне (по умолчанию
                                 выключено)
          Запускать VLC как фоновый процесс. (по умолчанию
          выключено)
      --pidfile &lt;строка&gt;   Записывать идентификатор процесса
                                 в файл
          Записывает идентификатор процесса в указанный
          файл.
</code></pre></div><p>Вообще, в составе <strong>vlc</strong> должен быть <strong>cvlc</strong> <em>(справедливо для Linux)</em>.</p>]]></content>
			<author>
				<name><![CDATA[UNDYING]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27822</uri>
			</author>
			<updated>2013-02-18T08:57:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69607#p69607</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69601#p69601" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p><strong>DnsIs</strong>, а скриптом через WIA — не пробовали?</p></blockquote></div><p>Хотелось кроссплатформенное решение.</p><p><strong>2UNDYING</strong>, курил я <a href="http://wiki.videolan.org/VLC_command-line_help%20">wiki.videolan</a>, но больше <strong>--full-help</strong>.<br />Я пробовал с <strong>-V image</strong>, оно не работает, я думал что я туплю. </p><p>Так вот работает, но выскакивает окошко VLC, которого бы видеть не хотелось.<br /></p><div class="codebox"><pre><code>dshow://  :dshow-vdev=&quot;Philips SPC 1030NC Webcam&quot; :dshow-adev=none  :live-caching=300
--start-time 0
--stop-time 1
--scene-ratio=30
--play-and-exit
--scene-format=jpg
--scene-prefix=snap
--scene-path=&quot;c:\tmp&quot;
--video-filter=scene
--vout=dummy</code></pre></div><p>Стыдно признать, но я не до конца понимаю вообще логику построения командной строки этого загадочного VLC.</p><p>Беру например такую строку:<br /></p><div class="codebox"><pre><code>vlc --rotate-angle=90 INPUT-VIDEO</code></pre></div><p>Мечтаю получить повернутое изображение. А вот фиг, не работает.</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2013-02-18T07:12:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69601#p69601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69591#p69591" />
			<content type="html"><![CDATA[<p>Доброго.<br /></p><div class="quotebox"><blockquote><p>Но сделать снимок и вырубить VLC не получается.</p><p>Дайте советы, плз. Может есть еще какие-нибудь инструменты?</p></blockquote></div><p><a href="http://wiki.videolan.org/VLC_command-line_help">http://wiki.videolan.org/VLC_command-line_help</a> или <strong>&quot;vlc -H&quot;</strong><br /></p><div class="quotebox"><blockquote><p>Snapshot:<br />&nbsp; &nbsp; &nbsp;<strong> --snapshot-path</strong>=&lt;string&gt;&nbsp; &nbsp;Video snapshot directory (or filename)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Directory where the video snapshots will be stored.<br />&nbsp; &nbsp; &nbsp; <strong>--snapshot-prefix</strong>=&lt;string&gt; Video snapshot file prefix<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Video snapshot file prefix<br />&nbsp; &nbsp; &nbsp;<strong> --snapshot-format</strong>={png,jpg}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Video snapshot format<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Image format which will be used to store the video snapshots<br />&nbsp; &nbsp; &nbsp; --snapshot-preview, <strong>--no-snapshot-preview</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Display video snapshot preview (default<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enabled)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display the snapshot preview in the screen&#039;s top-left corner.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (default enabled)<br />&nbsp; &nbsp; &nbsp; --snapshot-sequential, --no-snapshot-sequential<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Use sequential numbers instead of timestamps<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(default disabled)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Use sequential numbers instead of timestamps for snapshot numbering<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (default disabled)<br />&nbsp; &nbsp; &nbsp; <strong>--snapshot-width</strong>=&lt;integer [-2147483648 .. 2147483647]&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Video snapshot width<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; You can enforce the width of the video snapshot. By default it will<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; keep the original width (-1). Using 0 will scale the width to keep<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the aspect ratio.<br />&nbsp; &nbsp; &nbsp; <strong>--snapshot-height</strong>=&lt;integer [-2147483648 .. 2147483647]&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Video snapshot height<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; You can enforce the height of the video snapshot. By default it will<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; keep the original height (-1). Using 0 will scale the height to keep<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the aspect ratio.</p></blockquote></div><p>Вырубить vlc по окончанию:<br /></p><div class="quotebox"><blockquote><p>Playlist<br /> These options define the behavior of the playlist. Some of them can be overridden in the playlist dialog box.<br />&nbsp; -Z, --random, --no-random&nbsp; &nbsp; &nbsp; Play files randomly forever (default disabled)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VLC will randomly play files in the playlist until interrupted.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (default disabled)<br />&nbsp; -L, --loop, --no-loop&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Repeat all (default disabled)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VLC will keep playing the playlist indefinitely. (default disabled)<br />&nbsp; -R, --repeat, --no-repeat&nbsp; &nbsp; &nbsp; Repeat current item (default disabled)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VLC will keep playing the current playlist item. (default disabled)<br />&nbsp; &nbsp; &nbsp; <strong>--play-and-exit,</strong> --no-play-and-exit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Play and exit (default disabled)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit if there are no more items in the playlist. (default disabled)<br />&nbsp; &nbsp; &nbsp; --play-and-stop, --no-play-and-stop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Play and stop (default disabled)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Stop the playlist after each played playlist item. (default disabled)<br />&nbsp; &nbsp; &nbsp; --play-and-pause, --no-play-and-pause</p></blockquote></div><p>Возможно придётся поискать сам vlc поновее(или наоборот - древнее) или самому собрать.<br />Кстати, по англоязычным форумам говорят, что вывод в картинку (раскадровку, ключ <strong>&quot; -V image&quot;</strong>) в <span class="bbu">текущем(!)</span> <strong>vlc</strong> поломали.</p><p>Хотя в таком виде работает (фильтр <strong>scene</strong>, <strong>VLC 2.0.5, ArchLinux</strong>):<br /></p><div class="codebox"><pre><code>%&gt; cvlc &quot;1.Robot-policeyskiy.1987.DivX.DVDRip..avi&quot; --start-time 15 --stop-time 16 --play-and-exit --scene-format=png --scene-ratio=30 --scene-prefix=snap --scene-path=$(pwd) --video-filter=scene --vout=dummy
%&gt; ls
1.Robot-policeyskiy.1987.DivX.DVDRip..avi  snap00001.png
</code></pre></div><p>Поиграйтесь с настройками <strong>--start-time, --stop-time, --scene-ratio</strong></p>]]></content>
			<author>
				<name><![CDATA[UNDYING]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27822</uri>
			</author>
			<updated>2013-02-17T17:51:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69591#p69591</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69590#p69590" />
			<content type="html"><![CDATA[<p><strong>DnsIs</strong>, а скриптом через WIA — не пробовали?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2013-02-17T17:16:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69590#p69590</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[CMD/BAT: Снимок с web-камеры]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69586#p69586" />
			<content type="html"><![CDATA[<p>Доброго дня.<br />Не получается сделать полноценный скриншот с камеры.<br /></p><div class="codebox"><pre><code>
mplayer.exe tv:// -tv device=0 -ss 5 -frames 1 -vo jpeg:quality=100 -vf scale=1280:1024
mplayer.exe tv:// -tv device=0:width=1280:height=1024 -vf screenshot -frames 1 -vo png
ffmpeg.exe -f dshow -i video=&quot;Philips SPC 1030NC Webcam&quot; -s 1280x1024 -f image2 000.jpg</code></pre></div><p>Все эти способы делают снимок в разрешени 640*480.</p><p>Mplayer пишет<br /></p><div class="codebox"><pre><code>tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
Error: Cannot set norm!
Unable to set requested width: 1280
Unable to set requested height: 1024
Selected input hasn&#039;t got a tuner!</code></pre></div><p>При открыти камеры в <a href="http://www.videolan.org/vlc/">VLC</a>, изображение идет в разрешении 1280*1024. Причем в реальном разрешении, а не в масштабированном.<br />Могу конечно открыть камеру из командной строки так вот.<br /></p><div class="codebox"><pre><code>vlc.exe dshow://  :dshow-vdev=Philips SPC 1030NC Webcam :dshow-adev=none  :live-caching=300</code></pre></div><p>Но сделать снимок и вырубить VLC не получается.</p><p>Дайте советы, плз. Может есть еще какие-нибудь инструменты?</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2013-02-17T16:00:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69586#p69586</id>
		</entry>
</feed>
