public class

MediaRecorder

extends Object

java.lang.Object
   ↳ android.media.MediaRecorder

Class Overview


Used to record audio and video. The recording control is based on a simple state machine (see below).

A common case of using MediaRecorder to record audio works as follows:

MediaRecorder recorder = new MediaRecorder(); 
 recorder.setAudioSource(MediaRecorder.AudioSource.MIC); 
 recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); 
 recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); 
 recorder.setOutputFile(PATH_NAME); 
 recorder.prepare(); 
 recorder.start();   // Recording is now started 
 ... 
 recorder.stop(); 
 recorder.reset();   // You can reuse the object by going back to setAudioSource() step 
 recorder.release(); // Now the object cannot be reused 
 

Applications may want to register for informational and error events in order to be informed of some internal update and possible runtime errors during recording. Registration for such events is done by setting the appropriate listeners (via calls (to
setOnInfoListener(OnInfoListener)setOnInfoListener
and/or setOnErrorListener(OnErrorListener)setOnErrorListener).
In order to receive the respective callback associated with these listeners, applications are required to create MediaRecorder objects on threads with a Looper running (the main UI thread by default already has a Looper running).

Note: Currently, MediaRecorder does not work on the emulator.

Developer Guides

For more information about how to use MediaRecorder for recording video, read the
Camera developer guide. For more information about how to use MediaRecorder for recording sound, read the
Audio Capture developer guide.

Summary


Nested Classes
class MediaRecorder.AudioEncoder Defines the audio encoding. 
class MediaRecorder.AudioSource Defines the audio source. 
interface MediaRecorder.OnErrorListener Interface definition for a callback to be invoked when an error occurs while recording. 
interface MediaRecorder.OnInfoListener Interface definition for a callback to be invoked when an error occurs while recording. 
class MediaRecorder.OutputFormat Defines the output format. 
class MediaRecorder.VideoEncoder Defines the video encoding. 
class MediaRecorder.VideoSource Defines the video source. 
Constants
int MEDIA_ERROR_SERVER_DIED Media server died.
int MEDIA_RECORDER_ERROR_UNKNOWN Unspecified media recorder error.
int MEDIA_RECORDER_INFO_MAX_DURATION_REACHED A maximum duration had been setup and has now been reached.
int MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED A maximum filesize had been setup and has now been reached.
int MEDIA_RECORDER_INFO_UNKNOWN Unspecified media recorder error.
Public Constructors
MediaRecorder()

Default constructor.
Public Methods
final static int getAudioSourceMax()

Gets the maximum value for audio sources.
int getMaxAmplitude()

Returns the maximum absolute amplitude that was sampled since the last call to this method.
Surface getSurface()

Gets the surface to record from when using SURFACE video source.
void prepare()

Prepares the recorder to begin capturing and encoding data.
void release()

Releases resources associated with this MediaRecorder object.
void reset()

Restarts the MediaRecorder to its idle state.
void setAudioChannels(int numChannels)

Sets the number of audio channels for recording.
void setAudioEncoder(int audio_encoder)

Sets the audio encoder to be used for recording.
void setAudioEncodingBitRate(int
bitRate)

Sets the audio encoding bit rate for recording.
void setAudioSamplingRate(int samplingRate)

Sets the audio sampling rate for recording.
void setAudioSource(int audio_source)

Sets the audio source to be used for recording.
void setCamera(Camera
c)

Sets a Camera to use for recording.
void setCaptureRate(double fps)

Set video frame capture rate.
void setLocation(float latitude, float
longitude)

Set and store the geodata (latitude and longitude) in the output file.
void setMaxDuration(int max_duration_ms)

Sets the maximum duration (in ms) of the recording session.
void setMaxFileSize(long max_filesize_bytes)

Sets the maximum filesize (in bytes) of the recording session.
void setOnErrorListener(MediaRecorder.OnErrorListener
l)

Register a callback to be invoked when an error occurs while recording.
void setOnInfoListener(MediaRecorder.OnInfoListener
listener)

Register a callback to be invoked when an informational event occurs while recording.
void setOrientationHint(int degrees)

Sets the orientation hint for output video playback.
void setOutputFile(FileDescriptor
fd)

Pass in the file descriptor of the file to be written.
void setOutputFile(String
path)

Sets the path of the output file to be produced.
void setOutputFormat(int output_format)

Sets the format of the output file produced during recording.
void setPreviewDisplay(Surface
sv)

Sets a Surface to show a preview of recorded media (video).
void setProfile(CamcorderProfile
profile)

Uses the settings from a CamcorderProfile object for recording.
void setVideoEncoder(int video_encoder)

Sets the video encoder to be used for recording.
void setVideoEncodingBitRate(int
bitRate)

Sets the video encoding bit rate for recording.
void setVideoFrameRate(int rate)

Sets the frame rate of the video to be captured.
void setVideoSize(int width, int height)

Sets the width and height of the video to be captured.
void setVideoSource(int video_source)

Sets the video source to be used for recording.
void start()

Begins capturing and encoding data to the file specified with setOutputFile().
void stop()

Stops recording.
Protected Methods
void finalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.
[Expand]

Inherited Methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this Object.
boolean equals(Object
o)

Compares this instance with the specified object and indicates if they are equal.
void finalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.
final Class<?> getClass()

Returns the unique instance of Class that represents this object's class.
int hashCode()

Returns an integer hash code for this object.
final void notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the
wait() methods) to be woken up.
final void notifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the
wait() methods) to be woken up.
String toString()

Returns a string containing a concise, human-readable description of this object.
final void wait()

Causes the calling thread to wait until another thread calls the
notify() or notifyAll() method of this object.
final void wait(long millis, int nanos)

Causes the calling thread to wait until another thread calls the
notify() or notifyAll() method of this object or until the specified timeout expires.
final void wait(long millis)

Causes the calling thread to wait until another thread calls the
notify() or notifyAll() method of this object or until the specified timeout expires.

Constants


public static final int
MEDIA_ERROR_SERVER_DIED

Added in API level 17

Media server died. In this case, the application must release the MediaRecorder object and instantiate a new one.

Constant Value: 100 (0x00000064)

public static final int
MEDIA_RECORDER_ERROR_UNKNOWN

Added in API level 3

Unspecified media recorder error.

Constant Value: 1 (0x00000001)

public static final int
MEDIA_RECORDER_INFO_MAX_DURATION_REACHED

Added in API level 3

A maximum duration had been setup and has now been reached.

Constant Value: 800 (0x00000320)

public static final int
MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED

Added in API level 3

A maximum filesize had been setup and has now been reached.

Constant Value: 801 (0x00000321)

public static final int
MEDIA_RECORDER_INFO_UNKNOWN

Added in API level 3

Unspecified media recorder error.

Constant Value: 1 (0x00000001)

Public Constructors


public MediaRecorder
()

Added in API level 1

Default constructor.

Public Methods


public static final int
getAudioSourceMax ()

Added in API level 4

Gets the maximum value for audio sources.

public int getMaxAmplitude
()

Added in API level 1

Returns the maximum absolute amplitude that was sampled since the last call to this method. Call this only after the setAudioSource().

Returns
  • the maximum absolute amplitude measured since the last call, or 0 when called for the first time
Throws
IllegalStateException if it is called before the audio source has been set.

public Surface getSurface ()

Gets the surface to record from when using SURFACE video source.

Should only be called after prepare(). Frames rendered before start() will be discarded.

Throws
IllegalStateException if it is called before prepare(), after stop() or is called when VideoSource is not set to SURFACE.

public void prepare
()

Added in API level 1

Prepares the recorder to begin capturing and encoding data. This method must be called after setting up the desired audio and video sources, encoders, file format, etc., but before start().

Throws
IllegalStateException if it is called after start() or before setOutputFormat().
IOException if prepare fails otherwise.

public void release
()

Added in API level 1

Releases resources associated with this MediaRecorder object. It is good practice to call this method when you're done using the MediaRecorder. In particular, whenever an Activity of an application is paused (its onPause() method is called), or stopped (its
onStop() method is called), this method should be invoked to release the MediaRecorder object, unless the application has a special need to keep the object around. In addition to unnecessary resources (such as memory and instances of codecs) being held, failure
to call this method immediately if a MediaRecorder object is no longer needed may also lead to continuous battery consumption for mobile devices, and recording failure for other applications if no multiple instances of the same codec are supported on a device.
Even if multiple instances of the same codec are supported, some performance degradation may be expected when unnecessary multiple instances are used at the same time.

public void reset
()

Added in API level 1

Restarts the MediaRecorder to its idle state. After calling this method, you will have to configure it again as if it had just been constructed.

public void setAudioChannels
(int numChannels)

Added in API level 8

Sets the number of audio channels for recording. Call this method before prepare(). Prepare() may perform additional checks on the parameter to make sure whether the specified number of audio channels are applicable.

Parameters
numChannels the number of audio channels. Usually it is either 1 (mono) or 2 (stereo).

public void setAudioEncoder
(int audio_encoder)

Added in API level 1

Sets the audio encoder to be used for recording. If this method is not called, the output file will not contain an audio track. Call this after setOutputFormat() but before prepare().

Parameters
audio_encoder the audio encoder to use.
Throws
IllegalStateException if it is called before setOutputFormat() or after prepare().

public void setAudioEncodingBitRate
(int bitRate)

Added in API level 8

Sets the audio encoding bit rate for recording. Call this method before prepare(). Prepare() may perform additional checks on the parameter to make sure whether the specified bit rate is applicable, and sometimes the passed bitRate will be clipped internally
to ensure the audio recording can proceed smoothly based on the capabilities of the platform.

Parameters
bitRate the audio encoding bit rate in bits per second.

public void setAudioSamplingRate
(int samplingRate)

Added in API level 8

Sets the audio sampling rate for recording. Call this method before prepare(). Prepare() may perform additional checks on the parameter to make sure whether the specified audio sampling rate is applicable. The sampling rate really depends on the format for
the audio recording, as well as the capabilities of the platform. For instance, the sampling rate supported by AAC audio coding standard ranges from 8 to 96 kHz, the sampling rate supported by AMRNB is 8kHz, and the sampling rate supported by AMRWB is 16kHz.
Please consult with the related audio coding standard for the supported audio sampling rate.

Parameters
samplingRate the sampling rate for audio in samples per second.

public void setAudioSource
(int audio_source)

Added in API level 1

Sets the audio source to be used for recording. If this method is not called, the output file will not contain an audio track. The source needs to be specified before setting recording-parameters or encoders. Call this only before setOutputFormat().

Parameters
audio_source the audio source to use
Throws
IllegalStateException if it is called after setOutputFormat()

public void setCamera
(Camera c)

Added in API level 3

Sets a Camera to use for recording. Use this function to switch quickly between preview and capture mode without a teardown of the camera object.
unlock() should be called before this. Must call before prepare().

Parameters
c the Camera to use for recording

public void setCaptureRate
(double fps)

Added in API level 11

Set video frame capture rate. This can be used to set a different video frame capture rate than the recorded video's playback rate. This method also sets the recording mode to time lapse. In time lapse video recording, only video is recorded. Audio related
parameters are ignored when a time lapse recording session starts, if an application sets them.

Parameters
fps Rate at which frames should be captured in frames per second. The fps can go as low as desired. However the fastest fps will be limited by the hardware. For resolutions that can be captured by the video camera, the fastest fps can be computed using
getPreviewFpsRange(int[]). For higher resolutions the fastest fps may be more restrictive.
Note that the recorder cannot guarantee that frames will be captured at the given rate due to camera/encoder limitations. However it tries to be as close as possible.

public void setLocation
(float latitude, float longitude)

Added in API level 14

Set and store the geodata (latitude and longitude) in the output file. This method should be called before prepare(). The geodata is stored in udta box if the output format is OutputFormat.THREE_GPP or OutputFormat.MPEG_4, and is ignored for other output
formats. The geodata is stored according to ISO-6709 standard.

Parameters
latitude latitude in degrees. Its value must be in the range [-90, 90].
longitude longitude in degrees. Its value must be in the range [-180, 180].
Throws
IllegalArgumentException if the given latitude or longitude is out of range.

public void setMaxDuration
(int max_duration_ms)

Added in API level 3

Sets the maximum duration (in ms) of the recording session. Call this after setOutFormat() but before prepare(). After recording reaches the specified duration, a notification will be sent to the
MediaRecorder.OnInfoListener with a "what" code of
MEDIA_RECORDER_INFO_MAX_DURATION_REACHED and recording will be stopped.
Stopping happens asynchronously, there is no guarantee that the recorder will have stopped by the time the listener is notified.

Parameters
max_duration_ms the maximum duration in ms (if zero or negative, disables the duration limit)

public void setMaxFileSize
(long max_filesize_bytes)

Added in API level 3

Sets the maximum filesize (in bytes) of the recording session. Call this after setOutFormat() but before prepare(). After recording reaches the specified filesize, a notification will be sent to the
MediaRecorder.OnInfoListener with a "what" code of
MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED and recording will be stopped.
Stopping happens asynchronously, there is no guarantee that the recorder will have stopped by the time the listener is notified.

Parameters
max_filesize_bytes the maximum filesize in bytes (if zero or negative, disables the limit)

public void setOnErrorListener
(MediaRecorder.OnErrorListener l)

Added in API level 3

Register a callback to be invoked when an error occurs while recording.

Parameters
l the callback that will be run

public void setOnInfoListener
(MediaRecorder.OnInfoListener listener)

Added in API level 3

Register a callback to be invoked when an informational event occurs while recording.

Parameters
listener the callback that will be run

public void setOrientationHint
(int degrees)

Added in API level 9

Sets the orientation hint for output video playback. This method should be called before prepare(). This method will not trigger the source video frame to rotate during video recording, but to add a composition matrix containing the rotation angle in the
output video if the output format is OutputFormat.THREE_GPP or OutputFormat.MPEG_4 so that a video player can choose the proper orientation for playback. Note that some video players may choose to ignore the compostion matrix in a video during playback.

Parameters
degrees the angle to be rotated clockwise in degrees. The supported angles are 0, 90, 180, and 270 degrees.
Throws
IllegalArgumentException if the angle is not supported.

public void setOutputFile
(FileDescriptor fd)

Added in API level 3

Pass in the file descriptor of the file to be written. Call this after setOutputFormat() but before prepare().

Parameters
fd an open file descriptor to be written into.
Throws
IllegalStateException if it is called before setOutputFormat() or after prepare()

public void setOutputFile
(String path)

Added in API level 1

Sets the path of the output file to be produced. Call this after setOutputFormat() but before prepare().

Parameters
path The pathname to use.
Throws
IllegalStateException if it is called before setOutputFormat() or after prepare()

public void setOutputFormat
(int output_format)

Added in API level 1

Sets the format of the output file produced during recording. Call this after setAudioSource()/setVideoSource() but before prepare().

It is recommended to always use 3GP format when using the H.263 video encoder and AMR audio encoder. Using an MPEG-4 container format may confuse some desktop players.

Parameters
output_format the output format to use. The output format needs to be specified before setting recording-parameters or encoders.
Throws
IllegalStateException if it is called after prepare() or before setAudioSource()/setVideoSource().

public void setPreviewDisplay
(Surface sv)

Added in API level 1

Sets a Surface to show a preview of recorded media (video). Calls this before prepare() to make sure that the desirable preview display is set. If
setCamera(Camera) is used and the surface has been already set to the camera,
application do not need to call this. If this is called with non-null surface, the preview surface of the camera will be replaced by the new surface. If this method is called with null surface or not called at all, media recorder will not change the preview
surface of the camera.

Parameters
sv the Surface to use for the preview

public void setProfile
(CamcorderProfile profile)

Added in API level 8

Uses the settings from a CamcorderProfile object for recording. This method should be called after the video AND audio sources are set, and before setOutputFile(). If a time lapse CamcorderProfile is used, audio related source or recording parameters are
ignored.

Parameters
profile the CamcorderProfile to use
See Also

public void setVideoEncoder
(int video_encoder)

Added in API level 3

Sets the video encoder to be used for recording. If this method is not called, the output file will not contain an video track. Call this after setOutputFormat() and before prepare().

Parameters
video_encoder the video encoder to use.
Throws
IllegalStateException if it is called before setOutputFormat() or after prepare()

public void setVideoEncodingBitRate
(int bitRate)

Added in API level 8

Sets the video encoding bit rate for recording. Call this method before prepare(). Prepare() may perform additional checks on the parameter to make sure whether the specified bit rate is applicable, and sometimes the passed bitRate will be clipped internally
to ensure the video recording can proceed smoothly based on the capabilities of the platform.

Parameters
bitRate the video encoding bit rate in bits per second.

public void setVideoFrameRate
(int rate)

Added in API level 3

Sets the frame rate of the video to be captured. Must be called after setVideoSource(). Call this after setOutFormat() but before prepare().

Parameters
rate the number of frames per second of video to capture
Throws
IllegalStateException if it is called after prepare() or before setOutputFormat(). NOTE: On some devices that have auto-frame rate, this sets the maximum frame rate, not a constant frame rate. Actual frame rate will vary according to lighting conditions.

public void setVideoSize
(int width, int height)

Added in API level 3

Sets the width and height of the video to be captured. Must be called after setVideoSource(). Call this after setOutFormat() but before prepare().

Parameters
width the width of the video to be captured
height the height of the video to be captured
Throws
IllegalStateException if it is called after prepare() or before setOutputFormat()

public void setVideoSource
(int video_source)

Added in API level 3

Sets the video source to be used for recording. If this method is not called, the output file will not contain an video track. The source needs to be specified before setting recording-parameters or encoders. Call this only before setOutputFormat().

Parameters
video_source the video source to use
Throws
IllegalStateException if it is called after setOutputFormat()

public void start
()

Added in API level 1

Begins capturing and encoding data to the file specified with setOutputFile(). Call this after prepare().

Since API level 13, if applications set a camera via setCamera(Camera), the
apps can use the camera after this method call. The apps do not need to lock the camera again. However, if this method fails, the apps should still lock the camera back. The apps should not start another recording session during recording.

Throws
IllegalStateException if it is called before prepare().

public void stop
()

Added in API level 1

Stops recording. Call this after start(). Once recording is stopped, you will have to configure it again as if it has just been constructed. Note that a RuntimeException is intentionally thrown to the application, if no valid audio/video data has been received
when stop() is called. This happens if stop() is called immediately after start(). The failure lets the application take action accordingly to clean up the output file (delete the output file, for instance), since the output file is not properly constructed
when this happens.

Throws
IllegalStateException if it is called before start()

Protected Methods


protected void finalize
()

Added in API level 1

Invoked when the garbage collector has detected that this instance is no longer reachable. The default implementation does nothing, but this method can be overridden to free resources.

Note that objects that override finalize are significantly more expensive than objects that don't. Finalizers may be run a long time after the object is no longer reachable, depending on memory pressure, so it's a bad idea to rely on them for
cleanup. Note also that finalizers are run on a single VM-wide finalizer thread, so doing blocking work in a finalizer is a bad idea. A finalizer is usually only necessary for a class that has a native peer and needs to call a native method to destroy that
peer. Even then, it's better to provide an explicit close method (and implement
Closeable), and insist that callers manually dispose of instances. This works well for something like files, but less well
for something like a BigInteger where typical calling code would have to deal with lots of temporaries. Unfortunately, code that creates lots of temporaries is the worst kind of code from the point of view of the single finalizer thread.

If you must use finalizers, consider at least providing your own
ReferenceQueue
and having your own thread process that queue.

Unlike constructors, finalizers are not automatically chained. You are responsible for calling
super.finalize() yourself.

Uncaught exceptions thrown by finalizers are ignored and do not terminate the finalizer thread. See
Effective Java Item 7, "Avoid finalizers" for more.

MediaRecorder test的更多相关文章

  1. 录像时调用MediaRecorder的start()时发生start failed: -19错误

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 ...

  2. Android音视频之MediaRecorder音视频录制

    前言: 公司产品有很多地方都需要上传音频视频,今天抽空总结一下音频视频的录制.学习的主角是MediaRecorder类. MediaRecorder类介绍: MediaRecorder类是Androi ...

  3. Android音频开发之MediaRecorder/MediaPlayer

    前言: 上次我们介绍了实时采集音频数据以及播放,今天我们来认识一下直接录制文件的方式. 直接上代码:录制管理类 public class MediaRecorderManager { public s ...

  4. Android-MediaRecorder-音频录制-警告-W/MediaRecorder(13811): mediarecorder went away with unhandled events

    Android-MediaRecorder-音频录制-警告-W/MediaRecorder(13811): mediarecorder went away with unhandled events ...

  5. Android调用手机摄像头使用MediaRecorder录像并播放

    最近在项目开发中需要调用系统的摄像头录像并播放. 在开发中遇到了两个问题,记录下: (1)开发过程中出现摄像头占用,启动失败,报错.但是我已经在onDestory()中关闭了资源. 报错原因:打开程序 ...

  6. 【Android】用MediaRecorder录制视频太短崩的问题

    具体表现: 调用MediaRecorder的start()与stop()间隔不能小于1秒(有时候大于1秒也崩),否则必崩. 错误信息: java.lang.RuntimeException: stop ...

  7. Android开发之MediaRecorder类详解

    MediaRecorder类介绍: MediaRecorder类是Android sdk提供的一个专门用于音视频录制,一般利用手机麦克风采集音频,摄像头采集图片信息. MediaRecorder主要函 ...

  8. Android MediaRecorder录制音频

    今天介绍一下在Android中怎么录制音频,在Android中使用MediaRecorder来录制音频,步骤: 1.创建MediaRecorder对象. 2.调用MediaRecorder对象的set ...

  9. Android多媒体录制--MediaRecorder视频录制

    Android使用MediaRecorder类进行视频的录制. 需要注意,使用MediaRecorder 录音录像 的设置代码步骤一定要按照API指定的顺序来设置,否则报错 步骤为: 1.设置视频源, ...

  10. 使用MediaRecorder录制视频短片

    MediaRecorder除了可用于录制音频之外,还可用于录制视频,使用MediaRecorder录制视频与录制音频的步骤基本相同.只是录制视频时不仅需要采集声音,还需要采集图像.为了让MediaRe ...

随机推荐

  1. mysql截取函数,拼接函数,大写函数例子

    题目:这题目是牛客网sql题,因为牵扯到3个函数,都是自己没怎么用过的,所以记录一下. 答案:是别人的解题思路 可以看出在mysql中提供的函数可以供我们使用来操作字段,非常的方便

  2. Linux系统运维之FastDFS集群部署

    一.简介 FastDFS是一个开源的轻量级分布式文件系统,它对文件进行管理,功能包括:文件存储.文件同步.文件访问(文件上传.文件下载)等,解决了大容量存储和负载均衡的问题.FastDFS服务端有两个 ...

  3. ARHUD驾车导航技术概览

    ​ ARHUD (Augmented Reality Head Up Display),即增强现实与抬头显示的结合,是一种将渲染元素投影在真实世界的技术,也是目前用户理解成本最低的展示方式. HUD功 ...

  4. Java 基础复习——StringBuffer 和 StringBuilder

    StringBuffer 和 StringBuilder StringBuffer 类 简介 java.lang.StringBuffer 代表可变的字符序列,可以对字符串内容进行增删 很多方法和 S ...

  5. 创建属于自己的github、使用git提交、更新代码至github、写好readme

    1. 在github上创建一个Repository 点击github网站,你可以用你的邮箱先注册一个账号. 点击New,转到创建一个repository的界面,如下图所示,你可以填写你的Reposit ...

  6. Ubuntu 20.04使用 VNC远程桌面连接避坑指南

    Ubuntu 20.04使用 VNC远程桌面连接避坑指南 自从开始使用Ubuntu 20.04搭建深度学习服务器,就想到使用VNC远程桌面连接使用.可是之前一直使用的是Ubuntu18.04,心里想着 ...

  7. typedef函数的使用

    typedef int INT; //相当于给int起了一个别名INT typedef struct Student { int sid; char name[100]; char sex; }ST; ...

  8. PostgreSQL+GeoHash地图点位聚合

    PG数据库安装扩展 需要用到pg数据库的空间扩展postgis,在进行操作之前需要在数据库中安装扩展. CREATE EXTENSION postgis; CREATE EXTENSION postg ...

  9. [jmeter]简介与安装

    简介 JMeter是开源软件Apache基金会下的一个性能测试工具,用来测试部署在服务器端的应用程序的性能. 安装 安装jmeter 从 官网 下载jmeter的压缩包 安装jdk并配置 JAVA_H ...

  10. CentOS安装ffmpeg并转码视频为mp4

    前言 现需要将一批avi格式的视频转码为mp4,以下为操作步骤.系统版本为CentOS 7. 如果不安装x264,转码后只有声音,没有视频. 编译安装nasm wget https://www.nas ...