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 |