+ Reply to Thread
Results 31 to 39 of 39
-
am doing captures off stallite tonight.
i believe this is a decoding bug in rawsource stdout, so i decided to search around for y4m samples, in hopes to find the byte order or layout, that i might try and revive an older yuv project i did work on many years ago. it was the preview bug (post 1) that jarded my memory of it, and long story very short, that project was not decoding the y/u/v/ in the proper dimensions and causing the same distorted result in post 1. maybe i can find it in my old w98 computer.
i was only able to find this resource so far.
http://samples.mplayerhq.hu/yuv4mpeg2/
but that too, shows the same visual symptom in avisynth->rawsource->virtualdub previewing
so, theres three sources to review, but its gotta be the rawsource problem with y4m sources, nothing we can do about it in the actual y4m files, i don't think..unless we cheat on the file somehow. -
thanks. i found a link to some older versions of rawsource:
http://forum.doom9.org/showthread.php?t=39798&page=7
YUV-Bitmap Import filter?
the avs2yuv versions work.
but the ffmpeg, due to its ( unecessary? ) longer header, fails. i've tried "padding" out the FRAME to bring it closer to the usual position it is found and succefully handled, but it still produces the same problem in post 1. one time i got very close to the edge of the frame without the issue but it was not acceptable. ffmpeg has to use the same position that avs2yuv uses for the current versions of rawsource to process correctly. i would guess that the longer header is not a bug as long as decoders or routines that hand the source can do so correctly.
thank you for the help in all this guys. -
y4m headers are free form and arbitrary length. You can just keep adding fields separated by spaces. The end of the header is marked with a 0x0a (linefeed).
Did the "fixed" sample I upload work for you? It worked perfectly here. Are you cutting out a portion of the header or are you just copying the "FRAME" to a different location? You must do the former, not the latter. -
i know all that already, and tried various ideas, thanks. yes, the fixed ex worked, thanks.
[edit] but the "del" aspects is not something i would want to do since it requries rebuilding/saving a new file. i was hoping that padding would work, oh well.[/edit]
oh, forgot to mention...
i looked at the source of rawsource and there are a few variables:
Code:int headerlen; //YUV4MPEG2 frame header length char headerbuf[64];
-
Last edited by jagabo; 27th Sep 2013 at 07:59.
-
i downloaded one of the updated versions of rawsource in post #34. i am now able to open y4m sources created through avs2yuv. however, the sources created by ffmpeg i am not able to play with the updated rawsource. the only way i would be able to play them correctly is through the technique you mentioned. however, i was trying to try another way in that technique by padding instead of deleteing. deleting would require rewriting a new source. too much work for large files. was hoping i could get away with padding because then i would be willing to create a utility to pad the files from ffmpeg w/out re-writing and move on in my video projects. but those attempts to pad failed. the only workable method is the one you mentioned, which requires deleting and then rewriting.
-
After a quick glance it looks to me like the newer version of rawsource should work with the y4m files created by ffmpeg (it works with the small test file I have). But I went ahead and modified the old 2006 version of rawsource.cpp to work with larger headers. This one also works with the small file I have. If anyone wants to test it out let me know.
Similar Threads
-
convert raw video .y4m to mpg video with certain GOP
By abeer in forum Video ConversionReplies: 1Last Post: 26th Nov 2012, 10:23 -
Ripping DVD into Y4M
By OpasanNekiLik in forum DVD RippingReplies: 0Last Post: 2nd Apr 2011, 12:31 -
encoding y4m with X264
By m4Rio in forum Newbie / General discussionsReplies: 6Last Post: 11th Aug 2010, 12:08 -
Help in CAVLC decoding
By krao in forum ProgrammingReplies: 0Last Post: 15th Jul 2010, 16:55 -
subtitles gone after decoding
By Meredy in forum SubtitleReplies: 1Last Post: 7th Jul 2009, 07:52