Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-libav gst-libav
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 70
    • Issues 70
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • 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
  • gst-libavgst-libav
  • Issues
  • #15

Closed
Open
Created Jul 02, 2014 by Bugzilla Migration User@bugzilla-migration

Missing frames when encoding 16x16 video to MPEG4/MPEG2/H264

Submitted by Vincent Penquerc'h @vincent

Link to original bug (#732631)

Description

+++ This bug was initially created as a clone of Bug 732351 +++

When encoding 16x16 video to MPEG, a sanity check triggers in ffmpeg, which causes frames to be not encoded.

To reproduce:

  1. Create a 16x16 h264 file:
    gst-launch-1.0 videotestsrc pattern=6 num-buffers=1000 ! \
    "video/x-raw, format=(string)I420, width=(int)16, height=(int)16, \
    framerate=(fraction)1/1" ! x264enc ! qtmux ! filesink location=/tmp/test.mov

  2. Play this file:
    gst-launch-1.0 playbin uri="file:///tmp/test.mov" video-sink=xvimagesink

  3. See grey output, instead of the solid blue (pattern 6) we expected.

Tracing shows the encoding earlies out in libav from a sanity check on size (which is apparently too strict):

gst-libs/ext/libav/libavcodec/mpegvideo_enc.c, function encode_thread:

        if(s->pb.buf_end - s->pb.buf - (put_bits_count(&s->pb)>>3) < MAX_MB_BYTES){  
            av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n");  
            return -1;  
        }  

Commenting out the return -1 above fixes the issue (albeit at the likely cost of possible buffer overflow).

Depends on

  • Bug 732351
Assignee
Assign to
Time tracking