Simple video editing possibilities under MorphOS
  • rms
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    rms
    Posts: 602 from 2004/11/27
    Hi, I often need to make simple video cuts, e. g. I get a mp4 video, or flv or avi etc. with sound and I need to cut out one or several small portions of it. Now I'm sure this is possible with Mencoder but I wonder if there is a more "visual" easier possibility to find the editing (cut) point in a timeline, so one can enter a start and end point and then cut the portion.
  • »21.09.10 - 15:09
    Profile Visit Website
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    In fact, writing such an application would probably be rather easy by using ffmpeg library (both visualization and encoding).

    But my hands are already full. :)
  • »21.09.10 - 18:24
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    pampers
    Posts: 1061 from 2009/2/26
    From: Tczew, Poland
    Let's make a bounty for another pair of hands for Fab ;)
    MorphOS 3.x
  • »21.09.10 - 18:55
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dake
    Posts: 204 from 2007/9/14
    From: The building p...
    @rms
    Hi, I made an Arexx script for this:
    http://home.swipnet.se/~w-160129/progs/video-cut.rexx

    Go to "Ambient Settings", select "MIME", double click on "video", click "Add" and configure like this:
    http://home.swipnet.se/~w-160129/progs/video-cut.png

    Don't forget to change last line in video-cut.rexx to your Mencoder path.

    Now you can right click on any video and run the script, type in start position and length of the video clip.

    Use MPlayer for visualisation as jPV said.
    This is not a GUI program but still very handy.
  • »21.09.10 - 19:55
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    @RMS: I'm not at home so I can't check, but do have tried Blender?
    It's one of its tasks!
    And it already uses ffmpeg to do that...

    Check Blender 2.52 please:

    http://www.yomgui.fr/blender/blender-2.5alpha2-test-mos.lha

    I don't remember if I've enabled FFMPEG lib code or not.
    As Fab, my hands are full also ;-)

    [edit]
    Seems that Blender-2.52 crashes on MOS when we try to edit some videos. I'll check that ASAP and if fixed upload a new release.

    Anyway, it's totally not clever to start a bounty to create a new software to do that, better efforts shall be done to finalize Blender on MorphOS: if some developpers want to enter in the game, they're welcome ;-)

    [ Edited by Yomgui on 2010/9/22 17:47 ]
    And now... next project!
  • »22.09.10 - 10:39
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Excellent comments, Guillaume. What are those things that also make your hads full...?
  • »22.09.10 - 15:07
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    @jcmarcos: helios!
    And now... next project!
  • »22.09.10 - 15:28
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    kriz
    Posts: 309 from 2005/10/18
    From: No(R)way
    Here is a Blender video guide:
    http://www.straightedgelinux.com/videoBlender/

    http://www.straightedgelinux.com/videoBlender/export.html
    MacMiniG4 MOS 3.18 rulez ... For music check: Horrordelic Records - Dark Psychedelic Music Since 2011 -
  • »22.09.10 - 15:30
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12157 from 2003/5/22
    From: Germany
    > What are those things that also make your hads full...?

    http://amigaworld.net/modules/newbb/viewtopic.php?topic_id=32420&forum=16#580717
  • »22.09.10 - 15:50
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 416 from 2003/2/24
    From: Berlin
    hi,

    you can also use the edl feature of mplayer for cutting out parts of a video, f.e. commercial breaks.

    Start mplayer like this "mplayer -gui 1 -edlout video.edl video"
    then start playing the video, and press "i" everytime to mark the beginning and the end of a part which should be cut out.

    Now quit mplayer and start it like this "mplayer -gui 1 -edl video.edl video", this won't cut the movie it just skips the marked parts to see if you marked the correct parts!

    To cut the movie, you have to use mencoder "mencoder -edl video.edl -ovc copy -oac copy video -o newvideo".

    Its fast, because the video isn't reencoded, only the marked parts will be cut out.

    I have created some small scripts for this and put them in ambient video mimetype for easy access.
    I also have a small converter script to convert cutlists (for onlinetvrecorder cutlists) to edl format.
  • »22.09.10 - 17:41
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 423 from 2005/4/9
    From: magyarorszag/h...
    yo igracki!
    will you share those scripts with us please?:)
    DEAD pegII/G4@1000.1gb ram.radeon 9200pro
    240 gigz hd.nec dvdrw.MorphOS 2.4 DEAD
    -=-=-=-
    amiga1200T.blizzardppc@180/040@25.96megz ram
    -=-=-=-=-
    zx.spectrum@3.5
  • »23.09.10 - 04:02
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    Bad news, I've checked yesterday and yes, Blender isn't stable with FFMPEG. It's like incompatibilites between API used by Blender and the lib I've got (from Fab1, but it's recent version and Blender uses API of an outdated one :-( ).

    As the whole system crashes without the time to print anything in console its difficult to solve just in 1 or 2 days.

    Anyway, I keep you aware.
    And now... next project!
  • »23.09.10 - 06:53
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 416 from 2003/2/24
    From: Berlin
    sure, nop

    Here they are, I put them into an archive, and added two pictures how to add them to ambients mimetype editor.

    Then copy the directories (rexx, c, s) to sys: and set the env-vars "mplayer" and "mencoder" to the complete filenames with path of the programs.
    f.e.
    SetEnv SAVE mplayer p:gfx/MPlayer-1.0-svn-2010.07.20/mplayer
    SetEnv SAVE mencoder p:gfx/MPlayer-1.0-svn-2010.07.20/mencoder

    Attaching a file didn't worked, so here is a link to it.

    [ Edited by igracki on 2010/9/23 22:14 ]
  • »23.09.10 - 19:09
    Profile Visit Website
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    By the way, you don't need to set any kind of stack for MPlayer. MPlayer (MorphOS) sets its stack itself, and doesn't require the user to guess it (besides, stack command sets the 68k stack, which is not relevant for ppc code, anyway :)).

    [ Edited by Fab on 2010/9/24 0:23 ]
  • »23.09.10 - 22:22
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 423 from 2005/4/9
    From: magyarorszag/h...
    thx a lot igracki!
    hope someone else will also find them useful:)
    (sometimes i wonder how many hidden gems are on the users and devs hdds in the form of custom scripts and such. unreleased skins fe.:)
    DEAD pegII/G4@1000.1gb ram.radeon 9200pro
    240 gigz hd.nec dvdrw.MorphOS 2.4 DEAD
    -=-=-=-
    amiga1200T.blizzardppc@180/040@25.96megz ram
    -=-=-=-=-
    zx.spectrum@3.5
  • »23.09.10 - 23:15
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    Fab wrote:

    MPlayer (MorphOS) sets its stack itself, and doesn't require the user to guess it (besides, stack command sets the 68k stack).


    That reminds me of a very long standing question I've always had: Why was this funcion born? Was AmigaOS' kernel unable to handle something so deep as its own stacks for processes?

    I don't know of any other operating system that would ever believe a user can decide in this.
  • »24.09.10 - 07:00
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Wishmaster
    Posts: 342 from 2003/6/29
    Quote:


    jcmarcos wrote:
    Quote:

    Fab wrote:

    MPlayer (MorphOS) sets its stack itself, and doesn't require the user to guess it (besides, stack command sets the 68k stack).


    That reminds me of a very long standing question I've always had: Why was this funcion born? Was AmigaOS' kernel unable to handle something so deep as its own stacks for processes?

    I don't know of any other operating system that would ever believe a user can decide in this.


    On AmigaOS normally the programmer has to set the correct stack value like fab does.
    But many are forgetting to do it.
    On MorphOS programs compiled with the sdk have automatic stack extension.
    Pegasos PPC
  • »24.09.10 - 07:32
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    Wishmaster wrote:

    On MorphOS programs compiled with the sdk have automatic stack extension.


    Thanks for the information. So I guess AmigaOS was unable to dynamically extend stacks, thus demanding the programmer to choose a certain fixed size (how to calculate?), or even the user (!).
  • »24.09.10 - 07:36
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    We're going far away from the subject...
    And now... next project!
  • »24.09.10 - 08:59
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 423 from 2005/4/9
    From: magyarorszag/h...
    yomgui: have you ever had a version of blender 2.46 working with videos (compiled with ffmpeg)? afair we discussed this once and you've said something aout trying something:) 2.46 with working video editing will be good as well (most of the tutorials i've found about blender video editing were for 2.46 anyway:) at least its stable and not in alpha/beta stage.
    sad but os4 users can already use them blender port to edit videos while users of "the most advanced amiga os ever"... still have to boot another os to do that (or trying to mess with mencoder in shell:)
    DEAD pegII/G4@1000.1gb ram.radeon 9200pro
    240 gigz hd.nec dvdrw.MorphOS 2.4 DEAD
    -=-=-=-
    amiga1200T.blizzardppc@180/040@25.96megz ram
    -=-=-=-=-
    zx.spectrum@3.5
  • »24.09.10 - 20:22
    Profile Visit Website
  • rms
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    rms
    Posts: 602 from 2004/11/27
    @ all

    Thanks for all your feed-back in this matter!

    I tried the solution from dake and his script and could get it working but had to modify the script because for the video I had to cut -oac copy didn't work so I changed this to -oac pcm and that worked fine! Just a suggestion here, wouldn't it be easier to enter the start minutes/secs and the end minutes/secs instead of having to calculate a lenght (difference from start and end)?

    Then I tried the edl solution from igracki and I could get the edl file but then I wasnt able to encode with mencoder the portion I needed, it started everytime at the beginning!

    Here are the commands in shell:
    mplayer -gui 1 -edlout P3-Work:tsr_bois_cerf_fanny_karate.edl P3-Work:tsr_bois_cerf_fanny_karate.flv

    This does create the edl: tsr_bois_cerf_fanny_karate.edl with this content:
    1407.119995 1714.439941 0

    I then used Mencoder in the shell:
    mencoder -edl P3-Work:tsr_bois_cerf_fanny_karate.edl -ovc copy -oac pcm P3-Work:tsr_bois_cerf_fanny_karate.flv -o P3-Work:tsr_bois_cerf_fanny_karate_1.flv

    but unfortunately this starts from beginning and not from the in point I entered though the shell outputs "Read 1 EDL actions"

    So I wasn't able to use this solution.

    All in all a "visual" timline solution like what Blender offers, if it's working, would be very handy and appreciable because IMO we need some video editing possibilities for MorphOS in GUI form! Hopefully Yomgui will be able to correct Blender so this is working!

    Thanks again for input and help.

    Christoph
  • »25.09.10 - 04:58
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 416 from 2003/2/24
    From: Berlin
    Quote:


    rms wrote:

    Then I tried the edl solution from igracki and I could get the edl file but then I wasnt able to encode with mencoder the portion I needed, it started everytime at the beginning!
    [...]
    but unfortunately this starts from beginning and not from the in point I entered though the shell outputs "Read 1 EDL actions"

    So I wasn't able to use this solution.



    The points you mark with key "i" are the parts which will be skipped/cut out! Not the parts you want to keep!

    If you want to cut from the beginning, you have to press "i" right from the start of the movie (maybe manually edit the first point with an editor, to really start from 0.0!)

    BTW:
    A suggestion for mplayer, if you mark a start of a new part but don't mark the end, before mplayer reaches the end of the movie, then mplayer removes the start point! It would be IMHO better, if mplayer would automatically add the end of the movie as the end of the point!
  • »26.09.10 - 13:08
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dake
    Posts: 204 from 2007/9/14
    From: The building p...
    @rms
    Funny! it don't work with .flv's :) I didnt noticed that because I only cut avi's and mpg's.
    The reason you have to calculate length for stop position is that i'm lazy and Mencoder want it in this format. But I can always make some changes if you want?
  • »26.09.10 - 17:16
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    dake
    Posts: 204 from 2007/9/14
    From: The building p...
    @rms
    A present for you, this one will calculate length.
    http://home.swipnet.se/~w-160129/progs/video-cut.2.rexx
    If you want to cut flv's you know what to do:)
  • »26.09.10 - 19:13
    Profile