This is because you need to compile a system for collecting video files from a specific website, converting the format, and automatically uploading and publishing video files. This is not a problem with collection, uploading, and publishing. However, the conversion of video formats has plagued a long time, so I will record and share this technology for your reference.
Generally, ffmpeg and mencoder are used for video format conversion. However, according to online materials, ffmpeg has high performance and mencoder has better functions. So come on with mencoder.
String mencoderargs = "-oac faac-faacopts mpeg = 4: object = 2: raw: br = 128-ovc x264-x264encopts global_header: no8x8dct: nocabac: weightp = 0: bframes = 0: level_idc = 30-of lavf-vf scale =-3: 488, harddup ";
String args = string. Format ("{0}-o {1} {2}", FLVFILEPATH, MP4FILEPATH), mencoderargs );
Process p = CreateProcess ("mencoder.exe", args, string. Empty );
P. Start ();
P. BeginOutputReadLine ();
P. StandardInput. WriteLine ("exit"); // enter the exit command
P. WaitForExit ();
P. Close ();
P. Dispose ();
The key point is mencoderargs. Many parameters have been found on the Internet, which can be converted to MP4. android can play, but ios iphone and ipad cannot play. Later I found an English document, the specific link is missing. We can say that mp4 in ios has specifications for audio and video. However, if you forget the specifications, you can search for them online and cannot find them, I can refer to this article, but it is not the one I have read before. I mentioned a little bit for your reference:
Http://blog.jharding.org/2008/05/encoding-video-for-iphone-with-mencoder.html
I will not go into the details. The technology will solve the problem.
I will learn new knowledge points in the future, but I still need to summarize them in a timely manner. I have forgotten all the time, so it's better to remember them!