1. mp4tools that uses ffmpeg.
2. video cutter joiner
1. and 2. are not acceptible. and i am looking for other ways or other softwares.
1. and 2. 's sound synchroniztion of some youtube videos are not good, maybe 20% are not good. and 1. and 2. shows the same problems on the same mp4 files.
i am lookng for a different mp4 cutters and i may be able to join them at the console command level with ffmpeg.
ffmpeg-(2016-02)-git-5156578-xp.exe and
ffmpeg-v3.12 (2016-08)-xp.exe work for my XP now all of sudden, my 1st usage of them didnt work about a week ago.
what is the basic mp4 cutting commands for ffmpeg that i can start to try? i think cutting with console commands is impossible without a visual aid. but who knows!
some console command examples would be grateful.
a keyboard support of the exact cutting location is very important, and 1. and 2. can not let you do that. but the sound sync is more important.
+ Reply to Thread
Results 1 to 12 of 12
-
Last edited by sommers; 8th Jun 2017 at 04:40.
-
https://trac.ffmpeg.org/wiki/Seeking (if down use mirror)
Or mp4box -splitx/-splitz (see doc). Then append using ffmpeg concat demuxer like it was explained in your other thread. -
1. ffmpeg.exe -y -i aa.mp4 -ss 00:01:00.00 -t 00:32:00.00 -c copy bb.mp4 : worked well with version ffmpeg-v3.12 (2016-08)
2. i uninstalled "video cutter joiner" : uselessly unsynchronizing.
3. mp4tools's MP4Splitter.exe (v3.5-win32) : after testing 1. i went back to MP4Splitter.exe, it was synchronizing fine. (i probably did something wrong testing MP4Splitter.exe in the past. it made me think it didnt sync. this will be my main cutter from now on in windows 10.
i have a couple of problems with 3.
* ffmpeg.exe in there doesnt work on XP, it returns a prompt right back at me
* when i ran MP4Splitter.exe in xp, this showed up
[Attachment 41843 - Click to enlarge]
* maybe someone can tell me what might cause a kernel problem.
in the mean time, all cuttings will be done in win10Last edited by sommers; 9th Jun 2017 at 02:54.
-
-
AA=
https://superuser.com/questions/657492/cut-last-30-seconds-off-ends-of-videos-using-ff...windows/744961
BB=
@echo off
set _ffprobe=C:\Programs\FFmpeg\ffprobe.exe
set _ffmpeg=C:\Programs\FFmpeg\ffmpeg.exe
for /f "tokens=*" %%a in ('%_ffprobe% -show_format -i %1 ^| find "duration"') do set _duration=%%a
set _duration=%_duration:~9%
for /f "delims=. tokens=1*" %%b in ('echo %_duration%') do set /a "_durS=%%b"
for /f "delims=. tokens=2*" %%c in ('echo %_duration%') do set "_durMS=%%c"
rem following line is seconds to cut
set /a "_durS-=30"
set "_newduration=%_durS%.%_durMS%"
set "_output=%~n1"
md _fixed
%_ffmpeg% -ss 0 -i %1 -t %_newduration% -c copy "_fixed\%_output%.mp4"
what OS does AA= use? it is kind of like windows but it is not.
BB= surprisingly works
right TRIM must be calcualted from -ss 0 only.
can someone modify BB= to do left and right TRIM as one step process? -
"for i in *.mp4; do ffprobe -show_format -i "%i"" looks like some shell usually found on Linux and the like, e.g. bash. With Windows 10 you should also be able to use it with the Ubuntu component.
Simply change last line to:
%_ffmpeg% -ss 00:00:30 -i %1 -t %_newduration% -c copy "_fixed\%_output%.mp4"
or
%_ffmpeg% -i %1 -ss 00:00:30 -t %_newduration% -c copy "_fixed\%_output%.mp4"
(for difference see the documentation I linked in my first post) -
AA=
-ss 00:00:30 -t %_newduration% -
no, AA= doesnt work, left TRIM and right TRIM must be done seperately, it is two step process (needs two savings)
%_newduration% was calculated when it was -ss 0, so AA= will just add this amount of -ss 00:00:30 more video at the end.
but seeing right TRIM was as this difficult, i am actually fine with two step savings.
* Windows 10 + Ubuntu really?
i dont know anything about ubuntu, i just heard about it, and i hate win 10. so maybe someday. i dont know much about console commands, i know some DOS commands. and i improvise all after that with the help of ztreeLast edited by sommers; 9th Jun 2017 at 08:02.
-
-
Couple of ideas for you from here.
1. Get length in seconds without parsing:
Code:ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1 infile.mp4
Code:ffmpeg -i in.mp4 -filter_complex "[0]split[s1][s2]; [s1]trim=10,setpts=PTS-STARTPTS,fifo[bv]; [s2]trim=10,setpts=(PTS-STARTPTS)+10/TB,fifo[v]; [bv][v]overlay=shortest=1,trim=10,setpts=PTS-STARTPTS[fv]; [0]volume=0[b];[0]adelay=10000|10000[a]; [b][a]amix=duration=first,volume=2,atrim=20,asetpts=PTS-STARTPTS[fa]" -map "[fv]" -map "[fa]" trimmed.mp4
-
-i -ss -to order should work, right? works
-ss -i -to order should work, right? also works, makes no difference. but i want to put the time part together -ss -t or -ss-to
-----------------------------------------------
set _ffprobe=C:\Programs\FFmpeg\ffprobe.exe
for %%v in (*.mp4) do (
for /f "tokens=*" %%a in ('%_ffprobe% -show_format -i %%v ^| find "duration"') do set _duration=%%a
echo "%%v" "%_duration%"
)
"%_duration%" sends all empty null strings, so why doesnt it work? -
AA= ffprobe.exe -v 0 -show_entries format=duration -of compact=p=0:nk=1 infile.mp4
BB= _trim.bat from https://superuser.com/questions/657492/cut-last-30-seconds-off-ends-of-videos-using-ff...windows/744961
CC= _trim2.bat from https://superuser.com/questions/657492/cut-last-30-seconds-off-ends-of-videos-using-ff...windows/744961
DD= combining of BB= and CC=
-------------------------------------------
DD= doesnt work. DD= was impossible with my console command skills, my console command skills are like blind-hacking, i just change things till it works a lot of times.
AA= works, but how can you inject the answer to "SET _duration=answer" form without the FOR DO () thing agian.Last edited by sommers; 10th Jun 2017 at 00:50.
Similar Threads
-
FFMPEG - X265 - Help for correct commands and syntax
By AllThatEvil in forum Video ConversionReplies: 16Last Post: 22nd Mar 2017, 17:04 -
Cutting a video with FFMPEG in the same format/quality?
By Unknown01 in forum Newbie / General discussionsReplies: 3Last Post: 22nd Dec 2016, 02:14 -
Commands of FFmpeg
By farafero21 in forum Video Streaming DownloadingReplies: 5Last Post: 11th Feb 2016, 06:08 -
need help with ffmpeg commands
By mmovie in forum Video Streaming DownloadingReplies: 1Last Post: 26th Mar 2014, 02:38 -
using FFmpeg commercially via system commands
By cen in forum ProgrammingReplies: 4Last Post: 6th Jul 2012, 12:43