openframeworks / openframeworks/openFrameworks
ofVideoPlayer linux / Error on buffer size for some videos when setting OF_PIXELS_NATIVE
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Hi,
I am with latest master under xubuntu 14.04.
If I set the player to use the default pixel format I get this error with a video captured from a GoPro camera :
[notice ] ofGstVideoPlayer: allocating with 860x646 I420
[ error ] ofGstVideoUtils: buffer_cb(): error on new buffer, buffer size: 834632!= init size: 833340
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module qtdemux0 reported: GStreamer encountered a general stream error.
[warning] ofGstUtils: didn't received EOS in 5s, closing pipeline anyway
[ error ] ofGstVideoUtils: buffer_cb(): error on new buffer, buffer size: 834632!= init size: 833340
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module qtdemux1 reported: GStreamer encountered a general stream error.
This error does not appear if don't set the pixels to the default format and everything renders fine.
It also does not appear for the fingers.mov for example, even if I set the default format.
In addition it seems to me that this error is actually misleading, since if I force the player to render on the default format I will get a result that seems to me correct i.e the movie seems to render properly on the default colorspace .
EDIT: Not sure about the above comment anymore since I just tried the programmable renderer to see if the colorspace conversion would work properly but it doesn't.. The video is being rendered like this:

I am using the legacy gl renderer and not the programmable one .
Here are some info of the video file that might be helpful:
General
Complete name : test.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 265 MiB
Duration : 1mn 13s
Overall bit rate : 30.1 Mbps
Encoded date : UTC 2014-10-09 10:19:24
Tagged date : UTC 2014-10-09 10:19:28
©TIM : 00;00;00;00
©TSC : 2997
©TSZ : 50
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Format settings, GOP : M=3, N=33
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1mn 13s
Source duration : 1mn 13s
Bit rate : 30.1 Mbps
Width : 860 pixels
Height : 646 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Frame rate : 59.940 fps
Minimum frame rate : 59.940 fps
Maximum frame rate : 60.000 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.904
Stream size : 264 MiB (100%)
Source stream size : 264 MiB (100%)
Language : English
Encoded date : UTC 2014-10-09 10:19:24
Tagged date : UTC 2014-10-09 10:19:24
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
mdhd_Duration : 73724
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the GoPro MP4 case on Linux with OF_PIXELS_NATIVE and compare it with fingers.mov. Trace ofGstVideoPlayer, ofGstVideoUtils::buffer_cb(), and ofGstUtils::gstHandleMessage(); done means the video plays without the buffer-size failure and renders the expected colorspace with the legacy renderer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100