A kind of realize K song with method
[technical field]
The present invention relates to a kind of embedded software technology field, relate in particular to a kind of k of realization song with method.
[background technology]
Samba is a webserver, is used for the usefulness of Linux and Windows shared file; Samba promptly can be used for the shared file between Windows and the Linux, and in Linux, the machine in network through Samba provides shared-file system exactly, also can on this diji, use the shared carry of other machine in the network.The MP3 coding; The sound that the mpeg audio file refers in the mpeg standard partly is the mpeg audio layer; The mpeg audio file is divided into three layers according to compression quality and coding complexity different, and (corresponding with these three kinds of audio files of MP1, MP2 and the MP3 respectively mpeg audio of MPEG AUDIO LAYER 1/2/3 coding has very high compressibility; The compressibility of MP1 and MP2 was respectively 4: 1 and 6: 1-8: 1, and the compressibility of MP3 is then up to 10: 1-12: 1, that is to say that the music uncompressed of one minute CD Quality needs the 10MB storage space; And through having only about 1MB behind the MP3 compressed encoding, its tonequality keeps undistorted basically simultaneously.
WAV (Waveform audio format) is a kind of acoustic coding form that Microsoft and IBM Corporation develop, receives widely in the application software of windows platform and supporting, and also be one of appointment specification commonly used among its audiophile.Because this audio format end is through overcompression, thus the situation of distortion can not appear aspect tonequality, but requisite space is bigger than other audio formats; User's song is recorded in traditional KTV place, and song is kept under the Video Record Processor with the mode of WAV; Recording file leaves on the server, and the user goes copy recording song to the foreground, place, because this audio format end is through overcompression; So the situation of distortion aspect tonequality, can not occur, but requisite space is bigger than other audio formats, when the user will copy the song that oneself needs; Because the file of song is too big; What copy is chronic, extremely inconvenient to user's operation, has increased KTV place operation cost simultaneously.
[summary of the invention]
The technical matters that the present invention will solve, be to provide a kind of k of realization song with method, it is too big that it has overcome in the background technology file of song, copy chronic is extremely inconvenient to user's operation, has increased the deficiency of KTV place operation cost.Originally the user copies recording file and will remove the foreground copy, and directly in box, copies now, provides cost savings like this.
The present invention be achieved in that a kind of k of realization song with method, it is characterized in that: comprise the steps:
Step 10, a recording network shared files folder is set in recording server; When order programme starts; Be mounted to the Shared Folders of recording server under the share directory of order programme through the order of the Smbmount under the Samba server, said Smbmount order is Smbmount//recording server IP/ Shared Folders name/local directory/windows-U user name-P password; Wherein, local directory/windows is the file of setting up under the said share directory;
Step 20, user in k song process, STB song-order machine recording song, and the mode of song with WAV left in the said share directory, recording server changes into MP3 format with song in real time simultaneously; Wherein the WAV formatted file is converted into the MP3 format file and is achieved in that elder generation generates X.WAV in said share directory, what wherein X was corresponding is the numbering of recording song, after recording finishes; In said share directory, generate the X.WAV_finish file simultaneously, this moment, recording server was monitored said share directory in real time, when the X.WAV_finish file generates; Convert X.WAV into X.MP3, and generate the X.MP3_finish file, when the user copies the song of recording; Through song number X, in share directory, search the X.MP3_finish file, if exist; Then accomplish copy, do not exist, then point out the user to operate unsuccessful and withdraw from;
Step 30, external memory storage is inserted in the STB song-order machine, the described external memory storage of order programme carry this moment, and with the file of described external memory storage as order programme;
Step 40, at the recording playback page, the song that selection will copy is also clicked copy, order programme will leave in the said share directory song will be copied in the described external memory storage.
The present invention has following advantage: be mounted to the Shared Folders of recording server in the order programme through the order of the SMBMOUNT under the Samba server; The user in k song process, STB song-order machine recording song, and the mode of song with WAV left in the share directory; Recording server changes into MP3 format with song in real time simultaneously; Solve the problem that KTV user copies the recording song excessive cycle, make things convenient for the user to copy recording song, reduced KTV place operation cost.
[description of drawings]
Fig. 1 is the inventive method schematic flow sheet.
Fig. 2 is a structural representation of the present invention.
Fig. 3 becomes the schematic flow sheet of MP3 format for WAV format conversion of the present invention.
[embodiment]
Combine embodiment that the present invention is further described referring to figs. 1 through Fig. 3 below:
A kind of realize k song with the method (see figure 1), it is characterized in that: may further comprise the steps:
Step 10, a recording network shared files folder is set in recording server; When order programme starts; Be mounted to the Shared Folders of recording server under the share directory of order programme through the SMBMOUNT order, said Smbmount order is Smbmount//recording server IP/ Shared Folders name/local directory/windows-U user name-P password; (Smbmount//192.168.1.3/emsys/mnt/windows-o usemame=Administrator, pass=12345678), wherein mnt local directory/windows is the file of setting up under the said share directory;
Step 20, user in k song process, STB song-order machine recording song, and the mode of song with WAV left in the said share directory, recording server changes into MP3 format with song in real time simultaneously;
Step 30, external memory storage (is comprised u dish; The sd card; Or other can be as the memory device of exterior storage medium) be inserted in the STB song-order machine, the described external memory storage of order programme carry this moment, and with the file of described external memory storage as order programme;
Step 40, at the recording playback page, the song that selection will copy is also clicked copy, order programme will leave in the said share directory song will be copied in the described external memory storage.
Hardware configuration synoptic diagram wherein involved in the present invention is seen Fig. 2; Comprise recording server, touch-screen display, STB song-order machine and external memory storage, its annexation is: the STB song-order machine is connected with recording server, touch-screen display, external memory storage respectively.When recording server is used to preserve user k song; Recording song, touch-screen display are used for user's requesting song, and its song of recording is kept at the STB song-order machine; The user can enter to copy required song through external memory storage, in the STB song-order machine order programme is installed.
As shown in Figure 3, for WAV of the present invention is converted into the MP3 format file, comprising three parts:
First: foreground recording: in said share directory, generate X.WAV earlier, what wherein X was corresponding is the numbering of recording song, after recording finishes, in said share directory, generates the X.WAV_finish file simultaneously.
Second portion: backstage file conversion: recording server is monitored the recording share directory in real time; Judged whether that the X.WAV_finish file generates; When the X.WAV_finish file generates; Convert X.WAV into X.MP3, deletion X.WAV_finish file, and generate the X.MP3_finish file.
Third part: mp3 file is preserved on the foreground, when song that user's copy is recorded, through song number X, in share directory, searches the X.MP3_finish file, if exist, then accomplishes copy, does not exist, and then points out the user to operate unsuccessful and withdraws from.
The above is merely preferred embodiment of the present invention, and all equalizations of doing according to claim of the present invention change and modify, and all should belong to covering scope of the present invention.