📜 ⬆️ ⬇️

Program to record the broadcast of elections with webvyboryedg.ru

On Sunday, civic-filled voters will wear holiday outfits and go to the polls. Who to watch, and someone, perhaps, just vote. People will want to capture this exciting and rare moment of their lives.
If you do not have your own photo-video equipment and you are a fan of strange angles, this article is for you.

Specifications


The program is designed to record video from the site webvyboryedg.ru.
Interface console. It is possible to run on a schedule.
Support work through a proxy.
It is possible to customize the size of saved video segments.

How to use it?


Check that you have Java installed. If not, install from java.com or c www.oracle.com/technetwork/java/javase/downloads/index.html select JRE.

On the site webvyboryedg.ru choose the desired site.
')
Now you need to get a pair (server ip and camera cid). There are three ways.

The first
In the address bar of the browser you can see the site id (http://webvyboryedg.ru/#precinct/12345, 12345 is the site id).

In the address bar, enter the address webvyboryedg.ru/account/channels?station_id=12345. You get a file in which there are pairs: server ip and camera cid.

The second way to get a pair (server ip and camera cid).
When the broadcast begins, use the browser console (F12 call), see the address from which the video is coming.






To run the program, three parameters are required: the camera name (for example, uik12345cam1), the server ip-address (for example, 188.8.8.8) and the camera id (for example, 9096138f-4687-11e2-bce6-048d7b47db12). Name the camera yourself. It will be added to the name of the output file. Therefore, write without spaces and without special characters to avoid errors with the file system (for example, uik12345cam1, where 12345 is the site id). By this name it will be then easier to understand the recorded one. In addition, this option will eliminate the name conflict if you write from different cameras to one directory.

Make sure there is enough disk space. One hour of broadcasting (640x480) from one camera takes about 60 MB.

Make sure that there are rights to write to the folder where the program will be launched.

Make sure you have Java installed. Open a command prompt (in Windows, the Win + R keyboard shortcut). Type the java command. Press Enter should appear a lot of text. If the command is not found, install Java from http://java.com .

Run the program from the command line:
  java -jar webvyboryRecord.jar uik12345cam1 188.8.8.8 9096138f-4687-11e2-bce6-048d7b47db12 

If the parameters are specified incorrectly, examples will be shown.
 Identify at least 3 parameters: UIK name, server ip and camera id(cid) Examples: java -jar webvyboryRecord.jar uik12345cam1 188.8.8.8 9096138f-4687-11e2-bce6-048d7b47db12 With proxy: java -jar webvyboryRecord.jar uik12345cam1 188.8.8.8 9096138f-4687-11e2-bce6-048d7b47db12 -proxy 127.0.0.1:8080 Identify file length in minutes (default 60) java -jar webvyboryRecord.jar uik12345cam1 188.8.8.8 9096138f-4687-11e2-bce6-048d7b47db12 60 java -jar webvyboryRecord.jar uik12345cam1 188.8.8.8 9096138f-4687-11e2-bce6-048d7b47db12 -proxy 127.0.0.1:8080 60 
The order of the parameters is strictly required.

After starting the program, the lines will appear
 Create new file: vybory_uik12345cam1_02_094048.ts Added new segment: http://188.254.112.34/hls/09626089-641a-aaaa-aaaa-bcad28d07aaf/1474219561.02-1474219577.66.ts?input=ele-production Added new segment: http://188.254.112.34/hls/09626089-641a-aaaa-aaaa-bcad28d07aaf/1474219577.66-1474219594.35.ts?input=ele-production 

The following file format will be created in the program directory.
 vybory_<_>_<>_<>.ts 

Time indicates the beginning of the episode in the file. If it costs 04_080100, then you managed to quickly start recording and in this file you can see how the first voters are run at the polling station, and the ballot boxes are empty.
In this video file (15 fps, h264) and possibly audio (25 kb / s, aac).

The last file is recorded until it reaches the specified size for the duration of the broadcast. By default, a new file is created every hour. Do not touch the last file, it is written to.

What could be the problem?


On election day, the broadcast will work according to a different scheme.


Alas, the program most likely will not work. We will get out and rewrite the code.

Enemies have stolen the Internet


Messages will appear
 Can't get M3U file: http://188.8.8.8/variant.m3u8?cid=9096138f-4687-11e2-bce6-048d7b47db12&var=orig 
This will be until the Internet is returned. After that, the recording continues. Restart the program is not necessary.
If the lines do not appear, and there is translation on the site, the program is still frozen.

Withdrawing write access to a file or directory


Messages will appear
 Can't open file: vybory2012_uik12345cam1_02_194048.ts(vybory2012_uik12345cam1_02_194048.ts (  )) Create new file: vybory2012_uik12345cam1_02_194605.ts 
Perhaps you are trying to view or re-encode the file being created, and a third-party program has taken exclusive access to it. It became impossible to add to it.
Do not be nonsense. You will have plenty of time. Go to the polls. Let the program work. She will try to create a new file and write to it. After the access to the directory is returned, the recording will continue to the new file.

Did not calculate the disk space, and it ended


Messages will appear
 Can't record segment: http://188.8.8.8/segment.ts?cid=9096138f-4687-11e2-bce6-048d7b47db12&var=orig&ts=1330775193.95-1330775209.01 (   ) Can't open file: vybory2012_uik12345cam1_02_205522.ts(vybory2012_uik12345cam1_02_205522.ts (   )) Creat new file: vybory2012_uik12345cam1_02_205537.ts 
Move any files to another disk. When space appears, recording continues. The program does not need to restart.

In the name of the files being created, the time is an hour behind.


This problem was mentioned in Q & A. Your computer and time do not affect it. The time is taken from the address of the segment to be received (http://188.254.112.34/hls/09626089-641a-aaaaaaaaa-bcad28d07aaf/1474219952.75-1474219969.45 .ts? Input = ele-production). The last two numbers indicate the time range during which this video was recorded (about 15 seconds).

The program is frozen. New lines do not appear.


The program continues to work. She downloads the M3U playlist with links to segments, and there it’s empty.
 #EXTM3U #EXT-X-MEDIA-SEQUENCE:1050 #EXT-X-TARGETDURATION:15 #EXT-X-ALLOW-CACHE:NO 
It is possible that the broadcast was suspended until the closure of sites in the Kaliningrad region. Perhaps, problems with PAK. You can restart the program if it becomes easier for you.

Where is the “Download” link?


And here is the link: Download .
Source code: http://bitbucket.org/qwertovsky/webvybory2012recorder .

UPD 02_210900: The site has been updated again. Now, instead of the server's IP address, you can see the domain name of the form 188-8-8-8.webvybory2012.ru. It can be fed to the program too.
Already, you can stumble upon working cameras in your city.

UPD 03_1100: The program must already be finalized (in progress). Keep for updates.
Evgeny Boger published a list of sites and id cameras. In the first column of this list is the site id (in the address bar of the browser you can see it). It is easier to search by it. The IP address of the server and cid of the camera are separated by a space. Will see.
In the same place, Evgeny Boger gave a link to the script, which, as I understood, he made this list.

rapkasta reported that camera IDs are in the file webvybory2012.ru/account/channels?station_id=74747, where 74747 is the site id.
The site id can be seen in the address bar of the browser when you open this site. Thus, you can stock up on cidami by downloading files from such links.

UPD 03_1530: The program is improved. Version 1.1 is available. Download
Article corrected.
Required input parameters has become more. Added the "Camera Name" parameter. This name will be added to the file name. Therefore, write without spaces and without special characters to avoid errors with the file system (for example, uik12345cam1, where 12345 is the site id). By this name it will be then easier to understand the recorded one. In addition, this option will eliminate the name conflict if you write from different cameras to one directory.

UPD 03_2100: There is an error in the work through a proxy without a password. Help is issued.
A temporary solution - put a colon after the port (for example, 127.0.0.1:8080 :).
I will correct. Keep for updates.

UPD 03_2200: Error with proxy fixed. Version 1.2 is available.

UPD 04_0200: Voting has begun. Captcha, they say no.

UPD 04_1500: Broadcast from the eastern regions, as promised, discontinued.

UPD 20120609: Recording the election of mayors in Krasnoyarsk and Omsk is possible.
Camera identifiers that were published by Evgeny Boger are not relevant. Use the second and third way to get ip and cid.

UPD 20160918: Late, but corrected the program for the site webvyboryedg.ru. Look for version 1.3.

Source: https://habr.com/ru/post/139292/


All Articles