Rename / cut recordings

  • Hi,


    What I really like to do is change the name and metadata of recordings.
    I have a dream-keyboard, so it would be very handy if I can use it for the renaming.


    Another request: A simple way to cut a recording. I always record 15 minutes before and 30 minutes after (Veronica is bad in timing :face_with_tongue: ) and I would like to remove the crap before and after.


    Regards,
    BW

    DM7025, 2xDVB-C (ZIggo), 300GB HDD (PATA)

    • Offizieller Beitrag

    For your second request, try the new cutlist editor from the newer CVS images. Simply open the video mode, select your movie and press "menu - cutlist editor". There you can edit your movies, cut off (virtually) unneeded beginnings and endings and commercials. Further you can insert chapter marks.
    The files aren't actually cut, there are simply markers which tell the video player which part it shall play and which not.


    Olove

    Grüße,
    Olove

    "All we need to do ... is keep talking (Stephen Hawking)"


    Ich leiste KEINEN Support per PN/E-Mail, derartige Anfragen werden nicht beantwortet.
    I won't give support via PN/E-Mail and I won't answer such messages.

  • Zitat

    Originally posted by Olove
    For your second request, try the new cutlist editor from the newer CVS images. Simply open the video mode, select your movie and press "menu - cutlist editor". There you can edit your movies, cut off (virtually) unneeded beginnings and endings and commercials. Further you can insert chapter marks.
    The files aren't actually cut, there are simply markers which tell the video player which part it shall play and which not.


    Olove


    Hi Olove,
    Thanx for your fast response.
    I'm an old Dreamer..... I'll try the cutlust editor.


    regards,
    BW

    DM7025, 2xDVB-C (ZIggo), 300GB HDD (PATA)

  • Hi !


    I wrote a small plugin for renaming movies, but it is more a kind of example then a real plugin - if you want to give it try see attachment and don't be dissapointed :smiling_face:


    Press video and then Menu when the Movie is selected, as you are used to to delete a movie and there rename should show up :smiling_face:


    Ciao
    gutemine2

  • Zitat

    Original von BushWhacker
    Hi gutemine (why the 2 behind ? ),


    Because this :grinning_squinting_face:

    Zitat

    Original von Olove


    Falscher Nick, den benutzt du nur im anderen Board, wo es dir peinlich ist, dass du zuviel geschrieben hast :grinning_squinting_face:
    Btw gibt es extra-Boardränge, die unabhängig der Postinganzahl vergeben werden können, da braucht man nicht immer ab 500 Beiträgen nen neuen User anlegen.


    OT-Grüßle,
    Olove

    Two mit SSD, One, 7025-S, 7000-S

  • gutemine ist einfach schon ein altes Mädchen :smiling_face:


    Das plugin sollte eigentlich schon so halbwegs funktionieren, aber es gibt 2 arten zu renamen - in einer wird nur der name im metafile geändert, so denke ich wäre es auch im CVS schnell zu machen - vieleicht gibt sich ja jemand mal einen Stoss - ich habs extra nur in python gemacht und die 10 codezeilen können nicht zu viele bugs haben :winking_face:


    Die andere variante umbenennt auch alle Files, und das ist einfach noch nicht 100%ig implelementiert.


    Was auch nicht geht ist reine *.ts files ohne *.meta umzubenenennen die man aus enigma1 Zeiten übernommen hat oder von DVD oder ähnlichem erstellt hat. Dafür gibt es aber ein metagen.sh script (musst aber woanders danach suchen)


    Wäre zwar alles nicht schwer zu machen, ABER ich hab das damals eigentlich nur für jemanden gemacht der es unbedingt haben wollte und als Beispiel wie man die extension der Movieliste verwenden kann um sich dort mit einem Plugin einzuklinken.


    Also nicht böse sein wenn es nicht 100%ig funktioniert, und fallt nicht wieder über mich her wenn es nur etwas unfertig ist. Ijhr könnt es gerne erweiternd und entsprechend anpassen an Eure Bedürfnisse, so viel sourcecode ist es ja nicht und ich habe versucht brav zu sein und nichts im enigma2 kaputt zu machen oder zu verbiegen :smiling_face:


    Ich persönlich benutze es auch nur ab und zu um Aufnahmen von Sendern die keinen EPG ausstrahlen (ja sowas gibt es auch noch) in was sinvolles umzubenenen.


    short english version:
    --------------------------


    There are 2 ways of renaming in the plugin one just updates the name in the meat file, the second renames also all files. And renam of plain ts files without meta files is currently not supprted, sorry. The plugin was simply done as an example on how to extend the video menu, not as a fully featured Movie renaming Plugin. Feel freey to optimize and extend it :smiling_face:


    LG
    gutemine2

    6 Mal editiert, zuletzt von Lost in Translation ()

  • Hi Gutemine,


    Thank you for your response.
    >> gutemine ist einfach schon ein altes Mädchen :smiling_face:
    You're the cleaninglady... :grinning_squinting_face:
    It's not easy: In Germany they have translated all names :frowning_face:
    zB Abraracourcix == Majestix, Bonemine == Gutemine
    ( http://fr.wikipedia.org/wiki/Bonemine )
    In NL they use the original names.


    Now on topic again....
    I tried to rename the title, not the files.
    And in the source I've found the `problem` alias feature. :winking_face:


    With an instant recording there is no title in the meta-file, so it cannot be replaced.
    I've attached the 2 metafiles, 1 with EPG, 1 without EPG.
    When renaming an EPG-recording it works perfect!


    Something else:
    Do you know where to find a classmodel of Enigma2.
    I would like to program myself, but it's hard without classmodel/diagram.


    Thanx again for all the plugins. I'm also using BA.


    Regards,
    BW

  • Well, a Class model would be fine, but I don't think you will find one - even in DMM office building - correct me if I'm wrong :winking_face:


    But the Pythons normally have relatively speaking names so a simple grep class *.py of the right py files(s) gives you a quick answer of what could be relevant and then it is not difficulet ot guess from the names which one would be usefull to import/use in your code. So i think the programmers at DMM have done a pretty good job and I laways try (!) not do do too much harm to their code :winking_face:


    BTW I now understand your problem - the code in my Plugin' uses simply python string replace (Q&D I know) for moving in the new string, which will not work in this case.


    But changing this so that the name is always put at the right line of the string variable would be relative easy - because name and description are always at 2nd and 3rd line in the metafile which is easyto adress within the string array I use to read in the meta file content.


    So if you know only a 'little' bit of python (which could be more then what i know to be honest) this should be easy to adapt.


    If you are really "motivated" feel free to optimze the code, and create a new version out of it.


    PS: I could even post you the 2 scripts needed to build the ipk out of it on the Dreambox itself, so that you don't need to have a full development environment to work on this extension.


    Because I simply don't plan to continue work on this issue/plugin, but if it is an inspiration and you wanna continue this path you are welcome.


    Ciao
    gutemine2


    PS: And I was tempted to use this as avatar, but then dropped the idea

  • Zitat

    Well, a Class model would be fine, but I don't think you will find one - even in DMM office building - correct me if I'm wrong :winking_face:


    Probably not. :face_with_rolling_eyes:


    Zitat

    But the Pythons normallyhave relatively speaking names so a simple grep class *.py gives you a quick answer of what could be relevant and then it is not difficulet ot guess from the names which one would be usefull to import/use in your code. So i think the programmers at DMM have done a pretty good job and Ilaways try (!) not do do too much harm to their code :winking_face:


    Good idea! I'll grep it. :winking_face:



    I wanna give it a try. It would be great if you post the scripts.
    Is there a `full development environment` for development for the dreambox?


    Thnx again!


    cul8er,
    BW


    ps. I like your avatar! Why don't you use it ?

    DM7025, 2xDVB-C (ZIggo), 300GB HDD (PATA)

    2 Mal editiert, zuletzt von BushWhacker ()

  • Hi !


    Attached is the kitbuilder environment for the renamemovie plugin (it is just so big because of the ar binary, because ar from busybox doesn't allow create of ar files needed for ipk kits)


    Simply FTP it to your Dreambox at /tmp
    then type the following:


    bunzip2 /tmp/rename*
    tar -xvf /tmp/rename*


    This will create all you need at /media/hdd/renamemovie


    If you then have my renamemovie plugin installed and changed the code to your needs you just need to execute 2 scripts and modify the control file to tell it that is a newer version:


    cd /media/hdd/renamemovie
    eni*.sh


    This script will simply copy the plugin into the enigma2-plugin-extensions-renamemovie subdirectory from which the ipk kit is built.


    You then could go to the enigma2-plugin-extensions-renamemovie subidrectory and then in the CONTROL subdirectory and change the control file (your contact infos, new version number,...)


    Then you go back to the renamemovie directory and do:


    ipkg-build enigma2-plugin-extensions-renamemovie


    This will then build the new en*.ipk file for you in this directory which is installable with ipkg install as usual.


    Have fun creating a Version 3.0, and I'm looking forward to test it !


    Ciao
    gutemine2


    PS: I develop 9*% of my stuff directly on the Dreambox 7025 (including Compiling C programms), my OE on the Linux PC is mainly for reference purpose and download and/or bitbake the stuff which is already integrated into the OE - but I'm just a bad example and not a real developer :smiling_face:


    PPS: I added my normal avatar - believe me it is better this way

  • Hi Gutemine,


    Thank you for your explanation and files.


    I've installed Eclipse + Pydev on my PC for learning Python.
    Eclipse looks good with syntax highlighting etc.


    Zitat

    Have fun creating a Version 3.0, and I'm looking forward to test it !


    thanx. I'll do my best for it, but don't know when I've enough time cause I've to learn Python first.
    Usually I program in VB.Net 2005 on my WindowsXP-box.
    When it's ready, you're the first to know! =)


    regards,
    BW


    PS. I still like the quote `Das Männchem mit schwarzen Ohren`. :face_with_tongue:

    DM7025, 2xDVB-C (ZIggo), 300GB HDD (PATA)

  • well, I never learnt/understood python either :smiling_face:


    After some time you simple don't complain anymore why some things are so strange (- sorry 'different')...


    As long as you just change/copy existing stuff and do simple changes it is more then sufficient if you have a generic understanding how a programming language works, the rest you can find easily by Google and on the python online documentation.


    But I agree that a proper preparation is probably the better approach and as I already said I'm just a bad example on how to do things, but I simply don't care too much either, because it is something I do as a hobby and enjoy more then putting ships in bottles or getting liquor out of them :smiling_face:


    Ciao
    gutemine2

    Einmal editiert, zuletzt von Lost in Translation ()

  • Sorry for crashing into an almost resolved thread like this, but for what its worth I may have another solution.


    Zitat

    Originally posted by BushWhacker
    Another request: A simple way to cut a recording. I always record 15 minutes before and 30 minutes after (Veronica is bad in timing :face_with_tongue: ) and I would like to remove the crap before and after.


    Check out my "mcut" package (Code to perform the movie cuts on DM7025). It can be used together with the cutlist editor, or by itself, to actually cut off the unwanted parts of the ts file, which may save a lot of space on the disk in your case.


    Unfortunately there is no menu interface to it (yet), so the commands in the package have to be run from the shell in the dreambox.


    Zitat

    Originally posted by BushWhacker
    What I really like to do is change the name and metadata of recordings.
    I have a dream-keyboard, so it would be very handy if I can use it for the renaming.


    When experimenting with "mcut" I also found that I sometimes needed to change the title and description in the meta file. For example, sometimes I record consecutive movies to the same file. With mcut I can easily separate them again, but then I must of course set the
    titles right.


    So I wrote a C hack to do it. (I realize now that it could have been done in python, but since I too don't know python this was faster for me.) It was not included in the mcut package above since I hadn't anticipated any broad demand for it. Probably I should have included it after all when I think of it.


    The program "mtitle" takes the ts file name, the new title, and optionally a new description, and modifies the corresponding meta file. Thus it should work also when there is no title or description initially in the meta file.


    The drawback is of course that this too has to be run from the shell. So it is not the nice interactive dialog that one would like. Once I learn python, etc etc... (Maybe I will look at gutemine's code to see if I can steal the interaction parts, but don't hold your breath.)


    Best Regards
    Anders Holst

  • Have you cosidered using Menu Fantastic Plugin as pythonwrapper for your shell commands/bianries ?


    It is realtively easy to use and If you have special needs on the argument passing I could even Implement it for you.


    And it was designed for old script kiddies lieke me who just want to call shellscripts and binaries from a nice enigma2 menu interface :smiling_face:


    There are lots of sample menus and scripts included, and with the explaination in the readme.txt you should be able to find your way.

  • Hi Gutemine,


    mm. wo findet man denn das script metagen.sh ?
    Im Board kann ich es nirgens finden, google hat auch nichts...


    Ich hab bestimmt 600 GB Aufnahmen auf meiner 7000er, wfür ich gern schnell ein paar meta - files anlegen würde....


    Beste Grüsse
    Dnalor12