[go: up one dir, main page]

TWI626846B - Electronic device and method of sending video streaming - Google Patents

Electronic device and method of sending video streaming Download PDF

Info

Publication number
TWI626846B
TWI626846B TW106127673A TW106127673A TWI626846B TW I626846 B TWI626846 B TW I626846B TW 106127673 A TW106127673 A TW 106127673A TW 106127673 A TW106127673 A TW 106127673A TW I626846 B TWI626846 B TW I626846B
Authority
TW
Taiwan
Prior art keywords
still image
image
electronic device
video stream
module
Prior art date
Application number
TW106127673A
Other languages
Chinese (zh)
Other versions
TW201911874A (en
Inventor
盧威利
林政安
鍾庭顥
Original Assignee
群邁通訊股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 群邁通訊股份有限公司 filed Critical 群邁通訊股份有限公司
Priority to TW106127673A priority Critical patent/TWI626846B/en
Application granted granted Critical
Publication of TWI626846B publication Critical patent/TWI626846B/en
Publication of TW201911874A publication Critical patent/TW201911874A/en

Links

Landscapes

  • Studio Devices (AREA)

Abstract

本發明提供一種視頻流傳送方法,應用於電子設備,該方法包括:採集聲音訊號;編碼所採集的聲音訊號,從而獲得數位音訊資料;控制該電子設備的第一攝像頭拍攝第一靜態影像以及控制第二攝像頭拍攝第二靜態影像;按照指定的修剪方式對所述第一靜態影像和第二靜態影像中至少之一者進行修剪;及按照指定的合成方式對所述第一靜態影像和所述第二靜態影像進行合成;將所合成的影像編碼成指定格式的影像;將所述指定格式的影像及所述數位音訊資料混合成視頻流;及將所述視頻流傳送到遠端設備。本發明可實現所述電子設備的串流直播。 The present invention provides a video streaming method for an electronic device, the method comprising: collecting an audio signal; encoding the collected audio signal to obtain digital audio data; controlling the first camera of the electronic device to capture the first static image and controlling The second camera captures the second still image; at least one of the first still image and the second still image is trimmed according to a specified clipping manner; and the first still image and the The second still image is synthesized; the synthesized image is encoded into an image of a specified format; the image of the specified format and the digital audio data are mixed into a video stream; and the video stream is transmitted to a remote device. The present invention can realize streaming live broadcast of the electronic device.

Description

電子設備及傳送視頻流的方法 Electronic device and method for transmitting video stream

本發明涉及電子設備管理技術領域,尤其涉及一種電子設備及傳送視頻流的方法。 The present invention relates to the field of electronic device management technologies, and in particular, to an electronic device and a method for transmitting a video stream.

目前市場上的手機並不能結合前置攝像頭和後置攝像頭所拍攝的影像進行串流直播。 Currently, mobile phones on the market cannot be streamed live with images taken by the front camera and the rear camera.

鑒於以上內容,有必要提供一種電子設備,可結合前置攝像頭和後置攝像頭所拍攝的影像進行串流直播。 In view of the above, it is necessary to provide an electronic device that can be streamed and streamed in combination with images taken by the front camera and the rear camera.

鑒於以上內容,還有必要提供一種傳送視頻流的方法,可結合前置攝像頭和後置攝像頭所拍攝的影像進行串流直播。 In view of the above, it is also necessary to provide a method of transmitting a video stream, which can be streamed and streamed in combination with images taken by the front camera and the rear camera.

所述電子設備包括:第一攝像頭,用於拍攝第一靜態影像;第二攝像頭,用於拍攝第二靜態影像;麥克風,用於採集聲音訊號;音訊轉碼器,用於編碼所述麥克風所採集的聲音訊號,從而獲得數位音訊資料;影像處理模組包括:獲取模組,用於控制所述第一攝像頭拍攝所述第一靜態影像以及控制所述第二攝像頭拍攝所述第二靜態影像;修剪模組,用於按照指定的修剪方式對所述第一靜態影像和所述第二靜態影像中至少之一者進行修剪;及合成模組,用於按照指定的合成方式對所述第一靜態影像和所述第二靜態影像進行合成, 從而獲得合成的影像;視頻轉碼器,用於將所述合成的影像編碼成指定格式的影像;混合器,用於將所述指定格式的影像及所述數位音訊資料混合成視頻流;及通訊模組,用於將所述視頻流傳送到遠端設備。 The electronic device includes: a first camera for capturing a first still image; a second camera for capturing a second still image; a microphone for collecting an audio signal; and an audio transcoder for encoding the microphone Acquiring the sound signal to obtain the digital audio data; the image processing module includes: an acquisition module, configured to control the first camera to capture the first still image, and control the second camera to capture the second still image a trimming module, configured to trim at least one of the first still image and the second still image according to a specified trimming manner; and a synthesizing module, configured to perform the first a still image and the second still image are synthesized, Thereby obtaining a synthesized image; a video transcoder for encoding the synthesized image into an image of a specified format; a mixer for mixing the image of the specified format and the digital audio data into a video stream; a communication module for transmitting the video stream to a remote device.

所述視頻流傳送方法,應用於電子設備,該方法包括:採集步驟,採集聲音訊號;第一編碼步驟,編碼所採集的聲音訊號,從而獲得數位音訊資料;影像處理步驟包括:控制所述電子設備的第一攝像頭拍攝第一靜態影像以及控制所述電子設備的第二攝像頭拍攝所述第二靜態影像;按照指定的修剪方式對所述第一靜態影像和所述第二靜態影像中至少之一者進行修剪;及按照指定的合成方式對所述第一靜態影像和所述第二靜態影像進行合成,從而獲得合成的影像;第二編碼步驟,將所述合成的影像編碼成指定格式的影像;混合步驟,將所述指定格式的影像及所述數位音訊資料混合成視頻流;及傳送步驟,將所述視頻流傳送到遠端設備。 The video streaming method is applied to an electronic device, and the method includes: an acquiring step of acquiring an audio signal; a first encoding step of encoding the collected audio signal to obtain digital audio data; and the image processing step includes: controlling the electronic The first camera of the device captures the first still image and the second camera that controls the electronic device captures the second still image; at least the first still image and the second still image are in accordance with a specified clipping manner Performing a pruning; and synthesizing the first still image and the second still image according to a specified synthesis manner to obtain a synthesized image; and a second encoding step of encoding the synthesized image into a specified format And a mixing step of mixing the image of the specified format and the digital audio data into a video stream; and transmitting a step of transmitting the video stream to a remote device.

相較於習知技術,本發明提供的電子設備及傳送視頻流的方法可結合前置攝像頭和後置攝像頭所拍攝的影像進行串流直播。 Compared with the prior art, the electronic device and the method for transmitting the video stream provided by the present invention can be combined with the images captured by the front camera and the rear camera for live streaming.

1‧‧‧電子設備 1‧‧‧Electronic equipment

10‧‧‧處理器 10‧‧‧ processor

20‧‧‧儲存器 20‧‧‧Storage

30‧‧‧麥克風 30‧‧‧Microphone

40‧‧‧第一攝像頭 40‧‧‧First camera

50‧‧‧第二攝像頭 50‧‧‧second camera

60‧‧‧輸入裝置 60‧‧‧Input device

70‧‧‧輸入控制器 70‧‧‧Input controller

80‧‧‧通訊模組 80‧‧‧Communication module

110‧‧‧影像處理模組 110‧‧‧Image Processing Module

1101‧‧‧獲取模組 1101‧‧‧Getting module

1102‧‧‧修剪模組 1102‧‧‧Cutting module

1103‧‧‧合成模組 1103‧‧‧Synthesis module

120‧‧‧視頻轉碼器 120‧‧‧Video Transcoder

130‧‧‧音訊轉碼器 130‧‧‧Audio Transcoder

140‧‧‧混合器 140‧‧‧mixer

2‧‧‧伺服器 2‧‧‧Server

3‧‧‧遠端設備 3‧‧‧ Remote equipment

圖1是本發明電子設備較佳實施例的架構圖。 1 is a block diagram of a preferred embodiment of an electronic device of the present invention.

圖2是本發明影像處理模組較佳實施例的功能模組圖。 2 is a functional block diagram of a preferred embodiment of the image processing module of the present invention.

圖3是本發明傳送視頻流的方法較佳實施例的流程圖。 3 is a flow chart of a preferred embodiment of a method of transmitting a video stream in accordance with the present invention.

圖4A舉例說明第一攝像頭和第二攝像頭分別所拍攝的30張靜態影像。 FIG. 4A illustrates 30 still images taken by the first camera and the second camera, respectively.

圖4B舉例說明調整第一攝像頭所拍攝的30張靜態影像的寬度。 FIG. 4B illustrates adjusting the width of 30 still images captured by the first camera.

圖4C舉例說明將第一攝像頭和第二攝像頭所拍攝的靜態影像進行合成。 FIG. 4C illustrates the synthesis of still images taken by the first camera and the second camera.

圖5舉例說明將圖4C第一攝像頭和第二攝像頭所拍攝的靜態影像改變合成位置。 FIG. 5 exemplifies a change of the combined position of the still image captured by the first camera and the second camera of FIG. 4C.

參閱圖1所示,是本發明電子設備較佳實施例的架構圖。在本實施例中,電子設備1包括,但不限於,處理器10、儲存器20,麥克風30、第一攝像頭40、第二攝像頭50、輸入裝置60、輸入控制器70,及通訊模組80。上述各個元件之間電氣連接。在本實施例中,所述電子設備1可以為手機、平板電腦等設備。 Referring to Figure 1, there is shown an architectural diagram of a preferred embodiment of the electronic device of the present invention. In this embodiment, the electronic device 1 includes, but is not limited to, a processor 10, a storage 20, a microphone 30, a first camera 40, a second camera 50, an input device 60, an input controller 70, and a communication module 80. . The above various components are electrically connected. In this embodiment, the electronic device 1 may be a device such as a mobile phone or a tablet computer.

所述處理器10可以為中央處理器、微處理器或其他具有資料處理功能的晶片。 The processor 10 can be a central processing unit, a microprocessor or other wafer with data processing functions.

所述儲存器20可以是電子設備1本身的儲存器,也可以是外部儲存器,如智慧媒體卡(Smart Media Card)、安全數位卡(Secure Digital Card)、快閃儲存器卡(Flash Card)等。 The storage device 20 may be a storage device of the electronic device 1 itself, or may be an external storage device, such as a smart media card (Smart Media Card), a secure digital card (Secure Digital Card), or a flash memory card (Flash Card). Wait.

所述麥克風30可以用於採集聲音訊號。第一攝像頭40和第二攝像頭50可以分別為所述電子設備1的後置攝像頭和前置攝像頭。 The microphone 30 can be used to collect sound signals. The first camera 40 and the second camera 50 may be a rear camera and a front camera of the electronic device 1, respectively.

在一個實施例中,所述第一攝像頭40和第二攝像頭50為具有不同圖元的兩個攝像頭。所述第一攝像頭40的圖元可以大於所述第二攝像頭50的圖元。 In one embodiment, the first camera 40 and the second camera 50 are two cameras having different primitives. The primitive of the first camera 40 may be larger than the primitive of the second camera 50.

所述輸入裝置60用於接收使用者的輸入訊號。在本實施例中,所述輸入裝置60可以為觸控式螢幕,用於接收觸控輸入訊號,或者為按鍵,用於接收按壓輸入訊號。 The input device 60 is configured to receive an input signal of a user. In this embodiment, the input device 60 can be a touch screen for receiving a touch input signal or a button for receiving a press input signal.

所述輸入控制器70可以回應所述輸入裝置60的輸入訊號進而生成相應的控制訊號。所述通訊模組80可以為無線通訊模組,例如可以為Wifi設備、藍牙設備。所述電子設備1可以利用該通訊模組80發送請求訊號,例如請求所述伺服器2建立所述電子設備1與遠端設備3之間的傳輸通道。在一個實施例中,所述伺服器2可以為例如Facebook的伺服器。所述遠端設備3可以為手機、電腦等設備。 The input controller 70 can respond to the input signal of the input device 60 to generate a corresponding control signal. The communication module 80 can be a wireless communication module, for example, a Wifi device or a Bluetooth device. The electronic device 1 can use the communication module 80 to send a request signal, for example, requesting the server 2 to establish a transmission channel between the electronic device 1 and the remote device 3. In one embodiment, the server 2 can be a server such as Facebook. The remote device 3 can be a device such as a mobile phone or a computer.

在本實施例中,所述處理器10至少包括影像處理模組110、視頻 轉碼器120、音訊轉碼器130及混合器140。 In this embodiment, the processor 10 includes at least an image processing module 110 and a video. Transcoder 120, audio transcoder 130 and mixer 140.

在本實施方式中,所述影像處理模組110可以控制所述第一攝像頭40和第二攝像頭50分別連續拍攝複數張靜態影像,對所拍攝獲得的靜態影像進行尺寸裁剪,以及合成裁剪後的靜態影像並將複數張合成的靜態影像依續發送給所述視頻轉碼器120。 In the embodiment, the image processing module 110 can control the first camera 40 and the second camera 50 to continuously capture a plurality of still images, perform size cropping on the captured still images, and synthesize the cropped images. The still image and the plurality of synthesized still images are successively sent to the video transcoder 120.

在一個實施例中,所述影像處理模組110可為整合在所述處理器10內的圖形處理器,或者為被所述處理器10執行的軟體模組。所述影像處理模組110包括獲取模組1101、修剪模組1102及合成模組1103。所述模組1101-1103為可被所述處理器10或所述圖形處理器調用執行的可程式化軟體指令。可以理解,在其他實施方式中,上述模組1101-1103也可為固化在所述處理器10中的程式指令或固件(firmware)。關於模組1101-1103的功能將結合圖3進行說明。 In one embodiment, the image processing module 110 can be a graphics processor integrated in the processor 10 or a software module executed by the processor 10. The image processing module 110 includes an acquisition module 1101, a trimming module 1102, and a synthesis module 1103. The modules 1101-1103 are programmable software instructions that can be executed by the processor 10 or the graphics processor. It is to be understood that in other embodiments, the modules 1101-1103 may also be program instructions or firmware that are solidified in the processor 10. The function of the modules 1101-1103 will be described with reference to FIG.

所述視頻轉碼器120可將所述影像處理模組110所合成的每張靜態影像編碼為指定格式(例如MPEG4格式)的影像,並將該指定格式的影像傳送至所述混合器140。 The video transcoder 120 may encode each still image synthesized by the image processing module 110 into an image of a specified format (for example, MPEG4 format), and transmit the image of the specified format to the mixer 140.

本實施例中,所述麥克風30將採集的聲音訊號傳送給所述音訊轉碼器130。該音訊轉碼器130可將聲音訊號編碼為數位音訊資料後傳送給所述混合器140。 In this embodiment, the microphone 30 transmits the collected audio signal to the audio transcoder 130. The audio transcoder 130 can encode the audio signal into digital audio material and transmit it to the mixer 140.

本實施例中,所述混合器140可以將所述指定格式的影像和所述數位音訊資料混合成視頻流。在一個實施例中,所述混合器140回應用戶的輸入來將所述指定格式的影像和所述數位音訊資料混合成視頻流並將視頻流儲存在所述儲存器20中。所述混合器140還可將所述視頻流傳送給所述通訊模組80,接著,所述通訊模組80透過所述伺服器2所建立在所述電子設備1與遠端設備3之間的傳輸通道將所述視頻流即時傳送給所述遠端設備3,從而實現串流直播,將視頻流分享給所述遠端設備3。 In this embodiment, the mixer 140 may mix the image of the specified format and the digital audio data into a video stream. In one embodiment, the mixer 140 mixes the image of the specified format and the digital audio material into a video stream in response to a user input and stores the video stream in the storage 20. The mixer 140 can also transmit the video stream to the communication module 80, and then the communication module 80 is established between the electronic device 1 and the remote device 3 through the server 2. The transmission channel immediately transmits the video stream to the remote device 3, thereby implementing a live stream, and sharing the video stream to the remote device 3.

參閱圖3所示,是本發明視頻傳送方法較佳實施例的流程圖。根據不同需求,該流程圖中步驟的順序可以改變,某些步驟可以省略或合併。 Referring to Figure 3, there is shown a flow chart of a preferred embodiment of the video transmission method of the present invention. The order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted or combined.

步驟301,所述電子設備1利用通訊模組80向所述伺服器2發送請求訊號,以請求所述伺服器2建立所述電子設備1與遠端設備3之間的傳輸通道。 Step 301: The electronic device 1 sends a request signal to the server 2 by using the communication module 80 to request the server 2 to establish a transmission channel between the electronic device 1 and the remote device 3.

在一個實施例中,所述電子設備1可以回應於輸入控制器70所生成的第一控制訊號來發送所述請求訊號。 In an embodiment, the electronic device 1 can send the request signal in response to the first control signal generated by the input controller 70.

例如,當所述輸入裝置60為觸控式螢幕時,所述觸控式螢幕可以為使用者觸摸了顯示於該觸控式螢幕上的指定物件(例如一個串流直播圖示)而產生相應的第一觸控輸入訊號,所述輸入控制器70可以回應所述觸控式螢幕的第一觸控輸入訊號進而生成相應的第一控制訊號。 For example, when the input device 60 is a touch screen, the touch screen can be corresponding to the user touching a specified object displayed on the touch screen (for example, a streaming live icon). The first touch input signal, the input controller 70 can respond to the first touch input signal of the touch screen to generate a corresponding first control signal.

步驟302,所述電子設備1判斷所述通訊模組80是否接收到所述伺服器2的回饋訊號,該回饋訊號用以確認所述伺服器2已完成建立所述電子設備1與遠端設備3之間的傳輸通道,且包括所述傳輸通道的相關資訊,如:所述傳輸通道的網路位址。當所述通訊模組80接收到所述回饋訊號時,同時執行步驟S3031和S3041。當所述通訊模組80沒有接收到所述回饋訊號時,返回步驟S301。 Step 302: The electronic device 1 determines whether the communication module 80 receives the feedback signal of the server 2, and the feedback signal is used to confirm that the server 2 has completed establishing the electronic device 1 and the remote device. A transmission channel between 3 and including related information of the transmission channel, such as a network address of the transmission channel. When the communication module 80 receives the feedback signal, steps S3031 and S3041 are simultaneously performed. When the communication module 80 does not receive the feedback signal, the process returns to step S301.

步驟3031,當所述通訊模組80接收到所述回饋訊號時,所述麥克風30採集聲音訊號。 Step 3031: When the communication module 80 receives the feedback signal, the microphone 30 collects an audio signal.

步驟3032,所述音訊轉碼器130編碼所述麥克風30所採集的聲音訊號,從而獲得數位音訊資料。所述音訊轉碼器130還將所述數位音訊資料傳送到所述混合器140。 Step 3032, the audio transcoder 130 encodes the audio signal collected by the microphone 30, thereby obtaining digital audio data. The audio transcoder 130 also transmits the digital audio material to the mixer 140.

在本實施例中,所述音訊轉碼器130在編碼所述麥克風30所採集的聲音訊號時還將所述聲音訊號所對應的採集時間嵌入到所述數位音訊資料中,從而使得所述數位音訊資料包括了對應的採集時間。 In this embodiment, the audio transcoder 130 also embeds the acquisition time corresponding to the audio signal into the digital audio data when encoding the audio signal collected by the microphone 30, thereby causing the digital digit to be The audio data includes the corresponding acquisition time.

步驟3041,當所述通訊模組80接收到所述回饋訊號時,所述獲取模組1101控制所述第一攝像頭40拍攝第一靜態影像以及控制所述第二攝像頭50拍攝第二靜態影像。 Step 3041: When the communication module 80 receives the feedback signal, the acquiring module 1101 controls the first camera 40 to capture a first still image and the second camera 50 to capture a second still image.

例如,參閱圖4A所示,30張第一靜態影像即A1、A2、A3......A30為所述第一攝像頭40在第一秒所拍攝,30張第二靜態影像即B1、B2、B3......B30為所述第二攝像頭50在第一秒所拍攝。其中,所述第一靜態影像A1的拍攝時間與所述第二靜態影像B1的拍攝時間相同。所述第一靜態影像A2的拍攝時間與所述第二靜態影像B2的拍攝時間相同。所述第一靜態影像A3的拍攝時間與所述第二靜態影像B3的拍攝時間相同。依此類推,所述第一靜態影像A30的拍攝時間與所述第二靜態影像B30的拍攝時間相同。在本實施例中,所述第一攝像頭40的圖元大於所述第二攝像頭50的圖元,所以每一張第一靜態影像的第一寬度“W1”大於每一張第二靜態影像的第二寬度“W2”。 For example, referring to FIG. 4A, 30 first still images, that is, A1, A2, A3, ..., A30, are taken by the first camera 40 in the first second, and 30 second still images are B1. B2, B3, ..., B30 are taken by the second camera 50 in the first second. The shooting time of the first still image A1 is the same as the shooting time of the second still image B1. The shooting time of the first still image A2 is the same as the shooting time of the second still image B2. The shooting time of the first still image A3 is the same as the shooting time of the second still image B3. And so on, the shooting time of the first still image A30 is the same as the shooting time of the second still image B30. In this embodiment, the primitive of the first camera 40 is larger than the primitive of the second camera 50, so the first width “W1” of each first still image is greater than that of each second static image. The second width is "W2".

步驟3042,所述修剪模組1102按照指定的修剪方式對所述第一靜態影像和第二靜態影像中之一者或兩者進行修剪,使得所述第一靜態影像和第二靜態影像能夠以指定的合成方式進行合成。 Step 3042, the trimming module 1102 trims one or both of the first still image and the second still image according to a specified trimming manner, so that the first still image and the second still image can be The specified synthesis method is used for synthesis.

本實施例中,所述指定的修剪方式可以為以下第一修剪方式、第二修剪方式、第三修剪方式的任意一種。 In this embodiment, the specified pruning mode may be any one of the following first pruning mode, second pruning mode, and third pruning mode.

所述第一修剪方式可以為將所述第一靜態影像和第二靜態影像的寬度修剪為一致。 The first trimming manner may be to trim the widths of the first still image and the second still image to be consistent.

以所述第一靜態影像的第一寬度大於所述第二靜態影像的第二寬度為例,在一個實施例中,所述修剪模組1102可以以所述第一靜態影像的中心點為中心,縮小該第一靜態影像直至該第一靜態影像的第一寬度與所述第二靜態影像的第二寬度相等。 For example, the first width of the first still image is greater than the second width of the second still image. In one embodiment, the trimming module 1102 can be centered on a center point of the first still image. And reducing the first still image until the first width of the first still image is equal to the second width of the second still image.

例如,參閱圖4 A所示,所述修剪模組1102分別以所述第一靜態影像A1、A2、A3......A30的中心點為中心,縮小該第一靜態影像A1、A2、A3......A30使得該第一靜態影像A1、A2、A3......A30的第一寬度與所述第二靜態影像B1、B2、B3......B30的第二寬度相等,如圖4B所示。 For example, as shown in FIG. 4A, the trimming module 1102 reduces the first still image A1 and A2 centering on the center point of the first still image A1, A2, A3, ..., A30, respectively. , A3 ... A30 such that the first width of the first still image A1, A2, A3 ... A30 and the second still image B1, B2, B3 ... B30 The second width is equal, as shown in Figure 4B.

仍然以所述第一靜態影像的第一寬度大於所述第二靜態影像的第二寬度為例,在其他實施例中,所述修剪模組1102可以以圖4 A所示的第二靜 態影像的中心點為中心,放大該第二靜態影像直至該第二靜態影像的第二寬度與所述第一靜態影像的第一寬度相等,如圖4B所示。 For example, the first width of the first still image is greater than the second width of the second still image. In other embodiments, the trimming module 1102 can be the second static image shown in FIG. 4A. The center point of the state image is centered, and the second still image is enlarged until the second width of the second still image is equal to the first width of the first still image, as shown in FIG. 4B.

仍然以所述第一靜態影像的第一寬度大於所述第二靜態影像的第二寬度為例,在其他實施例中,所述修剪模組1102也可以透過直接裁切圖4 A所示的第一靜態影像的左右兩邊來使得該第一靜態影像的第一寬度與所述第二靜態影像的第二寬度相等。 For example, the first width of the first still image is greater than the second width of the second still image. In other embodiments, the trimming module 1102 can also directly cut the image shown in FIG. 4A. The left and right sides of the first still image are such that the first width of the first still image is equal to the second width of the second still image.

所述第二修剪方式可以為將所述第一靜態影像和第二靜態影像的高度修剪為一致。 The second trimming manner may be to trim the heights of the first still image and the second still image to be consistent.

類似地,以所述第一靜態影像的第一高度大於所述第二靜態影像的第二高度為例,在一個實施例中,所述修剪模組1102可以以所述第一靜態影像的中心點為中心,縮小該第一靜態影像直至該第一靜態影像的第一高度與所述第二靜態影像的第二高度相等。 For example, the first height of the first still image is greater than the second height of the second still image. In one embodiment, the trimming module 1102 can be at the center of the first still image. The point is centered, and the first still image is reduced until the first height of the first still image is equal to the second height of the second still image.

類似地,所述修剪模組1102也可以以所述第二靜態影像的中心點為中心,放大該第二靜態影像直至該第二靜態影像的第二高度與所述第一靜態影像的第一高度相等。 Similarly, the trimming module 1102 may also center the center point of the second still image to enlarge the second still image until the second height of the second still image and the first of the first still image. The height is equal.

類似地,所述修剪模組1102也可以透過直接裁切第一靜態影像的上下兩邊來使得該第一靜態影像的第一高度與所述第二靜態影像的第二高度相等。 Similarly, the trimming module 1102 can also make the first height of the first still image equal to the second height of the second still image by directly cutting the upper and lower sides of the first still image.

所述第三修剪方式可以為將所述第一靜態影像和第二靜態影像的長度和寬度分別修剪為一致。 The third trimming manner may be that the length and the width of the first still image and the second still image are respectively trimmed to be consistent.

類似地,以所述第一靜態影像的第一寬度大於所述第二靜態影像的第二寬度,第一靜態影像的第一高度大於所述第二靜態影像的第二高度為例,在一個實施例中,所述修剪模組1102可以透過裁切第一靜態影像的左右兩邊來使得該第一靜態影像的第一寬度與所述第二靜態影像的第二寬度相等,透過裁切第一靜態影像的上下兩邊來使得該第一靜態影像的第一高度與所述第二靜態影像的第二高度相等。 Similarly, the first width of the first still image is greater than the second width of the second still image, and the first height of the first still image is greater than the second height of the second still image as an example, in one In an embodiment, the trimming module 1102 can make the first width of the first still image equal to the second width of the second still image by cutting the left and right sides of the first still image, and cutting through the first The upper and lower sides of the still image are such that the first height of the first still image is equal to the second height of the second still image.

在一個實施例中,當所述修剪模組1102採用的是所述第一修剪方式時,所述指定的合成方式是指第一合成方式,該第一合成方式是指將所述第一靜態影像和第二靜態影像從垂直方向進行合成。 In an embodiment, when the trimming module 1102 adopts the first trimming mode, the specified synthesizing manner refers to a first synthesizing manner, and the first synthesizing manner refers to the first static manner. The image and the second still image are synthesized from the vertical direction.

當所述修剪模組1102採用的是所述第二修剪方式時,所述指定的合成方式是指第二合成方式,該第二合成方式是指將所述第一靜態影像和第二靜態影像從水平方向進行合成。 When the trimming module 1102 adopts the second trimming mode, the specified synthesizing mode refers to the second synthesizing mode, and the second synthesizing mode refers to the first still image and the second still image. Synthesize from the horizontal direction.

當所述修剪模組1102採用的是所述第三修剪方式時,所述指定的合成方式是指所述第一合成方式或者所述第二合成方式。 When the trimming module 1102 adopts the third trimming mode, the specified synthesizing manner refers to the first synthesizing mode or the second synthesizing mode.

步驟3043,所述合成模組1103按照所述指定的合成方式對所述第一靜態影像和第二靜態影像進行合成,並將合成後的影像傳送到所述視頻轉碼器120。 In step 3043, the synthesizing module 1103 synthesizes the first still image and the second still image according to the specified synthesizing manner, and transmits the synthesized image to the video transcoder 120.

在本實施例中,所述合成模組1103將對應於相同拍攝時間的第一靜態影像和第二靜態影像進行合成。 In this embodiment, the synthesizing module 1103 combines the first still image and the second still image corresponding to the same shooting time.

例如,以所述修剪模組1102採用的是所述第一修剪方式,所述指定的合成方式是指將所述第一靜態影像和第二靜態影像從垂直方向進行合成為例,參閱圖4C所示,所述合成模組1103從垂直方向將對應於相同拍攝時間的第一靜態影像A1和第二靜態影像B1合成為一張影像A1B1,從垂直方向將對應於相同拍攝時間的第一靜態影像A2和第二靜態影像B2合成為一張影像A2B2,從垂直方向將對應於相同拍攝時間的第一靜態影像A3和第二靜態影像B3合成為一張影像A3B3。依此類推,從垂直方向將對應於相同拍攝時間的第一靜態影像A30和第二靜態影像B30合成為一張影像A30B30。 For example, the first trimming mode is adopted by the trimming module 1102, and the specified synthesizing manner refers to synthesizing the first still image and the second still image from a vertical direction as an example. Referring to FIG. 4C As shown, the synthesizing module 1103 combines the first still image A1 and the second still image B1 corresponding to the same shooting time into one image A1B1 from the vertical direction, and the first static corresponding to the same shooting time from the vertical direction. The image A2 and the second still image B2 are combined into one image A2B2, and the first still image A3 and the second still image B3 corresponding to the same shooting time are combined into one image A3B3 from the vertical direction. Similarly, the first still image A30 and the second still image B30 corresponding to the same shooting time are combined into one image A30B30 from the vertical direction.

步驟S3044,所述視頻轉碼器120將上述合成的影像分別編碼成指定格式的影像,並將編碼後的影像傳送到所述混合器140。 Step S3044, the video transcoder 120 separately encodes the synthesized image into an image of a specified format, and transmits the encoded image to the mixer 140.

在一個實施例中,所述指定格式可以為MPEG4格式。 In one embodiment, the specified format may be in the MPEG4 format.

例如,所述視頻轉碼器120將上述合成的30張影像A1B1、A2B2、A3B3......A30B30分別編碼成MPEG4格式的影像,並將編碼後的該30張MPEG4 格式的影像傳送到所述混合器140。 For example, the video transcoder 120 encodes the synthesized 30 images A1B1, A2B2, A3B3, ..., A30B30 into MPEG4 format images, and encodes the 30 MPEG4 images. The formatted image is transmitted to the mixer 140.

步驟S305,所述混合器140將所述指定格式的影像及所述數位音訊資料混合成視頻流。 Step S305, the mixer 140 mixes the image of the specified format and the digital audio data into a video stream.

在本實施例中,所述混合器140根據所述指定格式的影像所對應的拍攝時間和所述數位音訊資料所包括的採集時間來將所述指定格式的影像及所述數位音訊資料混合成視頻流。即所述混合器140將拍攝時間和採集時間相同的所述指定格式的影像和數位音訊資料進行混合。 In this embodiment, the mixer 140 mixes the image of the specified format and the digital audio data according to the shooting time corresponding to the image of the specified format and the acquisition time included in the digital audio data. Video stream. That is, the mixer 140 mixes the image of the specified format and the digital audio data with the same shooting time and acquisition time.

例如,所述混合器140將所述30張MPEG4格式的影像與對應於第一秒的數位音訊資料混合成視頻流。 For example, the mixer 140 mixes the 30 MPEG4 format images with the digital audio data corresponding to the first second into a video stream.

在一個實施例中,所述混合器140可以於接收到所述輸入控制器70所發送的第二控制訊號時,將所述視頻流儲存於所述儲存器20中。 In an embodiment, the mixer 140 may store the video stream in the storage 20 when receiving the second control signal sent by the input controller 70.

例如,當所述輸入裝置60為觸控式螢幕時,所述觸控式螢幕可以為使用者觸摸了顯示於該觸控式螢幕上的指定物件(例如一個儲存圖示)而產生相應的第二觸控輸入訊號,所述輸入控制器70可以回應所述觸控式螢幕的第二觸控輸入訊號進而生成相應的第二控制訊號。 For example, when the input device 60 is a touch screen, the touch screen can generate a corresponding number for a user to touch a specified object (for example, a storage icon) displayed on the touch screen. The touch controller can respond to the second touch input signal of the touch screen to generate a corresponding second control signal.

步驟S306,所述混合器140將所述視頻流傳送給該通訊模組80。 In step S306, the mixer 140 transmits the video stream to the communication module 80.

步驟S307,所述通訊模組80透過所述伺服器2所建立的上述傳輸通道將所述視頻流即時傳輸給所述遠端設備3,從而實現所述電子設備1進行串流直播,將該視頻流分享給所述遠端設備3。 In step S307, the communication module 80 transmits the video stream to the remote device 3 through the transmission channel established by the server 2, so that the electronic device 1 performs streaming live broadcast. The video stream is shared to the remote device 3.

在一個實施例中,所述影像處理模組110可以於接收到所述輸入控制器70所發送的第三控制訊號時,改變所述合成模組1103對所述第一靜態影像及所述第二靜態影像的合成方式。 In an embodiment, the image processing module 110 may change the first static image and the first module when the third control signal sent by the input controller 70 is received. The method of synthesizing two static images.

例如,參考圖4C,當所述輸入裝置60為觸控式螢幕時,所述觸控式螢幕可以為使用者於該觸控式螢幕所顯示的合成影像A1B1上觸摸滑動而產生相應的第三觸控輸入訊號,所述輸入控制器70可以回應所述觸控式螢幕的第三觸控輸入訊號進而生成相應的第三控制訊號。所述影像處理模組110的合成模 組1103可以依據所述第三控制訊號將合成影像A1B1、A2B2、A3B3...A30B30上的第一靜態影像及第二靜態影像上下調換位置,如圖5所示。 For example, referring to FIG. 4C, when the input device 60 is a touch screen, the touch screen can be touched by the user on the synthesized image A1B1 displayed on the touch screen to generate a corresponding third. Touching the input signal, the input controller 70 can respond to the third touch input signal of the touch screen to generate a corresponding third control signal. Synthetic mode of the image processing module 110 The group 1103 can change the first still image and the second still image on the composite image A1B1, A2B2, A3B3, ..., A30B30 up and down according to the third control signal, as shown in FIG. 5.

最後所應說明的是,以上實施例僅用以說明本發明的技術方案而非限制,儘管參照以上較佳實施例對本發明進行了詳細說明,本領域的普通技術人員應當理解,可以對本發明的技術方案進行修改或等同替換都不應脫離本發明技術方案的精神和範圍。 It should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and are not intended to be limiting, and the present invention will be described in detail with reference to the preferred embodiments thereof Modifications or equivalents of the technical solutions are not to be construed as a departure from the spirit and scope of the invention.

Claims (13)

一種電子設備,其中,電子設備包括:第一攝像頭,用於拍攝第一靜態影像;第二攝像頭,用於拍攝第二靜態影像;麥克風,用於採集聲音訊號;音訊轉碼器,用於編碼所述麥克風所採集的聲音訊號,從而獲得數位音訊資料;影像處理模組包括:獲取模組,用於控制所述第一攝像頭拍攝所述第一靜態影像以及控制所述第二攝像頭拍攝所述第二靜態影像;修剪模組,用於按照指定的修剪方式對所述第一靜態影像和所述第二靜態影像中至少之一者進行修剪,使得所述第一靜態影像和第二靜態影像能夠以指定的合成方式進行合成;及合成模組,用於按照所述指定的合成方式將對應於相同拍攝時間的所述第一靜態影像和所述第二靜態影像進行合成,從而獲得合成的影像;視頻轉碼器,用於將所述合成的影像編碼成指定格式的影像;混合器,用於將所述指定格式的影像及所述數位音訊資料混合成視頻流;及通訊模組,用於將所述視頻流傳送到遠端設備。 An electronic device, comprising: a first camera for capturing a first still image; a second camera for capturing a second still image; a microphone for collecting an audio signal; and an audio transcoder for encoding The audio signal collected by the microphone, thereby obtaining digital audio data; the image processing module includes: an acquisition module, configured to control the first camera to capture the first still image and control the second camera to capture the a second static image; a trimming module, configured to trim at least one of the first still image and the second still image according to a specified trimming manner, so that the first still image and the second still image The synthesis can be performed in a specified synthesis manner; and the synthesis module is configured to synthesize the first still image and the second still image corresponding to the same shooting time according to the specified synthesis manner, thereby obtaining a synthesized An image transcoder for encoding the synthesized image into an image of a specified format; a mixer for specifying the image The type of digital video and audio data into a mixed video stream; and a communication module for the video stream to the remote device. 如申請專利範圍第1項所述的電子設備,其中,所述電子設備還包括處理器及儲存器,所述獲取模組、所述修剪模組及所述合成模組儲存在所述儲存器中,並由所述處理器執行。 The electronic device of claim 1, wherein the electronic device further includes a processor and a storage, wherein the acquisition module, the trimming module, and the synthesizing module are stored in the storage device And executed by the processor. 如申請專利範圍第1項所述的電子設備,其中,所述通訊模組向伺服器發送請求訊號,以請求所述伺服器建立所述電子設備與所述遠端設備之間的傳輸通道;所述通訊模組透過所述傳輸通道將所述視頻流即時傳送到所述遠端設備。 The electronic device of claim 1, wherein the communication module sends a request signal to the server to request the server to establish a transmission channel between the electronic device and the remote device; The communication module transmits the video stream to the remote device in real time through the transmission channel. 如申請專利範圍第1項所述的電子設備,其中,所述音訊轉碼器在編碼所述麥克風所採集的聲音訊號時還將所述聲音訊號所對應的採集時間嵌入到所述數位音訊資料中,從而使得所述數位音訊資料包括了對應的採集時間;及所述混合器將拍攝時間和採集時間相同的所述指定格式的影像和數位音訊資料進行混合。 The electronic device of claim 1, wherein the audio transcoder embeds an acquisition time corresponding to the audio signal into the digital audio data when encoding the audio signal collected by the microphone And wherein the digital audio data includes a corresponding acquisition time; and the mixer mixes the image of the specified format and the digital audio data with the same shooting time and acquisition time. 如申請專利範圍第1項所述的電子設備,其中,所述修剪方式為將所述第一靜態影像和第二靜態影像的寬度及高度中之至少一者修剪為一致。 The electronic device according to claim 1, wherein the trimming method is to trim at least one of a width and a height of the first still image and the second still image to be identical. 如申請專利範圍第5項所述的電子設備,其中,所述合成方式是指將所述第一靜態影像和第二靜態影像從垂直方向進行合成或從水平方向進行合成。 The electronic device according to claim 5, wherein the synthesizing means synthesizing the first still image and the second still image from a vertical direction or from a horizontal direction. 如申請專利範圍第1項所述的電子設備,其中,所述電子設備還包括:輸入裝置,用於接收輸入訊號;及輸入控制器,用於回應所述輸入訊號而生成相應的控制訊號,其中所述合成模組依據所述控制訊號改變所述的合成方式。 The electronic device of claim 1, wherein the electronic device further comprises: an input device, configured to receive an input signal; and an input controller, configured to generate a corresponding control signal in response to the input signal, The synthesizing module changes the synthesizing manner according to the control signal. 一種視頻流傳送方法,應用於電子設備,其中,該方法包括:採集步驟,採集聲音訊號;第一編碼步驟,編碼所採集的聲音訊號,從而獲得數位音訊資料;影像處理步驟包括:控制所述電子設備的第一攝像頭拍攝第一靜態影像以及控制所述電子設備的第二攝像頭拍攝所述第二靜態影像;按照指定的修剪方式對所述第一靜態影像和所述第二靜態影像中至少之一者進行修剪,使得所述第一靜態影像和第二靜態影像能夠以指定的合成方式進行合成;及按照所述指定的合成方式將對應於相同拍攝時間的所述第一靜態影像 和所述第二靜態影像進行合成,從而獲得合成的影像;第二編碼步驟,將所述合成的影像編碼成指定格式的影像;混合步驟,將所述指定格式的影像及所述數位音訊資料混合成視頻流;及傳送步驟,將所述視頻流傳送到遠端設備。 A video stream transmission method is applied to an electronic device, wherein the method includes: an acquisition step of acquiring an audio signal; a first encoding step of encoding the collected audio signal to obtain digital audio data; and the image processing step includes: controlling the The first camera of the electronic device captures the first still image and the second camera that controls the electronic device captures the second still image; at least the first still image and the second still image are in accordance with a specified clipping manner One of the trimming is performed such that the first still image and the second still image can be synthesized in a specified composite manner; and the first still image corresponding to the same shooting time is to be performed according to the specified composition manner Synthesizing with the second still image to obtain a synthesized image; a second encoding step of encoding the synthesized image into an image of a specified format; and a mixing step of capturing the image of the specified format and the digital audio data Mixing into a video stream; and transmitting a step of transmitting the video stream to a remote device. 如申請專利範圍第8項所述的視頻流傳送方法,其中,該方法還包括:請求步驟,向伺服器發送請求訊號,以請求所述伺服器建立所述電子設備與所述遠端設備之間的傳輸通道;及在所述傳送步驟中,透過所述傳輸通道將所述視頻流即時傳送到所述遠端設備。 The video streaming method of claim 8, wherein the method further comprises: a requesting step of transmitting a request signal to the server to request the server to establish the electronic device and the remote device And a transmission channel; and in the transmitting step, transmitting the video stream to the remote device through the transmission channel. 如申請專利範圍第8項所述的視頻流傳送方法,其中:在所述第一編碼步驟中:將所述聲音訊號所對應的採集時間嵌入到所述數位音訊資料中,從而使得所述數位音訊資料包括了對應的採集時間;及在所述混合步驟中,將所述指定格式的影像及所述數位音訊資料混合成視頻流時,將拍攝時間和採集時間相同的所述指定格式的影像和數位音訊資料進行混合。 The video stream transmission method of claim 8, wherein: in the first encoding step, embedding an acquisition time corresponding to the audio signal into the digital audio material, thereby causing the digit The audio data includes a corresponding acquisition time; and in the mixing step, when the image of the specified format and the digital audio data are mixed into a video stream, the image of the specified format with the same shooting time and acquisition time is used. Mix with digital audio data. 如申請專利範圍第8項所述的視頻流傳送方法,其中,所述修剪方式為將所述第一靜態影像和第二靜態影像的寬度及高度中之至少一者修剪為一致。 The video stream transmission method according to claim 8, wherein the trimming method is to trim at least one of a width and a height of the first still image and the second still image to be identical. 如申請專利範圍第11項所述的視頻流傳送方法,其中,所述合成方式是指將所述第一靜態影像和第二靜態影像從垂直方向進行合成或從水平方向進行合成。 The video streaming method according to claim 11, wherein the synthesizing means synthesizing the first still image and the second still image from a vertical direction or from a horizontal direction. 如申請專利範圍第8項所述的視頻流傳送方法,其中,該方法還包括步驟:接收輸入訊號;及回應所述輸入訊號而生成相應的控制訊號,其中在所述影像處理步驟中, 依據所述控制訊號改變所述的合成方式。 The video streaming method of claim 8, wherein the method further comprises the steps of: receiving an input signal; and generating a corresponding control signal in response to the input signal, wherein in the image processing step, The said synthesis mode is changed according to the control signal.
TW106127673A 2017-08-15 2017-08-15 Electronic device and method of sending video streaming TWI626846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106127673A TWI626846B (en) 2017-08-15 2017-08-15 Electronic device and method of sending video streaming

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106127673A TWI626846B (en) 2017-08-15 2017-08-15 Electronic device and method of sending video streaming

Publications (2)

Publication Number Publication Date
TWI626846B true TWI626846B (en) 2018-06-11
TW201911874A TW201911874A (en) 2019-03-16

Family

ID=63255815

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106127673A TWI626846B (en) 2017-08-15 2017-08-15 Electronic device and method of sending video streaming

Country Status (1)

Country Link
TW (1) TWI626846B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7480382B2 (en) * 2003-09-30 2009-01-20 Microsoft Corporation Image file container
CN103248807A (en) * 2012-02-03 2013-08-14 索尼公司 Image processing apparatus, image processing method, and program
US8702517B2 (en) * 2002-04-16 2014-04-22 Igt Gaming device methods and apparatus employing audio/video programming outcome presentation
CN104104872A (en) * 2014-07-16 2014-10-15 深圳市中兴移动通信有限公司 Object movement trajectory image synthesis method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8702517B2 (en) * 2002-04-16 2014-04-22 Igt Gaming device methods and apparatus employing audio/video programming outcome presentation
US7480382B2 (en) * 2003-09-30 2009-01-20 Microsoft Corporation Image file container
CN103248807A (en) * 2012-02-03 2013-08-14 索尼公司 Image processing apparatus, image processing method, and program
CN104104872A (en) * 2014-07-16 2014-10-15 深圳市中兴移动通信有限公司 Object movement trajectory image synthesis method and device

Also Published As

Publication number Publication date
TW201911874A (en) 2019-03-16

Similar Documents

Publication Publication Date Title
CN110944109B (en) Photographing method, device and equipment
US9083849B2 (en) Transmission terminal, transmission system, and non-transitory computer readable storage medium
CN108293104B (en) Information processing system, wireless terminal, and information processing method
TWI602437B (en) Video and audio processing devices and video conference system
US10791382B2 (en) Electronic device and method for sharing streaming video
CN114610253A (en) Screen projection method and equipment
WO2018014495A1 (en) Real-time panoramic live broadcast network camera and system and method
CN108353146A (en) device for video communication
CN103916623A (en) Display apparatus and method for video calling thereof
WO2012109831A1 (en) Method for shooting in video telephone and mobile terminal
WO2016112698A1 (en) Screen casting method, device and system
CN106254913A (en) The processing method and processing device of multi-medium data
CN107197172A (en) Net cast methods, devices and systems
US9430859B2 (en) Image processing apparatus, image relaying apparatus, method for processing image, and method for relaying image
CN104506792B (en) A kind of people and the method for pet video communication
CN107197139A (en) The data processing method of panorama camera
CN114830674B (en) Transmitter and receiver
CN116016977A (en) Live broadcast-based virtual co-host interaction method, computer equipment and media
CN110870293B (en) Video shooting processing method, device and video shooting processing system
TWI626846B (en) Electronic device and method of sending video streaming
JP6004978B2 (en) Subject image extraction device and subject image extraction / synthesis device
KR101887380B1 (en) Apparatus and method for transmitting and processing image filmed using a plurality of camera
CN108141564A (en) Systems and methods for video broadcasting
CN113038145B (en) Video processing method, device and system
JP2012156726A (en) Information processor, information processing method, and program