1. jmx's Avatar
    I get a syntax error when i type c: \ (minus the space between : \)
    Last edited by jmx; 2010-04-22 at 09:22 PM.
    2010-04-22 08:18 PM
  2. xHITMANx's Avatar
    Ok I don't get this, the corrupt .mov file needs to be in the repair_cycorder_mov folder right? and that folder on the desktop right? So why do I keep getting a syntax error, is the file just too big (325MB) or did I download the wrong python file from the website (I downloaded the 64-bit one under the regular Windows-binary)?

    I get a syntax error when i type c: (minus the space between : )
    I know and the arrow keeps pointing to the ( : )

    Thanks XYLOR... and Mikeebee! That worked wonderfully. Can't believe how simple that was for me to run to fix/repair. I really appreciate it.
    Can you tell me exactly what you did?

    Bump
    Last edited by xHITMANx; 2010-04-23 at 04:58 AM. Reason: Automerged Doublepost
    2010-04-23 04:58 AM
  3. Cer0's Avatar
    Do you mind posting a screenshot of the cmd terminal after you type it?

    Should look like this but with your info in and where your folder is.
    Attached Thumbnails Editing .mov files for corrupt cycorder videos...-untitled.jpg  
    Last edited by Cer0; 2010-04-23 at 05:19 AM.
    [CENTER][SIGPIC][/SIGPIC][/CENTER]
    2010-04-23 05:13 AM
  4. xHITMANx's Avatar
    ok so if my folder is on my desktop, I type C: \Users\my name\Desktop\repair_cycorder_mov.py filename.mov outputfilename.mov -v ?
    2010-04-23 05:54 AM
  5. Cer0's Avatar
    Do "cd" then type the folder path. "cd" changes the path the terminal is looking in. On mine it would be cd c: \documents and settings\username\desktop\folder with video\

    Then run the script.

    See in my screen shot it started out with c: \ then I changed it to start with c: \test
    Last edited by Cer0; 2010-04-23 at 06:09 AM.
    [CENTER][SIGPIC][/SIGPIC][/CENTER]
    2010-04-23 06:05 AM
  6. xHITMANx's Avatar
    hahaha..ok I'll admit, my dumbass was doing this on the python command window..lol. No wonder it wasn't working.

    THANKS cerote! You're my hero!
    2010-04-23 06:18 AM
  7. Cer0's Avatar
    NP, I have learned a small amount of python programming. But sometimes terminal can be confusing when trying to explain in forums with the smilies and everything getting in the way lol.
    [CENTER][SIGPIC][/SIGPIC][/CENTER]
    2010-04-23 12:27 PM
  8. jmx's Avatar
    Thanks cerote! but I have another problem now, I get this error



    any ideas?

    btw, the size of the corrupted video is 572 MB
    Last edited by jmx; 2010-04-23 at 10:40 PM.
    2010-04-23 10:25 PM
  9. mikeebee's Avatar
    NP, I have learned a small amount of python programming. But sometimes terminal can be confusing when trying to explain in forums with the smilies and everything getting in the way lol.
    Apple needs to stop trying to bleed us into buying a new iphone and just give us a native app already! I had video on my POS Motorola Razor, why can't they give us vidoe on this vastly more sophisticated computing device??!?!

    Damn!
    2010-04-23 10:27 PM
  10. Cer0's Avatar
    It's one of those things. The caculators we have today have more power than what got us into space for the first time. Also it is a money thing, how can they get you to upgrade if they don't block new features on old devices. 2Gs are really gonna hurt on next firmware with the stuff being dropped from it.
    [CENTER][SIGPIC][/SIGPIC][/CENTER]
    2010-04-24 03:06 AM
  11. gazmeist's Avatar
    I had a mov that completed the record but quit while it was doing the encode at the end. Is this the same scenario?

    Im getting the following error when running the script

    CDownloads\repair_cycorder_mov>repair_cycorder_mov. py 1259381535.mov output.mo
    v -v
    File "CDownloads\repair_cycorder_mov\repair_cycorder_mov. py", line 87
    print "A%d: %d, %f, %d, %d, %d" % (audio_chunks, time_delta, float(audio_sam
    ples) / 44100, chunk_audio_samples, audio_samples, offset)
    ^
    SyntaxError: invalid syntax


    Thanks
    2010-04-25 07:21 AM
  12. xHITMANx's Avatar
    I had a mov that completed the record but quit while it was doing the encode at the end. Is this the same scenario?

    Im getting the following error when running the script

    Cownloadsrepair_cycorder_mov>repair_cycorder_mov.py 1259381535.mov output.mo
    v -v
    File "Cownloadsrepair_cycorder_movrepair_cycorder_mov.py" , line 87
    print "A%d: %d, %f, %d, %d, %d" % (audio_chunks, time_delta, float(audio_sam
    ples) / 44100, chunk_audio_samples, audio_samples, offset)
    ^
    SyntaxError: invalid syntax


    Thanks
    Open up the DOS command script (not the Python one like my dumbass was doing), you can just type "cmd" in search and it should pop up.

    first you type the location like you did there, but type "cd" first, so:

    cd c: \Downloads\repair_cycorder_mov\

    type that first, hit enter, then you run the script:

    c: \repair_cycorder_mov.py corruptedfilename.mov fixedfilename.mov -v

    you can use w/e name for the new fixed file.

    If this works thank xylor and cerote.
    2010-04-25 10:38 AM
  13. andras.jacso's Avatar
    Hello!

    I have tried your script and it finished the repair but I still can't play the mov file.

    Story:
    I took some snapshots with iTimeLapse on my iPhone3G. Then the battery depleted and the software couldn't finish to save the mov file (this is what I think).

    I was able to copy the mov file from my iPhone onto my Mac.

    Could you take a look on the file if upload it somewhere?

    Thanks,
    Andras
    2010-04-25 11:49 PM
  14. jmx's Avatar
    Does this work with big files?
    2010-04-26 02:56 AM
  15. xHITMANx's Avatar
    Does this work with big files?
    Ya mine was 325MB and it worked.
    2010-04-26 03:06 AM
  16. gazmeist's Avatar
    Open up the DOS command script (not the Python one like my dumbass was doing), you can just type "cmd" in search and it should pop up.

    first you type the location like you did there, but type "cd" first, so:

    cd c: Downloadsrepair_cycorder_mov

    type that first, hit enter, then you run the script:

    c: repair_cycorder_mov.py corruptedfilename.mov fixedfilename.mov -v

    you can use w/e name for the new fixed file.

    If this works thank xylor and cerote.
    Hi Hitman

    The paste above was done exactly as you said (sorry for the confusion I also copied the original command line entry)

    Still getting the same error

    Code:
      File "C:Downloadsrepair_cycorder_movrepair_cycorder_mov.py", line 87
        print "A%d: %d, %f, %d, %d, %d" % (audio_chunks, time_delta, float(audio_sam
    ples) / 44100, chunk_audio_samples, audio_samples, offset)
                                      ^
    SyntaxError: invalid syntax
    2010-04-26 04:38 AM
  17. xHITMANx's Avatar
    Right click the repair_cycorder_mov folder, go to properties and make sure you type the location exactly how it says on there. You have to first type in the location of the file, hit enter, then run the script. Don't type ".py" for the location, thats only when you run the script

    cd: c: \your location\repair_cycorder_mov\ <---- thats for the location, hit enter after this then:

    c: \repair_cycorder_mov.py corruptedfile.mov fixedfile.mov -v <--- hit enter and it should run it.
    2010-04-26 05:36 AM
  18. gazmeist's Avatar
    Right click the repair_cycorder_mov folder, go to properties and make sure you type the location exactly how it says on there. You have to first type in the location of the file, hit enter, then run the script. Don't type ".py" for the location, thats only when you run the script

    cd: c: your locationrepair_cycorder_mov <---- thats for the location, hit enter after this then:

    c: repair_cycorder_mov.py corruptedfile.mov fixedfile.mov -v <--- hit enter and it should run it.
    Hitman Im in the correct folder im not a complete newb

    As you can see from the error output it is running into a problem at a particular line in the script - line 87

    In this section

    Code:
            # Look for an 'mjpg' marker.  Don't include the last 4 bytes,
            # to ensure we include the 'size' field in the data we search.
            marker_pos = chunk[:-4].find(MJPG_MARKER)
    
            # If we didn't find one, get out.
            if 0 != marker_pos:
                # Did we reach the end of the file?
                if -1 == marker_pos:
                    # Assume the rest of the file is audio.
                    chunk_audio_samples = (len(chunk) / 2)
                    # Don't bother if we only read 1 byte, for some reason.
                    if 0 == chunk_audio_samples:
                        break
                else:
                    chunk_audio_samples = (marker_pos / 2)
                audio_samples += chunk_audio_samples
                time_delta = int(float(chunk_audio_samples) / 44100 * 10000)
                audio_chunks += 1
                if verbose:
                    print "A%d: %d, %f, %d, %d, %d" % (audio_chunks, time_delta, float(audio_samples) / 44100, chunk_audio_samples, audio_samples, offset)
                sys.stdout.write(".")
                sys.stdout.flush()
                audio_data.append( (audio_samples, offset) )
                audio_samples_since_sync += chunk_audio_samples
                offset += marker_pos
    Its having a problem at this line

    Code:
                if verbose:
                    print "A%d: %d, %f, %d, %d, %d" % (audio_chunks, time_delta, float(audio_samples) / 44100, chunk_audio_samples, audio_samples, offset)
    I don't know what it means, if its a corruption in my original file or a slight bug in the script somehow, but hoping I can get some help
    2010-04-26 05:46 AM
  19. Cer0's Avatar
    Are you doing the commands in a command prompt, DOS?
    [CENTER][SIGPIC][/SIGPIC][/CENTER]
    2010-04-26 06:41 AM
  20. xHITMANx's Avatar
    Like cerote said, make sure you're using DOS and not the Python command prompt that you get when you download Python. If you are, then I don't know what it is, your file could be another issue not related to the script xylor wrote.
    2010-04-26 07:34 AM
152 ... 23456 ...
LINK TO POST COPIED TO CLIPBOARD