I was rendering a video and my computer turned off because of electricity problem. Is there any way I can resume the render from where I left off, without having to start all over again?
If you were rendering out frames as individual images, then you should be able to just set the "begin" frame to the last rendered frame, and go from there.
If you were rendering to a video file, then no...
there is no way to you probably can't get all that work back. The file that got created (if it got created at all) is probably corrupt and unrecoverable. It's possible that the video file will still open in the VSE, and just have an unexpected end, or be shorter than it should be. I've never been able to, but IF you can open it, you can determine the end frame, render the remaining animation (to images), and stitch the two animations together after the fact. Furthermore, rendering the partial video file to individual frames might make that stitching process easier, but it will be critical to get the frame rate correct, or you'll end up with odd timing issues.
This is why it's a good idea to always render to individual frames, and then use the VSE to put those frames together into a video file. Once you have the frames rendered, rendering them into a video file is a very fast process.
The best way to render an animation is to save each frame as a.jpg or .png file. Then you use Blender Video Sequence editor to make it in to one single movie. This probably can't solve your problem right now, but is good to keep in mind for the future. Also see: https://www.blenderguru.com/tutorials/rendering-animations/
You may have lost a significant chunk of the data you were rendering. We have all been there lost some renders because of having done just this, it is one of those things that will eventually happen. Its not so nice to notice having lost a multiday render because of power loss or drive malfunction. (Personally I lost a ~12 day render job once because the RAID failed). So learn your lesson, prepare for possibility of failure and you will save time in the future.*
It might be possible to recover some of the data. You may have lost more data than you have expected since some of the data may have been cached and not in the video file and the last I frame may be further back than expected. Like others have explained take a video editor and cut the data at last good frame that was commited to disk (incidentally this may be nothing for certain codecs). Continue from this point and graft the pieces later. However, you might now decide to re-render the whole thing again. So make a small scale test of the process before you commit yourself.
The reason why you never render directly to video files is not really the crash proof nature of things. The recoverable nature and ability to interupt your job for hardware maintenance are just a side effects of a much better workflow. The primary reason is that compression is a bit of a hit and miss game. So you really want to have a uncompressed source out of your renderer so you can recompress the data if your initial compression had a lot of artefacts. So be sure that you are happy with your compression quality before you go further. See this may have been a blessing in disguise.
For similar reasons avoid rendering in future to formats like jpg as they discard data on save and you may need it later whan deciding to change a part of your animation.
* at this point you may feel pople are being rude pointing this out. However in my experience one can not appreciate the facts without experiencing them first hand. So the pain may be in fact useful.
Has already stated here never ever ever render from a 3D scene directly to a video file. Always render to separate image files like a png or jpg sequence.
Now that the mistake was made all you can do is open your video file and see if it is playable and the information recoverable. If so you are in luck.
See what was the last good recoverable frame from the video and extract the information with some video editing software like Blender VSE or other into an image sequence.
You can then continue rendering from the last good frame into an image sequence and then combined the new frames with the old ones using the VSE or any other software you like into a video after rendering.
If rendered directly into a video file format it's difficult to recover your work. Depending on what format you've been rendering it might use encoding and compression, which in that case is only one of your problems. You'll also need to figure out on which point exactly the process stopped.
Video compression in short is done by saving pixels, thus reducing the amount of data. The best method to save pixels is to reduce them to the ones that change between similar images. The common method is to have keyframe images (I-Frames) which contain full renders and between them you have a "prediction" of the changes that might happen in the next frame. Those frames are called P-Frames (P for prediction. See, there's a pattern here). These are followed by images that contain both the resulting P-Frame and a prediction to the following I-Frame, thus they are bidirectional and called B-Frames.
The sequence is "I-Frame -> P-Frame -> B-Frame ->I-Frame". Since you want to have the most valuable Information in the last picture you'll need to cut the interrupted video on the last I-Frame and (if you manage to find out where the interruption happened in the process) resume your render process from there. The resulting video can then be "glued" to the end of the first video. This most commonly results in another encoding process where you also most possibly will lose data again.
In general I go with what Duarte said. One does not simply render into a video file format ever.
I would get an external single-file-targeted editor like VirtualDub or Avidemux and use it to identify the last good I-frame/keyframe in the file and trim past it, as @metaphor_set was hinting at. These programs all have commands to jump to the next/prev I-frame, so it should be pretty quick.
You can then get the length of the trimmed video in frames, which lets you figure the frame number to continue from.