When converting videos in multiple formats into FLV formats, we focus on the quality and size of converted FLV videos. Next I will share with you my practical experience, mainly for the analysis of AVI, 3GP, MP4 and WMV formats. When using FFMPEG for video conversion, we usually use the following main parameters to control audio and video:-AB bitrate: Set the audio bit rate.-Acodec codec uses codec encoding/Decoding-AC channels: Specifies the channel.
Let's play with the video recording function of mobile phones. Make a DEMO.
Check the recording process:
Copy codeThe Code is as follows: mediarecorder = new MediaRecorder (); // create a mediarecorder object
// Set the recorded video source to Camera (Camera)
Mediarecorder. setVideoSource (MediaRecorder. VideoSource. CAMERA );
// Set the video Encapsulation Format THREE_GPP to 3gp. MPEG_4 to mp4 after recording.
Mediarecorder. setOutputFormat (Media
-known file formats can be converted freely. The function is quite good. It can be said that it is a versatile tool, and the page is simple and easy to use, and the speed is also very good !! ()
Youconvertit provides the perfect online file conversion service to convert documents, images, audios, and video files online. Supports 41 document formats (such as HTML, txt, PPT, Doc, PDF, RTF, CSV, PSD, xls, XHTML, and XLS) and 85 image formats (such as BMP, JPG, GIF, Tiff, ICO, and PNG) 7 audio form
Recently, due to the project needs, the study of how to use Java to achieve video conversion, "really" waste a little thought, finishing, write to their own forget.IdeasSince there is no previous experience of the relevant functions, I really don't know where to start at first. Of course, this solution, Google immediately found the ffmpeg, online commentary with Java+ffmpeg to do video conversion of the article also a few, I mainly refer to this article.The above mentioned article, basically has
About 3GPP
In todays mobile phones the 3GPP standard is widely in use for videos on the phone. Newer camera mobiles can take movies from their integrated camera which are encoded in 3GPP (usually with suffix. 3GP ).
Currently, 3GPP standards are widely used in mobile phone video screens. Recently, mobile phones can use their own integrated cameras to take a 3GPP-encoded movie (usually later.
after each record to indicate whether the current product record contains a video. In addition, you can query products based on whether videos are available in the query condition area above.
2. Solution
Concepts such as left link, regular expression, function, deduplication, and ROWNUM
Method 1: A large and comprehensive SQL statement
When I did this, I first thought of using a complicated SQL statement to spell out an SQL statement to find all the product records to be displayed.
Therefore,
, in the above query criteria area can be in accordance with whether or not video product query.2, solve the ideaConcepts related to left links, regular expressions, functions, de-weight, rownum, etc.Mode 1: A chatty SQL statementWhen I do this, the first thing I want to do is to use a more complex SQL statement to spell out an SQL statement to find out all the product records that are going to be displayed.So first think of the left link, because the need to ensure that all the records on the l
The core is the use of ffmpeg for video conversion, we do not write the conversion video code, just call FFmpeg, it will help us complete the video conversion. The types supported by FFmpeg are: asx,asf,mpg,wmv,3gp,mp4,mov,avi,flv, etc., which can be converted directly using FFmpeg. FFmpeg unsupported types are: WMV9,RM,RMVB, etc., these types need to be converted to AVI (ffmpeg resolvable) format first with another tool (MEncoder).Nonsense not mostly
fully consider the user experience feeling! To put the heat good popularity of high to the key position (this stationmaster should all know). Forum as far as possible not to open too many sections (or in the Forum positioning). Layer also not too deep, too deep let users find a post points 5-6 times although the site's PV, but reduced the stickiness of the site. After the good section will be human flesh filling content! 3gp.cn on the content I spent 2 days in browsing a lot of
In addition to using MediaPlayer to play videos, Android also provides a VideoView to play videos more conveniently. VideoView is a subclass of View. It can be used in all places that support View, including its definition in the AndroidManifest. xml file:
Android: orientation = "vertical"Android: layout_width = "match_parent"Android: layout_height = "match_parent">
Android: id = "@ + id/surface_view"Android: layout_width = "320px"Android: layout_height = "240px"/>
VideoView can play files from
Recently, a 3GP/MP4 Player uses FFMPEG to extract MPEG4 raw data from the Demux file of 3GP/MP4, which cannot be directly used for decoding. You need to add the vol header before the first frame. I copied the implementation of FFMPEG's encode_vol_header, and many files (especially qvga files) cannot be decoded.
Finally, we learned that this vol does not need to be generated by ourselves. We only need to cop
) mmediarecorder = new mediarecorder (); else mmediarecorder. reset (); // 〇 state: initial => initialized // set audio source as microphone, video source as camera // Specified before settings recording-parameters or encoders, called only before setoutputformat mmediarecorder. setvideosource (mediarecorder. videosource. camera); // mmediarecorder. setaudiosource (mediarecorder. audiosource. MIC); // 〇 state: initialized => performanceconfigured // set the Audio Encoding encoding output format /
Briefly describe the video formats supported by Android, as follows:
Different mobile phones support different encoding/decoding methods due to different hardware.G1 supports Decoding in the WMA, WMV, and H.264 AVC formats. Android-supported audio/video encoding methods include: AMR-NB, H.263,The output video format is *. 3GP or *. MP4, which should be noted in future development.
After learning about Android coding and decoding, let's study how to pl
receive RTP packets from the network? Then decode and call the SDL display, right?Thank you, Wang lile.
ReplyNing: Ha, it seems that ffplay can be used as a client?Can ffplay receive RTP packets from the network? Then decode and call the SDL display, right?Thank you.If ffplay wants to play RTSP/RTP streams from ffserver, you may need to modify the code. I don't know whether the latest ffplay can be played directly, that is, like ffplay rtsp: // IP: 5454/file, you can try.I tried to send the dat
resolution of iOS and Android devices. If you are not in trouble, and the video performance varies greatly in different bit rates, or you need to make it clearer on the computer, encode several different bit rates.
2. For some old mobile devices, select 3GP/MPEG4. Most Blackberry phones and some Android phones support this format. At the same time, 3GP can be played on iPhone and iPod.
3. About WebM, it ma
. But of course, if there is a benefit, there will be a disadvantage. A higher compression ratio will naturally lead to an increase in the amount of computing. 264 of the computing workload is more than twice that of MPEG4. However, given the limited bandwidth of the current GPRS Service, we have to use H. 264 is the preferred codec solution. After all, it consumes less bandwidth. Let's take a look at the MP4 file format. In fact, the MP4 file format is the same as the
also print the cause and prompt information, which is very good.
2. Different file formats are also required for codec that can be placed in the file. For example, MP4 cannot be put into h263/MP3. Therefore, when it is converted to h263, all output files are 3GP. If file format is incorrect, the error message of FFmpeg is: [This is basically the case. FFmpeg is very useful, especially for converting different media files and codec. For more informati
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.