rushmj / mpv-video-cutter

cut video and concat automatically
MIT License
46 stars 7 forks source link

good job! but there is a bug #4

Open gabin22 opened 3 years ago

gabin22 commented 3 years ago

the bug is about \n,when I open time_pairs.txt with vim, the \n was show in text,that's wrong.with this bug,you can only cut one segment, no two or more segments,because parsing \n is wrong.I don't know about lua and shell,so I change \n to a special char,like:

cutter.lua : line 82 , change "\n" to ";" c_concat.sh: line 39 ,change "\n" to ";"

now I can cut two segments. 以上。

rushmj commented 3 years ago

which os do you use? I use mac os,it has no problem,\n was not found in vim.

gabin22 commented 3 years ago

manjaro linux.

cut rmvb file fail.would you support rmvb?

rushmj commented 3 years ago

manjaro linux.

cut rmvb file fail.would you support rmvb?

This script convert video with FFmpeg. maybe original FFmpeg has problem when support rmvb.

fastrizwaan commented 2 years ago

in Linux, it is not working with \n;

cutter.lua: line 90 change if (k%2==1) then str=str..v..',' else str=str..v..'\\n' to if (k%2==1) then str=str..v..',' else str=str..v..';' end

c_concat.sh: line 39 change "\n" to ";"

IFS=$'\n' a=(`eval cat $time_pairs_txt`)

to

IFS=$';' a=(`eval cat $time_pairs_txt`)

Thank you @gabin22 for the fix!

the error output for more than 1 or multiple cut segments is:

Invalid duration specification for t: -c
cp: cannot stat '.cut_video/clip0.mp4': No such file or directory
fastrizwaan commented 2 years ago

Thank you guys, I've forked it for flatpak https://github.com/fastrizwaan/mpv-video-cutter-linux