Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer gstreamer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 669
    • Issues 669
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 347
    • Merge requests 347
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gstreamergstreamer
  • Issues
  • #464

Closed
Open
Created Nov 08, 2019 by Michael Newman@ratsima

Out Of Sequence First Frame With omxh264enc

I'm using GStreamer to produce a time lapse video from a series of JPEG images named like this:

image_000.jpg
image_001.jpg
image_002.jpg
image_003.jpg
image_004.jpg
image_005.jpg 

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.

gst-launch-1.0 version 1.4.4 GStreamer 1.4.4 Raspbian GNU/Linux 8 (jessie) Raspberry Pi Model B

Same problem with Buster on a Pi 4.

Here's the code:

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" &>> "$log"

Here's a sample mp4 file that gets stuck on the first out-of-squence frame. VLC ignores the error, but other video players stay stuck unless you play with the progress bar:

fileh264.mp4

avprobe:

pi@rasp ~/webcam/video $ avprobe -show_packets 20191108.mp4 | grep pts_time
avprobe version 11.12-6:11.12-1~deb8u8+rpi1, Copyright (c) 2007-2018 the Libav developers
  built on Sep  1 2019 15:44:05 with gcc 4.9.2 (Raspbian 4.9.2-10+deb8u2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20191108.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomiso2
    creation_time   : 2019-11-07 21:05:02
  Duration: 00:00:35.70, start: -140462.610000, bitrate: 1200 kb/s
    Stream #0.0(eng): Video: h264 (High), yuv420p, 640x480, 1199 kb/s, 10 fps, 1k tbn (default)
    Metadata:
      creation_time   : 2019-11-07 21:05:02
pts_time=-140462.610000
pts_time=0.100000
pts_time=0.200000
pts_time=0.300000
pts_time=0.400000
pts_time=0.500000
<snip>
Assignee
Assign to
Time tracking