From: Steven S. <sch...@gm...> - 2014-10-22 18:47:19
|
I tried posting this a few days ago but with a screenshot of the atom layout the mail item was too large and is waiting for moderator approval. It's been a little while since I needed to create a 4:2:2 uncompressed Quicktime file but now when I run the program that did this task in the past the file shows up as having 0 frames which makes many applications unhappy. I've finally narrowed the problem down to the 'stts' atom having a 'sample_count' value of 0. Attached is a simple test case that produces a 10 frame Quicktime file named testing.mov. Compilation was done with cc -I/usr/local/include/lqt testqt.c -lquicktime but if you've libquicktime installed elsewhere change the -I and / or add -L. Running the program as ./a.out results in the file [larry:~] sms% ls -l testing.mov -rw-r--r-- 1 sms staff 6759228 Oct 17 16:56 testing.mov qtinfo says the file has 0 frames qtinfo testing.mov Type: Quicktime 0 audio tracks. 1 video tracks. 704x480, depth 24 rate 23.976025 [24000:0] constant length 0 frames compressor 2vuy. Native colormodel: Undefined Interlace mode: None (Progressive) Pixel aspect ratio: 10:11 No timecodes available supported. 0 text tracks. and the frame rate doesn't look right either, I'd expect [24000:1001]. I thought too that the Native colormodel should be 422. Also attached is a small extract of 'dumpster' (an Apple utility that is very useful for exploring Quicktime files and can also edit/modify them) Note the 'stts' atom has a 0 for the 'sampCnt' (sample_count) field. If I change that to 10 the qtinfo output is correct. The test program is based on the y4mtoqt program from mjpegtools. Y4mtoqt was working for years and hasn't changed, so something in libquicktime's been broken in the last few months. decoding existing files created earlier or imported from a video capture works but at the moment libquicktime can't be used to create new files that other applications are happy with. Steven Schultz |
From: Burkhard P. <pl...@ig...> - 2014-10-23 15:13:43
|
Hi, Am 22.10.2014 um 20:47 schrieb Steven Schultz: > I tried posting this a few days ago but with a screenshot of the atom > layout the mail item was too large and is waiting for moderator approval. > > It's been a little while since I needed to create a 4:2:2 uncompressed > Quicktime file but now when I run the program that did this task in the > past the file shows up as having 0 frames which makes many applications > unhappy. > > I've finally narrowed the problem down to the 'stts' atom having a > 'sample_count' value of 0. Fixed. That *encoding* bug creeped in during the last update of the *decoding* API :) Burkhard |
From: Steven S. <sch...@gm...> - 2014-10-23 15:57:39
|
On Thu, Oct 23, 2014 at 10:13 AM, Burkhard Plaum < pl...@ig...> wrote: > Hi, > > Am 22.10.2014 um 20:47 schrieb Steven Schultz: > > I've finally narrowed the problem down to the 'stts' atom having a > > 'sample_count' value of 0. > > Fixed. That *encoding* bug creeped in during the last update of the > *decoding* API :) > qtinfo testing.mov Type: Quicktime 0 audio tracks. 1 video tracks. 704x480, depth 24 rate 23.976025 [24000:1001] constant length 10 frames compressor 2vuy. Native colormodel: Undefined Interlace mode: None (Progressive) Pixel aspect ratio: 10:11 No timecodes available supported. 0 text tracks. Much better :) I am still puzzled why the Native color model still shows as Undefined. My memory (possibly faulty) is that it used to say something like "YUV 4:2:2 planar" Steven |
From: Burkhard P. <pl...@ig...> - 2014-10-24 15:58:55
|
Hi, Am 23.10.2014 um 17:57 schrieb Steven Schultz: > I am still puzzled why the Native color model still shows as Undefined. > My memory (possibly faulty) is that it used to say something like "YUV > 4:2:2 planar" Right. The decoding colormodel is now determined just when it's actually used, because it can involve decoding a first image (not in your case of uncompressed video of course) Of course qtinfo should not show "Undefined". A possible solution would be to modify quicktime_print_info() such that it calls lqt_ensure_stream_cmodel_decode() for each video track first. Any volunteers? Burkhard |
From: Steven S. <sch...@gm...> - 2014-10-24 18:58:24
|
Hi -- On Fri, Oct 24, 2014 at 10:58 AM, Burkhard Plaum < pl...@ig...> wrote: > Hi, > > Am 23.10.2014 um 17:57 schrieb Steven Schultz: > > > I am still puzzled why the Native color model still shows as Undefined. > > My memory (possibly faulty) is that it used to say something like "YUV > > 4:2:2 planar" > > Right. The decoding colormodel is now determined just when it's actually > used, > because it can involve decoding a first image (not in your case of > uncompressed > video of course) > Ah, ok. So my memory of a different behavior was correct. > Of course qtinfo should not show "Undefined". > That is just the symptom of the problem. Programs that called lqt_get_cmodel followed by lqt_colormodel_is_yuv immediately after quicktime_open failed because the color model hadn't been updated. A possible solution would be to modify quicktime_print_info() such that it > calls > lqt_ensure_stream_cmodel_decode() for each video track first. Any > volunteers? > The problem was that let_ensure_stream_cmodel_decode exits/returns early if !file->vtracks[track].codec->decode_video and all the uncompressed codecs still returned 0 if called with row_pointers of 0. My solution was to modify the videocodec/ uncompressed codecs to return 1 instead of 0 when called with rows_pointers of 0. Seems to be working OK so far. Steven |
From: Burkhard P. <pl...@ig...> - 2014-10-30 16:40:09
|
Hi, Am 24.10.2014 um 20:58 schrieb Steven Schultz: > The problem was that let_ensure_stream_cmodel_decode exits/returns early > if !file->vtracks[track].codec->decode_video and all the > uncompressed codecs still returned 0 if called with row_pointers of 0. So it was another bug :) > My solution was to modify the videocodec/ uncompressed codecs to return > 1 instead of 0 when called with rows_pointers of 0. > > Seems to be working OK so far. Ahh, and you committed that already, very good. Burkhard |
From: Steven S. <sch...@gm...> - 2014-10-31 01:14:02
|
On Thu, Oct 30, 2014 at 11:37 AM, Burkhard Plaum < pl...@ig...> wrote: > Hi, > > Am 24.10.2014 um 20:58 schrieb Steven Schultz: > > > The problem was that let_ensure_stream_cmodel_decode exits/returns early > > if !file->vtracks[track].codec->decode_video and all the > > uncompressed codecs still returned 0 if called with row_pointers of 0. > > So it was another bug :) > and as usual "two wrongs did not make a right" :) :) > > My solution was to modify the videocodec/ uncompressed codecs > > Ahh, and you committed that already, very good. > Welcome! ;) Steven |