Search code examples
ffmpegh.264video-processing

FFMPEG - Convert UInt16 Data to .264


At the moment, I'm trying to convert with FFMPEG my raw data in uint16 format from an infrared camera to MP4 format or at least to .h264.

My current command for ffmpeg is here:

ffmpeg -f rawvideo -pix_fmt gray16be -s:v 140x110 -r 30 -i binaryMarianData.bin -c:v libx264 -f rawvideo -pix_fmt yuv420p output.264

But my ouput File is not really looking good :(

Here is my Input File: http://fileshare.link/91a43a238e0de75b/binaryMarianData.bin

Update 1: Little Endian

Hey guys, would be great if it's possible to get the video output in the little endian byte order.

Unfortunaley my output doesn't look like this.

This is my command used to convert the RAW File:

ffmpeg -f rawvideo -pixel_format gray16le -video_size 110x140 -framerate 30 -i binaryMarianData.bin -vf transpose=clock -c:v libx264 -pix_fmt yuv420p output.264

Solution

  • It is sideways, so the stride has to be corrected and the image rotated.

    ffmpeg -f rawvideo -pixel_format gray16be -video_size 110x140 -framerate 30 -i binaryMarianData.bin -vf transpose=clock -c:v libx264 -pix_fmt yuv420p output.264