Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: Editing .mov files for corrupt cycorder videos...
is a discussion within theWindows Specific Modding Discussion
forums, a part of theComputer Modding Software
section;I get a syntax error when i type c: \ (minus the space between : \)
...-
04-22-2010, 12:18 PM #61
I get a syntax error when i type c: \ (minus the space between : \)
Last edited by jmx; 04-22-2010 at 01:22 PM.
-
04-22-2010, 08:58 PM #62
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 know and the arrow keeps pointing to the ( : )
Can you tell me exactly what you did?
BumpLast edited by xHITMANx; 04-22-2010 at 08:58 PM. Reason: Automerged Doublepost
-
04-22-2010, 09:13 PM #63Super Moderator
- Join Date
- Apr 2008
- Location
- MN/WI
- Posts
- 13,731
- Thanks
- 382
- Thanked 1,124 Times in 875 Posts
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.Last edited by Cer0; 04-22-2010 at 09:19 PM.

-
The Following User Says Thank You to Cer0 For This Useful Post:
xHITMANx (04-22-2010)
-
04-22-2010, 09:54 PM #64
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 ?
-
04-22-2010, 10:05 PM #65Super Moderator
- Join Date
- Apr 2008
- Location
- MN/WI
- Posts
- 13,731
- Thanks
- 382
- Thanked 1,124 Times in 875 Posts
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: \testLast edited by Cer0; 04-22-2010 at 10:09 PM.

-
The Following User Says Thank You to Cer0 For This Useful Post:
xHITMANx (04-22-2010)
-
04-22-2010, 10:18 PM #66
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!
-
04-23-2010, 04:27 AM #67Super Moderator
- Join Date
- Apr 2008
- Location
- MN/WI
- Posts
- 13,731
- Thanks
- 382
- Thanked 1,124 Times in 875 Posts
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.

-
The Following User Says Thank You to Cer0 For This Useful Post:
jmx (04-23-2010)
-
04-23-2010, 02:25 PM #68
Thanks cerote! but I have another problem now, I get this error

any ideas?
btw, the size of the corrupted video is 572 MBLast edited by jmx; 04-23-2010 at 02:40 PM.
-
04-23-2010, 02:27 PM #69
-
04-23-2010, 07:06 PM #70Super Moderator
- Join Date
- Apr 2008
- Location
- MN/WI
- Posts
- 13,731
- Thanks
- 382
- Thanked 1,124 Times in 875 Posts
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.

-
04-24-2010, 11:21 PM #71
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
C
Downloads\repair_cycorder_mov>repair_cycorder_mov. py 1259381535.mov output.mo
v -v
File "C
Downloads\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
-
04-25-2010, 02:38 AM #72
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.
-
04-25-2010, 03:49 PM #73
iTimeLapse corrupted video repair?
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
-
04-25-2010, 06:56 PM #74
Does this work with big files?
-
04-25-2010, 07:06 PM #75
-
04-25-2010, 08:38 PM #76
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
-
04-25-2010, 09:36 PM #77
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.
-
04-25-2010, 09:46 PM #78
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
Its having a problem at this lineCode:# 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
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 helpCode:if verbose: print "A%d: %d, %f, %d, %d, %d" % (audio_chunks, time_delta, float(audio_samples) / 44100, chunk_audio_samples, audio_samples, offset)
-
04-25-2010, 10:41 PM #79Super Moderator
- Join Date
- Apr 2008
- Location
- MN/WI
- Posts
- 13,731
- Thanks
- 382
- Thanked 1,124 Times in 875 Posts
Are you doing the commands in a command prompt, DOS?

-
04-25-2010, 11:34 PM #80
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.




LinkBack URL
About LinkBacks
Reply With Quote
ownloadsrepair_cycorder_mov>repair_cycorder_mov.py 1259381535.mov output.mo