|
@@ -154,12 +154,14 @@
|
|
|
</vxe-column>
|
|
|
<vxe-column field="fenbianlv" title="分辨率" width="100">
|
|
|
<template #default="{ row }">
|
|
|
- <span>{{row.fenbianlv}}</span>
|
|
|
+ <span v-if="row.fenbianlv">{{row.fenbianlv}}</span>
|
|
|
+ <span v-else>-</span>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column field="duration" title="码率" width="100">
|
|
|
<template #default="{ row }">
|
|
|
- <span>{{row.bitrate}}bps</span>
|
|
|
+ <span v-if="row.bitrate">{{(row.bitrate / 1024).toFixed(0)}}kbps</span>
|
|
|
+ <span v-else>-</span>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column field="progress" title="转换进度" width="180">
|
|
@@ -187,15 +189,15 @@
|
|
|
</el-select>
|
|
|
|
|
|
<label class="handle-label">视频清晰度:</label>
|
|
|
- <el-select v-model="handleData.type" style="width:100px" size="small">
|
|
|
+ <el-select v-model="handleData.type" style="width:100px" size="small" @change="selectVideoType">
|
|
|
<el-option :value="1" label="画质区分"></el-option>
|
|
|
- <el-option :value="2" label="码率区分">码率区分</el-option>
|
|
|
+ <el-option :value="2" label="码率区分"></el-option>
|
|
|
</el-select>
|
|
|
|
|
|
<template v-if="handleData.type == 2">
|
|
|
<label class="handle-label">视频码率:</label>
|
|
|
<el-select v-model="handleData.quality" style="width:100px;" size="small">
|
|
|
- <!-- <el-option value="1" label="同源视频"></el-option> -->
|
|
|
+ <el-option value="1" label="同源视频"></el-option>
|
|
|
<el-option value="1m" label="1Mbit/s"></el-option>
|
|
|
<el-option value="1.5m" label="1.5Mbit/s"></el-option>
|
|
|
<el-option value="2m" label="2Mbit/s"></el-option>
|
|
@@ -209,8 +211,8 @@
|
|
|
<template v-else>
|
|
|
<label class="handle-label">视频画质:</label>
|
|
|
<el-select v-model="handleData.quality" style="width:80px" size="small">
|
|
|
- <el-option value="1" label="高清"></el-option>
|
|
|
- <el-option value="2" label="标清"></el-option>
|
|
|
+ <el-option value="1" label="原画"></el-option>
|
|
|
+ <el-option value="2" label="高清"></el-option>
|
|
|
<el-option value="3" label="流畅"></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
@@ -375,41 +377,6 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
- <!-- 文件信息弹窗 -->
|
|
|
- <el-dialog title="文件详情" :visible.sync="fileDetailModel" width="500px">
|
|
|
- <el-descriptions v-if="showIndex !== ''" class="margin-top" :column="1" size="medium" border>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 文件名
|
|
|
- </template>
|
|
|
- {{videoList[showIndex].name}}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 比特率
|
|
|
- </template>
|
|
|
- {{videoList[showIndex].bitrate}}bps
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 时长
|
|
|
- </template>
|
|
|
- {{formatSeconds(videoList[showIndex].duration)}}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 采样率
|
|
|
- </template>
|
|
|
- {{videoList[showIndex].sample_rate}}HZ
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label">
|
|
|
- 标题
|
|
|
- </template>
|
|
|
- {{videoList[showIndex].tags ? videoList[showIndex].tags.title : '-'}}
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </el-dialog>
|
|
|
</el-main>
|
|
|
<el-footer height="48px">
|
|
|
<!-- 更新 -->
|
|
@@ -445,7 +412,6 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
tabLoading: false,
|
|
|
- fileDetailModel: false,
|
|
|
//
|
|
|
isShow:false,
|
|
|
hebingInfo_percent:0,
|
|
@@ -454,141 +420,6 @@ export default {
|
|
|
imgUrl: this.$api.imgUrl,
|
|
|
imgSrc: '',
|
|
|
videoList: [],
|
|
|
- columns: [{
|
|
|
- title: '文件名称',
|
|
|
- key: 'name',
|
|
|
- minWidth: 95,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '大小',
|
|
|
- key: 'size',
|
|
|
- width: 100,
|
|
|
- render:(h,params) => {
|
|
|
- return h('span',this.$utils.handleSize(params.row.size))
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '时间',
|
|
|
- key: 'duration',
|
|
|
- width: 100,
|
|
|
- render:(h,params) => {
|
|
|
- return h('span',this.formatSeconds(params.row.duration))
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title:"进度",
|
|
|
- minWidth: 105,
|
|
|
- maxWidth: 220,
|
|
|
- slot:"progress"
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- key: 'action',
|
|
|
- width: 130,
|
|
|
- render: (h, params) => {
|
|
|
- let btnArr = [];
|
|
|
-
|
|
|
- if(this.menuIndex != '2' && (params.row.percent == 100 || params.row.percent == 0)){
|
|
|
- btnArr.push(h('Button', {
|
|
|
- props: {
|
|
|
- type: 'primary',
|
|
|
- size: 'small',
|
|
|
- },
|
|
|
- style:{
|
|
|
- marginRight:"5px"
|
|
|
- },
|
|
|
- on: {
|
|
|
- click: () => {
|
|
|
- this.exportOneItem(params.index, params.row)
|
|
|
- }
|
|
|
- }
|
|
|
- }, '开始'))
|
|
|
- }
|
|
|
-
|
|
|
- if(this.menuIndex == '2'){
|
|
|
- let upDisabled = false;
|
|
|
- let downDisabled = false;
|
|
|
- if(params.index == 0){
|
|
|
- upDisabled = true;
|
|
|
- }
|
|
|
- if(params.index == this.videoList.length - 1){
|
|
|
- downDisabled = true;
|
|
|
- }
|
|
|
- btnArr.push([
|
|
|
- h('Button', {
|
|
|
- props: {
|
|
|
- type: 'primary',
|
|
|
- size: 'small',
|
|
|
- disabled: upDisabled
|
|
|
- },
|
|
|
- style: {
|
|
|
- padding: "0 2px",
|
|
|
- marginRight: "5px"
|
|
|
- },
|
|
|
- on: {
|
|
|
- click: (e) => {
|
|
|
- e.stopPropagation();
|
|
|
- this.fileSort('up', params.index);
|
|
|
- }
|
|
|
- }
|
|
|
- }, [h('Icon', {
|
|
|
- props: {
|
|
|
- type: 'md-arrow-up',
|
|
|
- }
|
|
|
- })]
|
|
|
- ),
|
|
|
- h('Button', {
|
|
|
- props: {
|
|
|
- type: 'primary',
|
|
|
- size: 'small',
|
|
|
- disabled: downDisabled
|
|
|
- },
|
|
|
- style: {
|
|
|
- padding: "0 2px",
|
|
|
- marginRight: "5px"
|
|
|
- },
|
|
|
- on: {
|
|
|
- click: (e) => {
|
|
|
- e.stopPropagation()
|
|
|
- this.fileSort('down', params.index);
|
|
|
- }
|
|
|
- }
|
|
|
- }, [h('Icon', {
|
|
|
- props: {
|
|
|
- type: 'md-arrow-down',
|
|
|
- }
|
|
|
- })]
|
|
|
- ),
|
|
|
- ]);
|
|
|
- }
|
|
|
-
|
|
|
- btnArr.push([
|
|
|
- h('Button', {
|
|
|
- props: {
|
|
|
- type: 'error',
|
|
|
- size: 'small'
|
|
|
- },
|
|
|
- on: {
|
|
|
- click: () => {
|
|
|
- this.$Modal.confirm({
|
|
|
- title: '提示',
|
|
|
- content: '确认删除该文件吗?',
|
|
|
- onOk: () => {
|
|
|
- this.videoList.splice(params.index, 1);
|
|
|
- if (this.videoList.length == 0) {
|
|
|
- this.clearList();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }, '删除')
|
|
|
- ]);
|
|
|
-
|
|
|
- return h('div', btnArr);
|
|
|
- }
|
|
|
- }
|
|
|
- ],
|
|
|
imgInfo: '',
|
|
|
menuIndex: '', // 选中菜单
|
|
|
inputVedio: ['video/x-msvideo','video/qlv', 'video/qsv', 'video/webm', 'video/f4v', 'video/ogv', 'video/3gp', 'video/avi', 'video/flv', 'video/mkv', 'video/mov', 'video/mp4', 'video/mgp', 'video/rmvb', 'video/swf', 'video/vob', 'video/wmv', 'video/wtv', 'video/mpeg', 'video/rm', 'video/asf', 'video/m4v', 'video/m2v', 'video/ts', 'video/mts', 'video/m2t', 'video/m2ts', 'video/dv', 'video/mxf', 'video/kux', 'video/mpg', 'video/3gpp', 'video/aif', 'video/mod', 'video/m4s'],
|
|
@@ -604,7 +435,7 @@ export default {
|
|
|
format: 'mp4',
|
|
|
newPath: os.userInfo().homedir + separator + "Downloads", // 新路径
|
|
|
type: 1, // 输出目录类型
|
|
|
- quality: '3', // 品质
|
|
|
+ quality: '1', // 品质
|
|
|
fenbianlv: -1,
|
|
|
start:0,
|
|
|
limit:5,
|
|
@@ -637,7 +468,6 @@ export default {
|
|
|
|
|
|
execLimit: 2,
|
|
|
loadingTips: '',
|
|
|
- showIndex: '',
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -673,6 +503,9 @@ export default {
|
|
|
}
|
|
|
this.pushFileToList(pathArr);
|
|
|
},
|
|
|
+ selectVideoType(e){
|
|
|
+ this.handleData.quality = '1';
|
|
|
+ },
|
|
|
//
|
|
|
changeFenbianlv(val){
|
|
|
if (val == 6) {
|
|
@@ -727,7 +560,7 @@ export default {
|
|
|
format: 'mp4',
|
|
|
newPath: os.userInfo().homedir + separator + "Downloads", // 新路径
|
|
|
type: 1, // 输出目录类型
|
|
|
- quality: '3', // 图片品质
|
|
|
+ quality: '1', // 图片品质
|
|
|
fenbianlv: -1,
|
|
|
start:0,
|
|
|
limit:5,
|
|
@@ -798,11 +631,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- // 查看文件信息
|
|
|
- showFile(rowIndex){
|
|
|
- this.showIndex = rowIndex;
|
|
|
- this.fileDetailModel = true;
|
|
|
- },
|
|
|
pushFileToList(files) {
|
|
|
this.tabLoading = true;
|
|
|
for (let i = 0; i < files.length; i++) {
|
|
@@ -848,6 +676,7 @@ export default {
|
|
|
|
|
|
if (flag) {
|
|
|
this.videoList.push(imgInfo);
|
|
|
+ index = this.videoList.length - 1;
|
|
|
}else{
|
|
|
setTimeout(() => {
|
|
|
this.$message({message: '该文件已经在队列中 - ' + path, type: 'warning'});
|
|
@@ -1095,7 +924,16 @@ export default {
|
|
|
//码率 -b:v -b:v
|
|
|
if (this.handleData.type == 2) {
|
|
|
execParams.push('-b:v')
|
|
|
- execParams.push(this.handleData.quality)
|
|
|
+ if(this.handleData.quality == 1){
|
|
|
+ if(file.bitrate){
|
|
|
+ execParams.push(file.bitrate);
|
|
|
+ }else{
|
|
|
+ execParams.push('1m');
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ execParams.push(this.handleData.quality)
|
|
|
+ }
|
|
|
+
|
|
|
}else if(file.bitrate){
|
|
|
// 画质
|
|
|
let lv = file.bitrate;
|
|
@@ -2047,7 +1885,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.upload-img{
|
|
|
- width: 220px;
|
|
|
+ width: 170px;
|
|
|
}
|
|
|
|
|
|
.el-tabs__item.is-active{
|