You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2id="changelog">Changelog <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></span></h2>
208
208
<prestyle="height: 200px;">
209
209
210
+
2023-06-20 s-n-g
211
+
* version 0.9.2.11
212
+
* implementing station recording for MPlayer media player
213
+
* players' config file will be backed up on Windows
214
+
* fixing a couple of potential crashes
215
+
210
216
2023-06-14 s-n-g
211
217
* version 0.9.2.10
212
218
* all PyRadio threads will terminate when Alt-F4 or the
<h2id="intro">Intro <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></span></h2>
69
69
<p><strong>PyRadio v. 0.9.2.8</strong> introduces the ability to record stations, a feature used mainly to facilitate another feature: the ability to <em>pause and resume playback</em>.</p>
70
70
<p>All supported media players (<strong>MPV</strong>, <strong>MPlayer</strong> and <strong>VLC</strong>) support stream recording, each implementing it in a different way, which pose a challenge for the front end implementation.</p>
71
-
<p>Let us see the differences.</p>
71
+
<p>Before we see the differences, let us talk about some things that will make the whole thing easier to understand.</p>
72
+
<p>When it comes to recording a stream the program has to provide two things:</p>
73
+
<oltype="1">
74
+
<li><p>a <strong>recorder</strong>, which is the component that will connect to the stream (in our case the station), receive its data, and write them in a file that media players can recognize and reproduce.<br/>
75
+
<br/>
76
+
Since this is the program receiving data from the station, it will also receive song titles, or other stations data, but will not save them to the recorded file.</p></li>
77
+
<li><p>a <strong>monitor</strong>, which is the component that will reproduce the saved stream so that the user can monitor what is being downloaded.<br/>
78
+
<br/>
79
+
The <strong>monitor</strong> will just reproduce what’s written to the file by the <strong>recorder</strong>, so it knows nothing about a station, it’s data and song titles transmitted by it.</p></li>
80
+
</ol>
81
+
<p>Now, let’s see how <strong>PyRadio</strong>’s supported players behave.</p>
72
82
<h3id="mpv">MPV</h3>
73
83
<p><strong>MPV</strong> stream recording has the following characteristics:</p>
74
84
<ul>
75
-
<li>it is done using the <strong>–stream-record</strong> command line parameter.</li>
76
85
<li>it is considered an <strong>experimental feature</strong> by the <strong>MPV</strong> developers.<br/>
77
86
Radio streaming uses well known and established codecs (mainly mp3 and aac) and I have had no broken recording while testing the feature (even with flac stations).</li>
78
-
<li><strong>MPV</strong> has the ability to play and record a stream at the same time.<br/>
87
+
<li><strong>MPV</strong> has the ability to play and record a stream at the same time (both the <strong>recorder</strong> and the <strong>monitor</strong> components are active simultaneously).<br/>
79
88
This is very convenient, since all one has to do is add a command line parameter and start recording, while listening to what’s being recorded.</li>
80
89
<li>adjusting the volume or muting the player will not affect what’s being recorded.</li>
81
90
<li>when paused, the player will pause the playback but will keep recording the stream. Furthermore, song titles will stop being updated, but will be correctly displayed and updated when playback is resumed.</li>
82
91
</ul>
83
92
<h3id="mplayer">MPlayer</h3>
84
-
<p><strong>Note</strong>: <strong>MPlayer</strong> recording has not been implemented yet!</p>
85
93
<p><strong>MPlayer</strong> stream recording has the following characteristics:</p>
86
94
<ul>
87
-
<li>it is done using the <strong>-dumpstream</strong> and <strong>-dumpfile</strong> command line parameters.</li>
88
95
<li>it does not have the ability to record and play a stream at the same time.<br/>
89
-
This means that the front end will have to use two <em>mplayer</em> instances: one to record the stream and one more to play the recorded file (as it is being recorded).</li>
96
+
This means that the front end (<strong>PyRadio</strong>) will have to use two <em>mplayer</em> instances (run <em>mplayer</em> twice): one as a <strong>recorder</strong> and one as a <strong>monitor</strong>.</li>
97
+
<li>the <strong>recorder</strong> will display the song titles in addition to saving the output file.</li>
98
+
<li>the <strong>monitor</strong> will be started after the output file gets to a certain size, set to 12000 bytes by trial and error.</li>
99
+
<li>pausing and resuming the <strong>monitor</strong> for long will lead to song titles being out of sync, since the <strong>recorder</strong> will keep receiving data (and song titles) even when the playback if off.</li>
100
+
<li>adjusting the playback volume is of course possible, but there will be no vissible indication for it.</li>
90
101
</ul>
91
102
<h3id="vlc">VLC</h3>
92
103
<p><strong>Note</strong>: <strong>VLC</strong> recording has not been implemented yet!</p>
93
104
<p><strong>VLC</strong> stream recording has the following characteristics:</p>
94
105
<ul>
95
-
<li>it is done using the <strong>–sout</strong> command line parameter.</li>
96
106
<li>it does not have the ability to record and play a stream at the same time.<br/>
97
107
This means that the front end will have to use two <em>vlc</em> instances: one to record the stream and one more to play the recorded file (as it is being recorded).</li>
Copy file name to clipboardExpand all lines: recording.md
+19-8Lines changed: 19 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,37 +39,48 @@ ___
39
39
40
40
All supported media players (**MPV**, **MPlayer** and **VLC**) support stream recording, each implementing it in a different way, which pose a challenge for the front end implementation.
41
41
42
-
Let us see the differences.
42
+
Before we see the differences, let us talk about some things that will make the whole thing easier to understand.
43
+
44
+
When it comes to recording a stream the program has to provide two things:
45
+
46
+
1. a **recorder**, which is the component that will connect to the stream (in our case the station), receive its data, and write them in a file that media players can recognize and reproduce. \
47
+
\
48
+
Since this is the program receiving data from the station, it will also receive song titles, or other stations data, but will not save them to the recorded file.
49
+
50
+
2. a **monitor**, which is the component that will reproduce the saved stream so that the user can monitor what is being downloaded. \
51
+
\
52
+
The **monitor** will just reproduce what's written to the file by the **recorder**, so it knows nothing about a station, it's data and song titles transmitted by it.
53
+
54
+
Now, let's see how **PyRadio**'s supported players behave.
43
55
44
56
### MPV
45
57
46
58
**MPV** stream recording has the following characteristics:
47
59
48
-
- it is done using the **--stream-record** command line parameter.
49
60
- it is considered an **experimental feature** by the **MPV** developers. \
50
61
Radio streaming uses well known and established codecs (mainly mp3 and aac) and I have had no broken recording while testing the feature (even with flac stations).
51
-
-**MPV** has the ability to play and record a stream at the same time. \
62
+
-**MPV** has the ability to play and record a stream at the same time (both the **recorder** and the **monitor** components are active simultaneously). \
52
63
This is very convenient, since all one has to do is add a command line parameter and start recording, while listening to what's being recorded.
53
64
- adjusting the volume or muting the player will not affect what's being recorded.
54
65
- when paused, the player will pause the playback but will keep recording the stream. Furthermore, song titles will stop being updated, but will be correctly displayed and updated when playback is resumed.
55
66
56
67
### MPlayer
57
68
58
-
**Note**: **MPlayer** recording has not been implemented yet!
59
-
60
69
**MPlayer** stream recording has the following characteristics:
61
70
62
-
- it is done using the **-dumpstream** and **-dumpfile** command line parameters.
63
71
- it does not have the ability to record and play a stream at the same time. \
64
-
This means that the front end will have to use two *mplayer* instances: one to record the stream and one more to play the recorded file (as it is being recorded).
72
+
This means that the front end (**PyRadio**) will have to use two *mplayer* instances (run *mplayer* twice): one as a **recorder** and one as a **monitor**.
73
+
- the **recorder** will display the song titles in addition to saving the output file.
74
+
- the **monitor** will be started after the output file gets to a certain size, set to 12000 bytes by trial and error.
75
+
- pausing and resuming the **monitor** for long will lead to song titles being out of sync, since the **recorder** will keep receiving data (and song titles) even when the playback if off.
76
+
- adjusting the playback volume is of course possible, but there will be no vissible indication for it.
65
77
66
78
### VLC
67
79
68
80
**Note**: **VLC** recording has not been implemented yet!
69
81
70
82
**VLC** stream recording has the following characteristics:
71
83
72
-
- it is done using the **--sout** command line parameter.
73
84
- it does not have the ability to record and play a stream at the same time. \
74
85
This means that the front end will have to use two *vlc* instances: one to record the stream and one more to play the recorded file (as it is being recorded).
0 commit comments