Skip to content

Commit

Permalink
python changes for distribution - disabled sound recording for now
Browse files Browse the repository at this point in the history
  • Loading branch information
aza547 committed Jun 21, 2022
1 parent e2e4860 commit 5e3adf2
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 16 deletions.
10 changes: 8 additions & 2 deletions python/Recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,18 @@ def start_recording(self):

cmd = f'{self.cfg["ffmpeg_path"]} -y -thread_queue_size 1024 \
-f gdigrab -framerate 50 -video_size 1920x1080 -i desktop \
-f dshow -i audio="virtual-audio-capturer" \
-r 50 -preset fast -c:v h264_nvenc -qp 23 -pix_fmt yuv420p \
-r 50 -preset fast -qp 23 -pix_fmt yuv420p \
"{self.file_name}"'

# Mic capture -- requires setup
# -f dshow -i audio="Microphone (3- G533 Gaming Headset)"

# Audio capture -- requires setup
# -f dshow -i audio="virtual-audio-capturer"

# Adds hardware encoding -- requires recent nvidia drivers (requires 11.1 or 471.41 not sure which is relevant)
# -c:v h264_nvenc

with open("D:\wow-recorder-files\diags\python.log", "a") as python_log:
self.recording_process = subprocess.Popen(
cmd, stdin=subprocess.PIPE, stdout=python_log, stderr=python_log, shell=True
Expand Down
2 changes: 1 addition & 1 deletion python/build/recorder/EXE-00.toc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
[],
False,
False,
1655761967,
1655845531,
[('run.exe',
'C:\\Users\\alexa\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\bootloader\\Windows-64bit\\run.exe',
'EXECUTABLE')])
Binary file modified python/build/recorder/PYZ-00.pyz
Binary file not shown.
Binary file modified python/build/recorder/recorder.exe
Binary file not shown.
Binary file modified python/build/recorder/recorder.pkg
Binary file not shown.
4 changes: 2 additions & 2 deletions python/build/recorder/warn-recorder.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ missing module named pwd - imported by posixpath (delayed, conditional), shutil
missing module named posix - imported by os (conditional, optional), shutil (conditional), importlib._bootstrap_external (conditional)
missing module named resource - imported by posix (top-level)
missing module named pep517 - imported by importlib.metadata (delayed)
missing module named 'org.python' - imported by copy (optional), xml.sax (delayed, conditional)
missing module named org - imported by copy (optional)
missing module named _posixshmem - imported by multiprocessing.resource_tracker (conditional), multiprocessing.shared_memory (conditional)
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
Expand All @@ -36,7 +36,7 @@ missing module named vms_lib - imported by platform (delayed, optional)
missing module named java - imported by platform (delayed)
missing module named _winreg - imported by platform (delayed, optional)
missing module named readline - imported by cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, optional)
missing module named org - imported by pickle (optional)
missing module named 'org.python' - imported by pickle (optional), xml.sax (delayed, conditional)
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level)
missing module named pyimod03_importers - imported by C:\Users\alexa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py (top-level)
12 changes: 6 additions & 6 deletions python/build/recorder/xref-recorder.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py, pyi_rth_multipr
<a target="code" href="" type="text/plain"><tt>'org.python'</tt></a>
<span class="moduletype">MissingModule</span> <div class="import">
imported by:
<a href="#copy">copy</a>
<a href="#pickle">pickle</a>
&#8226; <a href="#xml.sax">xml.sax</a>

</div>
Expand Down Expand Up @@ -2913,8 +2913,8 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py, pyi_rth_multipr
<a target="code" href="///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0/lib/copy.py" type="text/plain"><tt>copy</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#'org.python'">'org.python'</a>
&#8226; <a href="#copyreg">copyreg</a>
<a href="#copyreg">copyreg</a>
&#8226; <a href="#org">org</a>
&#8226; <a href="#types">types</a>
&#8226; <a href="#weakref">weakref</a>

Expand Down Expand Up @@ -8244,7 +8244,7 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py, pyi_rth_multipr
<a target="code" href="" type="text/plain"><tt>org</tt></a>
<span class="moduletype">MissingModule</span> <div class="import">
imported by:
<a href="#pickle">pickle</a>
<a href="#copy">copy</a>

</div>

Expand Down Expand Up @@ -8455,15 +8455,15 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py, pyi_rth_multipr
<a target="code" href="///C:/Program%20Files/WindowsApps/PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0/lib/pickle.py" type="text/plain"><tt>pickle</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#_compat_pickle">_compat_pickle</a>
<a href="#'org.python'">'org.python'</a>
&#8226; <a href="#_compat_pickle">_compat_pickle</a>
&#8226; <a href="#_pickle">_pickle</a>
&#8226; <a href="#codecs">codecs</a>
&#8226; <a href="#copyreg">copyreg</a>
&#8226; <a href="#doctest">doctest</a>
&#8226; <a href="#functools">functools</a>
&#8226; <a href="#io">io</a>
&#8226; <a href="#itertools">itertools</a>
&#8226; <a href="#org">org</a>
&#8226; <a href="#pprint">pprint</a>
&#8226; <a href="#re">re</a>
&#8226; <a href="#struct">struct</a>
Expand Down
Binary file modified python/dist/recorder/recorder.exe
Binary file not shown.
3 changes: 0 additions & 3 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ const ffmpegBinaryPath = app.isPackaged
? path.join(process.resourcesPath, 'ffmpeg/ffmpeg.exe')
: path.join(__dirname, '../../ffmpeg/ffmpeg.exe');

console.log("a" + recorderBinaryPath);
console.log("b" + ffmpegBinaryPath);

/**
* Start the recording process.
*/
Expand Down
10 changes: 8 additions & 2 deletions src/renderer/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import maldraxxus from "../../assets/wow/maldraxxus-arena.jpg";
import enigma from "../../assets/wow/enigma-arena.png";
import sepulcherOfTheFirstOnes from "../../assets/wow/sepulcher.jpg";

/**
* Import video posters.
*/
import infoPoster from "../../assets/poster.png";
import noVideosPoster from "../../assets/poster-novideos.png";

/**
* List of arenas and their backdrop image.
*/
Expand Down Expand Up @@ -260,7 +266,7 @@ export default function Layout() {
if (state.videoState[category][state.videoIndex]) {
return (
<TabPanel value={ state.categoryIndex } index={ tabIndex }>
<video key = { state.videoState[category][state.videoIndex].fullPath } className="video" poster="file:///D:/Checkouts/wow-recorder/assets/poster.png" controls>
<video key = { state.videoState[category][state.videoIndex].fullPath } className="video" poster={infoPoster} controls>
<source src={ state.videoState[category][state.videoIndex].fullPath } />
</video>
<Tabs
Expand Down Expand Up @@ -297,7 +303,7 @@ export default function Layout() {
} else {
return (
<TabPanel value={ state.categoryIndex } index={ tabIndex }>
<video key = "None" className="video" poster="file:///D:/Checkouts/wow-recorder/assets/poster-novideos.png"></video>
<video key = "None" className="video" poster={ noVideosPoster }></video>
<div className="noVideos"></div>
</TabPanel>
);
Expand Down
Binary file modified win64recorder/recorder.exe
Binary file not shown.

0 comments on commit 5e3adf2

Please sign in to comment.