I have a video file (with no audio stream) taken from a Lorex CCTV DVR. The video file has a suffix of ".264" which I assume means its format is raw h264. I cannot play this video on certain media players including the default player on an Apple tablet. I would like to convert the file to another format that is more universally useable, for example mp4. I tried the following command at Linux terminal:
avconv -i ~/somePath/foo.264 -vcodec libx264 -f mp4 ~/somePath/foo.mp4
but the output mp4 file was basically empty, with a total size of 285 bytes. Furthermore, when I tried to play it using the Ubuntu Videos application the application returned a widow containing the error message: "An error occurred This file contains no playable streams."
file --mime-type ~/somePath/foo.264
~/somePath/foo.264: application/octet-stream
mediainfo ~/somePath/foo.264
...
Format:AVC; Format profile:Baseline@L2; Width:352 pixels; Height:240 pixels
...
Would somebody instruct me how to convert the .264 file to a .mp4?
file --mime-type foo.264
? ormediainfo foo.264
? That will tell you if the file really is a valid video file. If you don't already have it installed and it isn't available as a package for your system, the mediainfo web site has packages for windows, mac, several linux distros, and FreeBSD, as well as source code..264
"extension" means that it is h.264. It might be, or it might not be. BTW, try handbrake to convert it to an mp4.avconf
and/orffmpeg
. I just downloaded your video (hint: next time, give the direct download link, not a link to the drive web-app page that requires javascript and a login account - googledrive.com/host/0B0ej35Mor2U-d1NNMFNoZUhuNU0 ), and using the exact same command you used, it converted from an 80MB file of unknown format to an 18MB mp4 file.