资源简介
jave-1.0.2.2.jar完全解决如下问题:
1、报错:it.sauronsoftware.jave.EncoderException: Metadata:
2、可以转换,可以播放,但是有个异常:it.sauronsoftware.jave.EncoderException: video:0kB audio:1301kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.019516%
通过解读源码,在windows下ok,而在linux下解析格式有所不同才导致上面的各种异常,最终修改了源码包中的Encoder.java,整合ffmpeg-2.7.2-x64版本
参考文献:
1、jave-1.0.2源码下载地址:http://www.sauronsoftware.it/projects/jave/download.php
2、ffmpeg下载地址:http://johnvansickle.com/ffmpeg/
3、林杰博客说明:http://linjie.org/2015/08/06/amr%E6%A0%BC%E5%BC%8F%E8%BD%ACmp3%E6%A0%BC%E5%BC%8F-%E5%AE%8C%E7%BE%8E%E8%A7%A3%E5%86%B3Linux%E4%B8%8B%E8%BD%AC%E6%8D%A20K%E9%97%AE%E9%A2%98/
代码片段和文件信息
/*
* JAVE - A Java Audio/Video Encoder (based on FFMPEG)
*
* Copyright (C) 2008-2009 Carlo Pelliccia (www.sauronsoftware.it)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not see .
*/
package it.sauronsoftware.jave;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Main class of the package. Instances can encode audio and video streams.
*
* @author Carlo Pelliccia
*/
public class Encoder {
/**
* This regexp is used to parse the ffmpeg output about the supported
* formats.
*/
private static final Pattern FORMAT_PATTERN = Pattern
.compile(“^\\s*([D ])([E ])\\s+([\\w]+)\\s+.+$“);
/**
* This regexp is used to parse the ffmpeg output about the included
* encoders/decoders.
*/
private static final Pattern ENCODER_DECODER_PATTERN = Pattern.compile(
“^\\s*([D ])([E ])([AVS]).{3}\\s+(.+)$“ Pattern.CASE_INSENSITIVE);
/**
* This regexp is used to parse the ffmpeg output about the ongoing encoding
* process.
*/
private static final Pattern PROGRESS_INFO_PATTERN = Pattern.compile(
“\\s*(\\w+)\\s*=\\s*(\\S+)\\s*“ Pattern.CASE_INSENSITIVE);
/**
* This regexp is used to parse the ffmpeg output about the size of a video
* stream.
*/
private static final Pattern SIZE_PATTERN = Pattern.compile(
“(\\d+)x(\\d+)“ Pattern.CASE_INSENSITIVE);
/**
* This regexp is used to parse the ffmpeg output about the frame rate value
* of a video stream.
*/
private static final Pattern frame_RATE_PATTERN = Pattern.compile(
“([\\d.]+)\\s+(?:fps|tb\\(r\\))“ Pattern.CASE_INSENSITIVE);
/**
* This regexp is used to parse the ffmpeg output about the bit rate value
* of a stream.
*/
private static final Pattern BIT_RATE_PATTERN = Pattern.compile(
“(\\d+)\\s+kb/s“ Pattern.CASE_INSENSITIVE);
/**
* This regexp is used to parse the ffmpeg output about the sampling rate of
* an audio stream.
*/
private static final Pattern SAMPLING_RATE_PATTERN = Pattern.compile(
“(\\d+)\\s+Hz“ Pattern.CASE_INSENSITIVE);
/**
* This regexp is used to parse the ffmpeg output about the channels number
* of an audio stream.
*/
private static final
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 30158 2016-01-06 16:36 Encoder.java
文件 15779513 2016-01-06 16:54 jave-1.0.2.2.jar
----------- --------- ---------- ----- ----
15809671 2
相关资源
- 支持rtsp的ffmpeg动态库
- opencv-3.1.0-windows-x86_64.jar + ffmpeg-3.1.2
- 最新全套Jar: FFMPEG3.4.1+JavaCV1.4.1+OpenC
- nginx、ffmpeg转流文件
- android 移植ffmpeg源码 实现rtsp流实时播
- FFmpeg for Android(静态库)
- javacv1.4版本视频处理主要使用的jar
- ffmpeg.exe
- FFmpegCommandHandler的jar包
- FFmpegCommandHandler
- FFmpeg android so文件与.h文件含arm、arm
- libffmpeg.so
- ffmpeg+mencoder视频压缩转码,视频截帧
- FFmpeg_audio_video_demo_android
- ffmpeg.exe和jave-2.0.jar获取视频时长
- FFmpegAndroidDemo.zip
- ffmpeg 编译so库android ndk来对视频编解码
- 一键安装ffmpeg4.1.3包含所有依赖.zip
- javacv-platform-1.5.1.zip
- ffmpeg安卓课程详解.pdf
- 使用ffmpeg.exe获取文件属性信息视频音
- linux上使用ffmpeg 实现视频截图
- ffmpeg-3.1.2-1.2.jar
- Jave万年历和时钟
- ffmpeg-java.jar
- nginx、ffmpeg转流java集成
- Eclipse JaveEE版本
- java ffmpeg视频转换
- Android视频解码高级开发实践视频教程
- 最新ffmpeg 4.0.2 android 可用so库
评论
共有 条评论