Menu

MP4Client: wrong colour when video has a number of lines not multiple of 16

Help
2014-01-23
2014-03-12
  • Francesc Pinyol Margalef

    Hi,
    When reproducing with MP4Client a video with a number of lines not multiple of 16, the luminance is correct, but the chrominance is not in the right place, with a diagonal pattern. For instance:
    - 420x324: wrong colour (see attached image)
    - 420x336: wrong colour
    - 428x324: wrong colour
    - 432x324: right colour

    Videos were resized with:
    ffmpeg -i sintel_trailer-720p.mp4 -c:a copy -c:v libx264 -s 420x324 sintel_trailer-420x324.mp4

    All mentioned sizes are correctly displayed when using ffplay or vlc.

    I'm using GPAC rev.5000 with ffmpeg 2.1.2.

    Francesc

     

    Last edit: Francesc Pinyol Margalef 2014-01-23
  • Jean Le Feuvre

    Jean Le Feuvre - 2014-03-08

    Are you using openGL output ?

     
  • Francesc Pinyol Margalef

    Hi!
    I've tried with another computer, with GPAC svn rev. 5158, ffmpeg 2.1.4,
    Linux Mageia 4, 32bit, and playing of the four specified video files is fine now.

    However, at the first run of MP4Client (without ~/.gpacrc file), I get a
    black window and the following output:

    $ MP4Client sintel_trailer-420x324.mp4
    GPAC config file .gpacrc not found in /home/cesc - creating new file
    Trying to create config file: /home/cesc/.gpacrcUsing config file in /home/cesc directory
    System info: 2012 MB RAM - 2 cores
    Modules Found : 34
    Loading GPAC Terminal
    [Core] Cannot load module file /usr/local/lib/gpac//gm_jack.so, error is /usr/local/lib/gpac//gm_jack.so: wrong ELF class: ELFCLASS64
    [Core] Cannot load library gm_jack.so
    [Core] Cannot load module file /usr/local/lib/gpac//gm_xvid_dec.so, error is /usr/local/lib/gpac//gm_xvid_dec.so: wrong ELF class: ELFCLASS64
    [Core] Cannot load library gm_xvid_dec.so
    [Core] Cannot open directory /usr/share/fonts/truetype/ for enumeration
    [Core] Cannot open directory /usr/share/fonts/truetype/ for enumeration
    [Thread MediaManager] Couldn't set priority(2) for thread ID 0x00000000
    [Thread MediaManager] Couldn't set priority(2) for thread ID 0xb0d71b40
    Terminal Loaded in 367 ms
    Opening URL sintel_trailer-420x324.mp4
    Service Connected
    [Thread FAAD2 Decoder] Couldn't set priority(2) for thread ID 0xaeaebb40
    [GLSL] Failed to compile shader YUV Rect fragment (strict syntax): 0:1(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

    [Compositor] Using relaxed syntax version of YUV shader

    At subsequent runs, the video is fine:

    $ MP4Client sintel_trailer-420x324.mp4
    Using config file in /home/cesc directory
    System info: 2012 MB RAM - 2 cores
    Modules Found : 34
    Loading GPAC Terminal
    [Thread MediaManager] Couldn't set priority(2) for thread ID 0x00000000
    [Thread MediaManager] Couldn't set priority(2) for thread ID 0xb0dffb40
    Terminal Loaded in 413 ms
    Opening URL sintel_trailer-420x324.mp4
    Service Connected
    [Thread FAAD2 Decoder] Couldn't set priority(2) for thread ID 0x00000000

    The [Compositor] and [Video] sections of automatically created ~/.gpacrc are:

    [Compositor]
    Raster2D=GPAC 2D Raster
    AntiAlias=All
    FrameRate=30.0
    EmulatePOW2=yes
    ScalableZoom=yes
    DrawMode=defer
    BoundingVolume=None
    TextureFromDecoderMemory=no
    EnablePBO=no
    DepthScale=100
    DepthType=VertexArray
    NumViews=1
    StereoType=none
    CameraLayout=Straight
    EyeSeparation=6.3
    FocusDistance=0
    OpenGLExtensions=GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_multitexture GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1 GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_ARB_half_float_pixel GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_pixel_buffer_object GL_ARB_texture_rectangle GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_EXT_gpu_program_parameters GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_ARB_copy_buffer GL_ARB_map_buffer_range GL_EXT_separate_shader_objects GL_ARB_ES2_compatibility GL_ARB_debug_output GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_EXT_provoking_vertex GL_ARB_get_program_binary GL_ARB_robustness GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_internalformat_query GL_ARB_texture_storage GL_ARB_invalidate_subdata GL_ARB_vertex_attrib_binding GL_KHR_debug
    YUVRectShader=Relaxed
    OpenGLMode=hybrid

    [Video]
    DriverName=X11 Video Output
    SwitchResolution=no
    HardwareMemory=Auto
    GLNbBitsPerComponent=8
    GLNbBitsDepth=16
    UseGLDoubleBuffering=yes
    X113DOffscreenMode=Pixmap

    As soon as I get access to the previous computer with the problem, I will update the GPAC code and I will report the behaviour.

    Regards,

    Francesc