Converting or playing a .264 video file?

25

4

I recently bought a Chinese brand DVR (to record security cams). The DVR exports the video files with a ".264" extension. This is my first time ever dealing with this video format.

Anyhow I've been trying to convert the videos to any other format so it will be easier to watch the videos.

The problem is that I could only find one program that can convert and play those files which is Elecard studio something, and even that Elecard studio thing is having trouble with these files, some of them are just making it crash so I can't convert them.

I've tried to find some other programs but I couldn't find anything that can actually play those files.

How can I play or convert these files to another format?

Dan

Posted 2011-03-22T12:08:02.553

Reputation:

2

This: https://askubuntu.com/a/861505/99408 worked for me

– Hieu – 2016-12-17T01:01:02.923

Typically H.264 encoded video is stored in a container such as mp4. If you have necessary development skills you could investigate using the mp4v2 library from http://code.google.com/p/mp4v2/ to insert the encoded video into an mp4 container. Once contained in mp4, VLC might even be able to play it.

– None – 2011-03-22T14:03:05.703

1

What does the file command say about the file? It should be installed on all modern Linux and there's a version for Windows as well.

– Joachim Sauer – 2011-03-24T08:18:31.117

Have you tried ripbot 264? http://www.videohelp.com/tools/RipBot264

– Lord Loh. – 2012-10-23T03:48:40.127

Answers

23

Judging from their extension, these videos probably are "raw" h264 files - they contain just the video data, without any audio and outside of the container.

Because they don't contain any headers, media players are unable to understand their contents - however I believe that you can play such files if you declare that they do contain h264 video !

I can see that you downloaded ffmpeg - you could try to play the video with ffplay using something like

ffplay -f h264 test.264

Other video players have similar options to declare the contents of the file to play. Probably vlc also has such an option however I don't have VLC installed and cannot search for it.

In any case, since the Elecard studio is able to handle these files, they will contain h264 video - you can upload a small one somewhere and I will download and try to play it to tell you my conclusions.

Serafeim

Posted 2011-03-22T12:08:02.553

Reputation: 331

7This worked perfectly for me, thanks. You can also use this to convert the video to another format:

ffmpeg -f h264 -i test.264 convertedfilename.avi – edsko – 2012-03-18T22:08:15.317

7

My brother has the same issue. I am still working out how to convert these files which are full of errors.

To play the files use mplayer

Run the following commands, if one does not work, attempt the other

mplayer -fps 25 filename.264


mplayer -fps 30 filename.264

You have to run mplayer from a DOS/Command window but the effort is worth it as it will "skip" over the errors allowing you to view the files.

Now for a way to convert these files.

Ivan

Posted 2011-03-22T12:08:02.553

Reputation: 71

2

You can use ffmpeg to easily and quickly convert the .h264 file into mp4

ffmpeg -i yourfile.h264 -codec copy video.mp4

I personally did this just today and it worked perfectly.

Source: http://realtechtalk.com/h264_DVR_security_camera_footage_cannot_be_played-1948-articles

Areeb Soo Yasir

Posted 2011-03-22T12:08:02.553

Reputation: 175

2

Have you tried using VLC? - it generally plays everything, can to some nifty conversion, and is free.

http://www.videolan.org/vlc/

trickwallett

Posted 2011-03-22T12:08:02.553

Reputation:

Works on 2.2.1, Ubuntu 15.10. – Ciro Santilli 新疆改造中心法轮功六四事件 – 2016-04-04T18:00:29.680

VLC should work if it's properly configured, e.g. the Demuxer should be set to H264 video demuxer]. See comment to question by @Hieu above or https://www.unifore.net/ip-video-surveillance/how-to-play-264-video-files-from-ip-cameras-dvrs.html

– sawdust – 2017-09-09T00:10:32.647

The first thing I tried was VLC, surprisingly it couldn't play the files. – None – 2011-03-22T12:18:03.297

fair enough - how about FFmpeg? http://ffmpeg.org/

– None – 2011-03-22T12:20:36.417

Haven't tried FFmpeg yet, I followed the link you provided but couldnt find the download, can you provide the direct link to it please? – None – 2011-03-22T12:35:30.777

Ugh, it doesn't work on ffmpeg too.. – None – 2011-03-22T12:47:12.317

2

If I understand your question, you're looking for software to play .264 format videos? Go to http://www.defender-usa.com/downloads/?cat=6 and download the software for the SN501. Included in the software package is R6Viewer. Open R6Viewer and click Open and choose the file you wish to view. If you want to convert to .avi it only seems to work while the video is playing. I can view and convert videos using XP 32bit but can only playback those .avi files on Windows7 x64.

The Federal Farmer

Posted 2011-03-22T12:08:02.553

Reputation: 29

If you download the Defender DVR software, it comes with an AVI generator to convert the .264 files to .AVI. http://www.defender-usa.com/files/21013/software.zip

– Nathan Moinvaziri – 2012-09-16T10:53:57.793

2both links 404 today, 2013-02-04 – Tom Cerul – 2013-02-04T15:12:15.497

1

Those chinese DVRs usually come with a CD with a bunch of software in it, and one of them is the converter software. See if you've got that CD in the box.

Jimmy

Posted 2011-03-22T12:08:02.553

Reputation: 19

These things often use strange container formats, so this is actually a more correct answer than it seems at first glance – Journeyman Geek – 2017-11-04T06:25:09.497

1

This worked for me on Linux:

sudo apt-get install x264
x264 raw_stream.264 -o playable_video.mp4

The MP4 files are playable in VLC and Totem (default video player on Ubuntu) afterwards.

autobottodoggo

Posted 2011-03-22T12:08:02.553

Reputation: 379

-3

Short answer: change the file's extension to .avi.

Long answer:

  1. Go to My Computer
  2. Click organize at the top of the window pane
  3. Click Folder and Search Options
  4. Make sure that hide extensions for known file types is unchecked.
  5. Right click and change the file's extension from .264 to .avi

Then it should work with Media Player, Movie Maker, etc.

josh

Posted 2011-03-22T12:08:02.553

Reputation: 3

1Not so... These aren't "proper" video files with a container, they're raw h.264 streams – Basic – 2014-01-09T17:42:12.987