Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
04-22-2010, 01:18 PM #61
I get a syntax error when i type c: \ (minus the space between : \)
Last edited by jmx; 04-22-2010 at 02:22 PM.
04-22-2010, 09: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)?
Last edited by xHITMANx; 04-22-2010 at 09:58 PM. Reason: Automerged Doublepost
04-22-2010, 10:13 PM #63
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 10:19 PM.[CENTER][SIGPIC][/SIGPIC][/CENTER]
04-22-2010, 10: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, 11:05 PM #65
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; 04-22-2010 at 11:09 PM.[CENTER][SIGPIC][/SIGPIC][/CENTER]
04-22-2010, 11: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, 05:27 AM #67
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]
The Following User Says Thank You to Cer0 For This Useful Post:
04-23-2010, 03:25 PM #68
Thanks cerote! but I have another problem now, I get this error
btw, the size of the corrupted video is 572 MB
Last edited by jmx; 04-23-2010 at 03:40 PM.
04-23-2010, 03:27 PM #69
- Join Date
- Apr 2010
- Thanked 2 Times in 1 Post
04-23-2010, 08:06 PM #70
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]
04-25-2010, 12:21 AM #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
CDownloads\repair_cycorder_mov>repair_cycorder_mov. py 1259381535.mov output.mo
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
04-25-2010, 03:38 AM #72
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, 04:49 PM #73iTimeLapse corrupted video repair?
I have tried your script and it finished the repair but I still can't play the mov file.
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?
04-25-2010, 07:56 PM #74
Does this work with big files?
04-25-2010, 08:06 PM #75
04-25-2010, 09:38 PM #76
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
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, 10: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, 10:46 PM #78
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
# 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
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, 11:41 PM #79
Are you doing the commands in a command prompt, DOS?[CENTER][SIGPIC][/SIGPIC][/CENTER]
04-26-2010, 12:34 AM #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.