Welcome DJI Spark Pilot!
Jump in and join our free Spark community today!
Sign up

(Solved) Repair corrupt video file on Spark

Blue Baron

Well-Known Member
Join
Jul 22, 2017
Messages
160
Age
49
Loc
EU
I just figured this one out ...

I recorded a video and switched the Spark off after landing. W/o stopping the recording in the app or with the RC first. I ended up with a corrupt file (0:00 min) which the app could not open or download. And after copy to a computer, it could not be opened or played too.

This here saved my ***: Repairing Corrupt DJI Video Files (open source tool)
Just follow the instructions, it worked for me. Wanted to let you know, because they don't list Spark yet as supported. But it is.
 

Advexure

Well-Known Member
Join
May 26, 2017
Messages
256
Loc
Los Angeles, CA
Glad you found the tool.

For your information and others: Video must be started and stopped with the record button as stopping the video closes up the video file to save to your media storage. When the recording is not stopped with the record button the file is not closed and while it may show as a video file on your computer it will not playback. This tool has come in handy many times over the years during crash instances where copters have impacted an object, dislodging the battery, causing the recording to be left unclosed. The tool is able to close of these corrupt video files to enable use and playback.

Safe flying! :cool:
 

His415

Well-Known Member
Join
Jul 12, 2017
Messages
436
Age
38
Nice tip thanks, I've got several files like this.
 
  • Like
Reactions: Advexure

Justin

Active Member
Join
Aug 15, 2017
Messages
32
Age
37
HI, I found this too and have a couple corrupted files. I put the software and corrupted files in a folder on my desktop titled Movies and tried to run the software in the terminal (macOS).

I found the file in terminal by doing ~/Desktop/Movies and then I typed: chmod +x djifix

but terminal says:
"chmod: djifix: No such file or directory" :confused:

Do any of you whizzes who have made it work know what I'm doing wrong?

cheers,

Justin
 

Justin

Active Member
Join
Aug 15, 2017
Messages
32
Age
37
Glad you found the tool.

For your information and others: Video must be started and stopped with the record button as stopping the video closes up the video file to save to your media storage. When the recording is not stopped with the record button the file is not closed and while it may show as a video file on your computer it will not playback. This tool has come in handy many times over the years during crash instances where copters have impacted an object, dislodging the battery, causing the recording to be left unclosed. The tool is able to close of these corrupt video files to enable use and playback.

Safe flying! :cool:

Ok ignore what I just said above. I put the files in the actual Movies folder and ran the terminal and it found the files etc.

I got a repaired file "DJI_0052-repaired.h264" which should play in VLC player but doesn't... Any ideas on that Guys?
 

finlayson

Member
Join
May 28, 2017
Messages
6
Age
60
I got a repaired file "DJI_0052-repaired.h264" which should play in VLC player but doesn't... Any ideas on that Guys?
Were you asked to enter a 'format code'? If so, try several different codes. (People are often mistaken about which format their video as recorded in.)
 

Blue Baron

Well-Known Member
Join
Jul 22, 2017
Messages
160
Age
49
Loc
EU
Maybe, your VLC installation isn't up to the task, maybe the repaired file is still corrupt (I don't know). What you can still try:
Download and install ffmpeg. And convert from .h264 to .mp4. You'll have to do that anyway ... With a bit of luck, you'll get a good file then.
 

Blue Baron

Well-Known Member
Join
Jul 22, 2017
Messages
160
Age
49
Loc
EU
Sidenote ...
Spark files import at 29.98 fps in Final Cut Pro X.Which causes stutter on a 29.97 timeline. I use the same tool, ffmpeg, to convert Spark content from 29.98 to 29.97 prior to bringing it into FCPX.
 

sshevlyagin

New Member
Join
Sep 24, 2018
Messages
1
Age
33
This saved my file, thank you! I had to do two things:
- Download and run djifix as described here
- Download ffmpeg and convert the framerate to fix stuttering as per Blue Barron
-- ./ffmpeg -y -r 29.97 -i repaired_file.h264 -c copy output.mp4
 

Mike Fischer

Active Member
Join
Dec 21, 2017
Messages
29
Age
62
DJI should just incorporate a feature to automatically stop recording and close the file properly to prevent this from happening. Once the aircraft is landed, it makes little sense to me to keep recording until you power down (accidentally or on purpose). I prefer free form flying with Litchi or Autopilot simply because the video recording can be set to start/stop automatically.
 

Mike Fischer

Active Member
Join
Dec 21, 2017
Messages
29
Age
62
The weekend I also had a corrupt video file. I was flying a Waypoint mission with Litchi. I like flying with Litchi because of the auto start/stop of video. Until now it has never failed me.

I was checking the video on the SD card later and found out that my last mission was corrupt. The video was approximately 840MB but it would not open in any of my video players including VLC. I tried a number of repair utilities and processes and only one seemed to work. I don't remember the name of the program since they wanted $60 for the recovery. That was not worth it to me since I had one more day to fly the mission again.

The next day I flew the same mission and everything worked as it should. When I reviewed my SD card, I was surprised to see that the previous day's video was no longer corrupt! I don't know what happened but I was glad to see the corrupt video from a day ago was now could be perfectly viewed.
 
  • Like
Reactions: Icemanwbs

IPedro

Member
Join
Oct 28, 2018
Messages
23
Actually, if you get a corrupted file, just turn on the drone (with sd card), and it will fix the file. Always worked for me
 
  • Like
Reactions: KevinRussell

KevinRussell

Active Member
Join
Feb 18, 2018
Messages
41
Hey iPedro, your right, I tried your suggestion and it worked, the video files repaired themselves. Awesome tip!
 

elfatih

Active Member
Join
Nov 22, 2018
Messages
43
Age
28
Excellency is something whose expectation has been wished by all PhD graduate students. It does not matter you are pursing you post graduation in which subject stream. One should urge to assignment help online team so that their home work is not in the impartial stage. Taking the writing benefit from us is that you cannot get the poor grade. In order to know more information, it is the best option to visit our web portal.
 

41Flyer

Active Member
Join
Apr 20, 2019
Messages
43
Age
78
I have some MP4s that won't play in quicktime. They have been on the memory card for the last 2 or 3 flights and did not self heal themselves. How long does it take for them to get fixed on the drone? These are probably 10 minutes worth of footage. I am in the middle of trying to repair with djifix, ffmpeg, and VLC.
 

41Flyer

Active Member
Join
Apr 20, 2019
Messages
43
Age
78
I have some MP4s that won't play in quicktime. They have been on the memory card for the last 2 or 3 flights and did not self heal themselves. How long does it take for them to get fixed on the drone? These are probably 10 minutes worth of footage. I am in the middle of trying to repair with djifix, ffmpeg, and VLC.
meh... I stand corrected. the video I found had the wrong frame rate so it would jump at a consistent pattern. I put the damaged files back on the drone and they did not heal for me. time to remember to stop recording. (just posting for future people searching for this same issue)
 

Tentoes

Well-Known Member
Join
Jun 5, 2019
Messages
235
Loc
Oklahoma USA
I've made that mistake a couple times. So I will try:

1. Put the card back in spark, turn it on and leave it 30 seconds or so. If that doesn't fix it:
2. Try this command line program.

(I think I once saw Spark repair one of these.
 

New Threads

Members online

Forum statistics

Threads
11,375
Messages
94,601
Members
15,418
Latest member
Marcus.mitchell