GNOME Bugzilla – Bug 749738
matroskamux: mux files with different resolutions
Last modified: 2018-05-06 10:58:21 UTC
Created attachment 303832 [details] sample app to reproduce the problem please give test the attached app: - if at line 91 and 160 you comment out the videotestsrc pipeline you'll get an mkv with the first 10 seconds of h264 video at 320x240 and the last 10 seconds of h264 video at 640x480, this is good and what I want - if you try with real file you'll get wrong results, please test with the files here: http://195.250.34.59/temp/1_1.mkv http://195.250.34.59/temp/1_2.mkv this time does not work, I can see that gst_matroska_mux_video_pad_setcaps is called with the right caps and return TRUE even in the non working case
additional infos - first file caps: video/x-h264, level=(string)3, profile=(string)baseline, codec_data=(buffer)0142001effe100126742001ee2901407b602dc0404069078911501000468ce3c80, stream-format=(string)avc, alignment=(string)au, width=(int)640, height=(int)480, framerate=(fraction)25/1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1 -second file caps: video/x-h264, level=(string)3.1, profile=(string)baseline, codec_data=(buffer)0142001fffe100146742001fe29019026fcb80b7010101a41e24454001000468ce3c80, stream-format=(string)avc, alignment=(string)au, width=(int)800, height=(int)600, framerate=(fraction)25/1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1 does not work with matroskamux, but work with mpegtsmux
using videotestsrc in the sample app matroskamux receive these caps: video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)2, profile=(string)high, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, parsed=(boolean)true, codec_data=(buffer)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c and then: video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)high, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, parsed=(boolean)true, codec_data=(buffer)0164001effe100196764001eacd940a03db0110000030001000003003c8f162d9601000568ebecb22c and the generated mkv is good
Can someone confirm if matroska actually supports changing the video resolution mid recording?
I don't think it does? Surely you'd have to write new headers or so? I don't think the container format supports it. If you need this functionality, use MPEG-TS or so. Also see bug #631618 and bug #709111.
You are right this is not supported by mastroska incidentally it works in some cases.