I recently noticed that the first frame of the video is not the first JPEG in the sequence but is instead a JPEG that is about 2/3 of the way through.
Here's the code:
Code: Select all
home="/home/pi/webcam" mfslocation="$home"/arch/image_%03d.jpg fslocation="$home"/video/kamvideo.mp4 gst-launch-1.0 \ -e multifilesrc location="$mfslocation" \ ! image/jpeg, framerate=10/1 \ ! decodebin ! queue ! videoscale \ ! video/x-raw, width=640, height=480 \ ! progressreport name=progress \ ! omxh264enc target-bitrate=1200000 control-rate=variable \ ! video/x-h264, profile=high \ ! h264parse \ ! mp4mux \ ! filesink location="$fslocation"
Here it is: http://www.mgnewman.com/blogger/omxh264enc_pi.mp4
If you try to view this video under Mac OS High Sierra or iOS 11, it will "stick" on the first frame.
It plays fine on VLC and on OSs prior to Apple's most current. The prior OSs simply play the out of sequence frame. The current OSs display the first frame until the player reaches a frame with a timestamp after the first frame. Let it play to the end and you'll see what I mean.
Any ideas as to how to fix this?