VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. 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.
    Last edited by sommers; 8th Jun 2017 at 04:40.
    Quote Quote  
  2. 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.
    Quote Quote  
  3. 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
    Image
    [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 win10
    Last edited by sommers; 9th Jun 2017 at 02:54.
    Quote Quote  
  4. what would be the ffmpeg cutting command for this case?

    i need to cut off a mp4's first 30 sec and last 30 sec
    more precisely

    let say the video is x min long, x varies, each video legnth varies.

    i need to save from 00:00:30 to 00: x - 1 : 60 - 30
    Quote Quote  
  5. 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?
    Quote Quote  
  6. "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.

    Originally Posted by sommers View Post
    can someone modify BB= to do left and right TRIM as one step process?
    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)
    Quote Quote  
  7. 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 ztree
    Last edited by sommers; 9th Jun 2017 at 08:02.
    Quote Quote  
  8. Originally Posted by sommers View 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.e
    Yes, I forgot that times change with -ss -i -to order. But -i -ss -to order should work, right?
    But can't you make the second line work by simply adding it to duration? I.e. use -ss -i -to with duration 60 instead of 30?
    Quote Quote  
  9. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    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
    2. Wacky long call to do the opeartion in one command:
    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
    Quote Quote  
  10. -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?
    Quote Quote  
  11. 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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!