property.forEach(function (item, i) {
let data_property = {};
$.ajax({
url: ajaxurl,
method: 'POST',
dataType: 'html',
data: data_property,
async: false,
cache: false,
success: function (r) {
let result = JSON.parse(r);
property_json.agent.property[i].id_post = parseInt(result.id_post);
let data_save = property_json.agent.property[i];
let data_name = result.id_post + '.json';
$.post(ajaxurl, {
action: 'nv_save_property_json',
data: JSON.stringify({"property": data_save}),
name: data_name
}, function (r) {
}, 'json');
}
});
})
property.forEach(function (item, i) {
let data_property = {};
$.ajax({
url: ajaxurl,
method: 'POST',
dataType: 'html',
data: data_property,
async: false,
cache: false,
success: function (r) {
let result = JSON.parse(r);
property_json.agent.property[i].id_post = parseInt(result.id_post);
let data_save = property_json.agent.property[i];
let data_name = result.id_post + '.json';
$.post(ajaxurl, {
action: 'nv_save_property_json',
data: JSON.stringify({"property": data_save}),
name: data_name
}, function (r) {
}, 'json');
}
});
})
[путь к файлу]/load.sh > [путь]/error.log 2>&1
#!/bin/sh
sudo -E python3 /home/pi/SplashPyPolimech/appPolimech/appPolimech.py &
[01ff4f10] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[0202cce0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0.0
Could not connect to any X display.
Created new TCP socket 5 for connection
Created new TCP socket 5 for connection
[74909a10] live555 demux error: Failed to connect with rtsp://192.168.0.100:554/ISAPI/Streaming/Channels/101
[7490c738] satip stream error: Failed to connect to RTSP server 192.168.0.100:554
[7490c738] access_realrtsp stream error: cannot connect to 192.168.0.100:554
[7490c738] main stream error: Connection failed
[7490c738] main stream error: VLC could not connect to "192.168.0.100:554".
Created new TCP socket 5 for connection
[74953c98] mmal_codec decoder: VCSM init succeeded: Legacy
[74953c98] mmal_codec decoder: VCSM init succeeded: Legacy
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
[6e901448] gles2 generic error: parent window not available
[6e900cb0] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[6e901448] xcb generic error: window not available
[6e900cb0] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0.0
Could not connect to any X display.
Created new TCP socket 5 for connection
[6e904c68] mmal_codec decoder: VCSM init succeeded: Legacy
[6e904c68] mmal_codec decoder: VCSM init succeeded: Legacy
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
[72624e70] gles2 generic error: parent window not available
[72634fb8] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[72624e70] xcb generic error: window not available
[72634fb8] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
import time as t
import subprocess
import os
while True:
path0 = 'stream/'
if os.path.isdir(path0):
print('Done')
else:
os.mkdir(path0)
t.sleep(1)
path1 = 'stream/' + t.strftime("%Y-%m-%d", t.localtime())
if os.path.isdir(path1):
print('Done')
else:
os.mkdir(path1)
t.sleep(1)
a = t.strftime("%H.%M.%S", t.localtime())
command = 'cvlc "rtsp://192.168.200.201:554/user=admin&password=&channel=1&stream=0?.sdp" --sout=file/ts:' + str(path1) + '/' + a + 'stream.mp4'
process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
pid = process.pid + 1
print(pid)
t.sleep(10)
process.kill()
command_k = 'kill -9 ' + str(pid)
process_k = subprocess.Popen(command_k, stdout=subprocess.PIPE, shell=True)
t.sleep(5)