1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[nicesplice]+[nicesplice-magic-folders] On box video editing

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by Drutt, Nov 4, 2011.

  1. Drutt

    Drutt Active Member

    Over the last few weeks, with the nights drawing in I've been working on a little project to bring on-box editing to our HD/HDRs. My old Digifusion box could do it and I've missed it.
    The result is nicesplice and its just about ready for release into the wild...

    There are a couple of new packages in the repository. The first is the nicesplice program itself. This takes one (or more) humax recording(s) and can cut segments out and join recordings together.

    Some examples:

    nicesplice -in "my recording" -out "new trim recording" -cut 0 500 -cut 2500 3500
    nicesplice -in "recording part1" -in "recording part2"-out "new joined recording"
    As its a pain to work out the frame numbers of the sections to be cut out, the recording can be marked up in advance using the "bookmarks" feature (a little button on the remote you may have never noticed!). The first bookmark will be the start point of the new recording, second a cut, third back in etc (up to 32) Then call.

    nicesplice -in "my recording" -out "new trimmed recording" -cutBookMarks
    The second package attempts to do away with the need to put down the remote and telnet in. nicesplice-magic-folders will create and monitor a set of "special folders" into which recordings can be moved. When a recording is detected in a folder (eg *edit/*cut) the script will trigger the relevant edit operation, and when done, move the new edited recoding to a "done" subfolder and the original to "original".

    There are folders to cut (based on bookmarks), join, and create a copy.

    Af123 has also added the facility to trigger edit operation from webif :)

    A few things to note:

    This code is new, there may be bugs, it has not yet been tested a great deal. Keep backups of any recording that is important to you until you are absolutely sure the edited version is ok. In particular, support for large files (>2gigs) was only added last night! It is currently in the "advanced" section of the repository until road tested.

    It currently only works for SD files (encryped or unencrypted). I'm hoping to add support for HD files in a later release.

    Joining of files from different TV channels often does not work.

    SWMBO has suggested that in recognition of the time I've spent on this, when I should have been redecorating the house, if you find it useful, you head on over to https://giving.oxfam.org.uk/ and drop them a tenner ;)
    jsrobo, oijonesey, xyz321 and 6 others like this.
  2. af123

    af123 Administrator Staff Member

    First note that this is just a pretty wrapper around Drutt's fantastic utility, he deserves all the credit.

    If nicesplice is installed then the Opt+ button in the webif media browser will show a Crop option. It will be greyed out unless the recording is standard definition and has at least one bookmark. Clicking on it takes you to another screen which shows a visual representation of what will be done using a red/green bar.


    Clicking the button moves the original recording to a new folder called _original and then replaces the original recording with the cropped version. Once you're happy with it then you can remove the original copy.

    Again, it's early code so exercise caution and in particular the web interface will be tidied up over the coming days - the progress bar is not a true reflection of progress yet so it will often get to 100% and stick while the crop operation finishes; I have a fix for that which I'll roll out tonight. I have used it successfully on most of my kids' film collection!

    Joining files together through the web interface will be added in a future update, again just using Drutt's nicesplice in the background.

    Drutt's already said it, but the beautiful thing about this is it works on encrypted recordings just as well as decrypted, and it modifies the sidecar files so that the usual operations like FF/Rew/Skip work perfectly.

    Edit: I'm going to replace this image later with a less embarrassing one : ) Honestly, this was automatically scheduled by the RS portal because Lady Antebellum were performing on it and I'm cropping it so that's the only bit that remains!
  3. Ezra Pound

    Ezra Pound Well-Known Member

    Fantastic work Drutt, This will be a very welcome addition to the Custom Firmware Package, Well done
    Edit : Let me know if you want a hand with the Wi-Ki entry
  4. 4291

    4291 Well-Known Member

    Wow! Absolutely brilliant! Works on the HDFOX-T2. :)
  5. 4291

    4291 Well-Known Member

    This is the method I used.
  6. 4291

    4291 Well-Known Member

    af123 Omit the space between colon and closed bracket. :) You used to!
  7. af123

    af123 Administrator Staff Member

    The space is the only way I can get the forum to stop replacing it with an image! *;0)
  8. Ezra Pound

    Ezra Pound Well-Known Member

    Drutt / af123 would a single bookmark at time 00-00-00 or at the very end cause an error?
  9. Drutt

    Drutt Active Member

    Shouldn't do - that should cause it to output the whole video (ie from bookmark 1 to the end). What sort of error are you getting?
  10. Ezra Pound

    Ezra Pound Well-Known Member

    Sorry, I haven't tried it, I was just thinking through the logic
  11. 4291

    4291 Well-Known Member

    I have set a single bookmark near the beginning and being new to it selected crop, but I have cropped the video a saved the advert! Should have noticed it was coloured red. I have the original, but how do I reinstate it?

    I have topped and tailed and removed the adverts from another recording and it has worked perfectly.

    The recordings that I am using were due for deleting, so no harm done.
  12. Drutt

    Drutt Active Member

    If there is only one book mark it should give you a new video of everything past that bookmark to the end. Is that not what happened?

    If you're using the magic folders, the original will been moved to *edit/*cut/original, if using webif I think it should put it in a subdirectory called _original, though I've not yet had a chance to play with the webif interface.
  13. 4291

    4291 Well-Known Member

    I that instance I recollect the the bar was red past the bookmark. I will try again and see what happens.

    I have answered my own question regarding reinstatement. Opt+ from the remote, move/copy does it.

    When cropping a video from within a folder, the original folder stays in the same folder.
  14. af123

    af123 Administrator Staff Member

    It's possible the web interface gets that wrong, but the backend utility should still do the right thing.
  15. 4291

    4291 Well-Known Member

    I have tried again and it works as you say. The recording I thought I had lost has turned up. It was the complete programme of the Indian Grand Prix, quite long, and I was attempting to just remove the padding at the beginning. I noticed at the time that when I pressed the Media button on the remote, instead of being instant, it was processing for some time. I was probably not giving it enough time before I looked to see the result of the cropping.
  16. 4291

    4291 Well-Known Member

    If it happens again I will let you know. I might be a fault of my recollection.
  17. af123

    af123 Administrator Staff Member

    The webif doesn't show the initial red section on the timeline though. I'll fix it after work.
  18. Drutt

    Drutt Active Member

    It can take a while to process a long recording. The amount of time it takes is dependant on the amount of video you're "keeping", rather than the size of the source. Also if you are time lapsing / recording / playing back at the same time takes even longer. At some point I'll try and get some progress feedback in.
  19. 4291

    4291 Well-Known Member

    I was keeping most of it.

    Interesting observation: Since doing some cropping, and keeping the originals for the time being, when I see the standard pie chart onscreen it now has two sectors. Below the blue sector showing my USB usage is a smaller one in a darker blue.
    Not repeated on Webif or RS.
  20. James

    James Member

    Could we not make this part of the custom portal?