|
From: Maarten De B. <md...@iu...> - 2003-09-21 23:08:22
|
First of all, sorry for the crossposting, but it seems to involve everything. I am trying to convert mini DV (PAL) to SVCD, but so far no luck.. Feeding dvgrab --format dv2 to lav2yuv gives a distorted image; totally green, with blocks. If I understand this correctly, this is because dvgrab generates YUV422 instead of YUV420 (YV12),as mentioned in http://www.geocrawler.com/archives/3/3147/2001/6/0/5959308/ When I try with libdv-0.99# ./configure --prefix=/usr --with-pal-yuv=YV12 The image is ok (no blocks) but very green with purple. Now, as suggested sha...@ut... in a previous mail, I used smilutils-0.2.0, but that segfaults on me directly. :-( Any suggestions/explanations? Maybe how to convert YUV422 to YUV420? Or why smil2yuv crashed? kind regards Maarten PS: On a sitenote, with gcc version 3.3.2 20030812 (Debian prerelease) I had to add assert.h in avi.cc, filehandler.cc and riff.cc in dvgrab-1.2 and smilutils-0.2/libkino Also, smilutils-0.2 does not check for imlib and gdk-imlib |
|
From: Charles Y. <cha...@pa...> - 2003-09-22 06:11:26
|
On Mon, 2003-09-22 at 01:27, Maarten De Boer wrote: > Feeding dvgrab --format dv2 to lav2yuv gives a distorted image; > totally green, with blocks. If I understand this correctly, this is > because dvgrab generates YUV422 instead of YUV420 (YV12),as mentioned > in http://www.geocrawler.com/archives/3/3147/2001/6/0/5959308/ > > When I try with > > libdv-0.99# ./configure --prefix=/usr --with-pal-yuv=YV12 > > The image is ok (no blocks) but very green with purple. OK - don't use --with-pal-yuv=YV12 - just configure as normal. Recompile libdv, dvgrab and smilutils. Then try: dvgrab --format raw - | raw2yuv | yuvplay I would also suggest that if you're doing realtime conversion to mpeg with no DV capture in between, that the current ffmpeg may be better suited to the task: dvgrab --format raw - | ffmpeg -f dv -i - -f mpeg output.mpeg (just read the ffmpeg man page to see how to change the format, resolution and quality settings - I get pretty reasonable results from this). > Now, as suggested sha...@ut... in a previous mail, I > used smilutils-0.2.0, but that segfaults on me directly. :-( Probably because smilutils does not expect the --with-pal-yuv switch to be changed. I would say that unless you have a *definite* requirement to do so, that flag should be avoided. > PS: > On a sitenote, with gcc version 3.3.2 20030812 (Debian prerelease) > I had to add assert.h in avi.cc, filehandler.cc and riff.cc > in dvgrab-1.2 and smilutils-0.2/libkino > Also, smilutils-0.2 does not check for imlib and gdk-imlib Cheers - I'll check these and will be releasing smilutils 0.3.0 soon anyway (just waiting for ffmpeg 0.4.8 to be released...). Charlie |
|
From: Maarten de B. <md...@iu...> - 2003-09-22 09:46:36
|
> OK - don't use --with-pal-yuv=YV12 - just configure as normal. Recompile > libdv, dvgrab and smilutils. Then try: Okay, I will try both yours and Steven's suggestions. It seems it comes down to use yv12 everywhere or nowhere. > dvgrab --format raw - | raw2yuv | yuvplay Okay, raw it will be. I will try this tonight CET. > I would also suggest that if you're doing realtime conversion to mpeg > with no DV capture in between, that the current ffmpeg may be better > suited to the task: Okay, I will try that too, though I won't be doing RT conversion just for now; more HD space than CPU cycles to spare ;-) . I will try it to see what gives me the best result. Once I have it all working, I will try to write a small HOWTO (also explaining how to convert DV to DiVX, which I did manage to do, with mencoder) Thanks for your reply. Maarten |
|
From: Maarten De B. <md...@iu...> - 2003-09-22 21:19:06
|
> dvgrab --format raw - | raw2yuv | yuvplay okay, this works fine! (which indicates that lav2yuv is incompatible with dvgrab output in dv1/dv2 mode... as I understand (correct me if I'm wrong) because dvgrab, through libdv, outputs YUV422 and lav2 expects YUV420. will this be fixed?) Now, if I try to encode a raw dv stream with cat foo.raw | raw2yuv -a output.wav -i 0 | yuvscaler -n n -O SVCD | mpeg2enc -q 10 -a 2 -f 4 -F 3 -S 800 -B 192 -I 1 -o output.m2v this works okay (I am not sure what to think of the quality, since I am used to divx...) but... The resulting mpeg2 file, at least according to mplayer, has an video bitrate of 2500. Which should not occur, since I specify that the output is SVCD (-f 4), and the audio bitrate is 192. Now, even if I specify a lower video bitrate by hand ( -b 1000 for example), the result it (binary) identical! Is this a bug in mpeg2enc, or am I missing something? By the way, raw2yuv allows to specify an output file for the audio, either wav or mp2. For mp2 however, there are no additional flags to influence the encoding. Is there any way to specify how to encode the mp2? > dvgrab --format raw - | > ffmpeg -f dv -i - -f mpeg output.mpeg This result in errors: Input #0, dv, from 'pipe:': Duration: N/A, bitrate: 1536 kb/s Stream #0.0: Video: dvvideo, 720x576, 25.00 fps Stream #0.1: Audio: dvaudio, 48000 Hz, stereo, 1536 kb/s Output #0, mpeg, to 'output.mpeg': Stream #0.0: Video: mpeg1video, 720x576, 25.00 fps, q=2-31, 200 kb/s Stream #0.1: Audio: mp2, 48000 Hz, stereo, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding error pos=71 error pos=65 error pos=64 error pos=64 [....] Any idea? Maarten |
|
From: Roman S. <rv...@su...> - 2003-09-22 21:26:18
|
On Mon, Sep 22, 2003 at 09:37:57PM +0000, Maarten De Boer wrote: > > dvgrab --format raw - | > > ffmpeg -f dv -i - -f mpeg output.mpeg > > This result in errors: > > Input #0, dv, from 'pipe:': > Duration: N/A, bitrate: 1536 kb/s > Stream #0.0: Video: dvvideo, 720x576, 25.00 fps > Stream #0.1: Audio: dvaudio, 48000 Hz, stereo, 1536 kb/s > Output #0, mpeg, to 'output.mpeg': > Stream #0.0: Video: mpeg1video, 720x576, 25.00 fps, q=2-31, 200 kb/s > Stream #0.1: Audio: mp2, 48000 Hz, stereo, 64 kb/s > Stream mapping: > Stream #0.0 -> #0.0 > Stream #0.1 -> #0.1 > Press [q] to stop encoding > error pos=71 > error pos=65 > error pos=64 > error pos=64 > [....] > > Any idea? These are generally harmless and don't affect video quality. They should probably be renamed to meaningful warnings. Will do with my next putback. Thanks, Roman. |
|
From: Maarten De B. <md...@iu...> - 2003-09-22 21:38:16
|
> These are generally harmless and don't affect video quality. They should > probably be renamed to meaningful warnings. Will do with my next putback. Hmm, but it ends with Error while decoding stream #0.0 Error while decoding stream #0.0 Error while decoding stream #0.0 Error while decoding stream #0.0 Error while decoding stream #0.0 Error while decoding stream #0.0 frame= 2 q=25.0 size= 36kB time=0.1 bitrate=4096.0kbits/s and the resulting output (the input is 100 frames raw DV), is only 40 K and doesn't show anything when played with mplayer... Maarten |
|
From: Roman S. <rv...@su...> - 2003-09-22 22:47:06
|
Please, try ffmpeg from the cvs, and if it continues to give you trouble -- please let me know, I will try to fix it. Thanks, Roman. On Mon, Sep 22, 2003 at 09:57:04PM +0000, Maarten De Boer wrote: > > > These are generally harmless and don't affect video quality. They should > > probably be renamed to meaningful warnings. Will do with my next putback. > > Hmm, but it ends with > > Error while decoding stream #0.0 > Error while decoding stream #0.0 > Error while decoding stream #0.0 > Error while decoding stream #0.0 > Error while decoding stream #0.0 > Error while decoding stream #0.0 > frame= 2 q=25.0 size= 36kB time=0.1 bitrate=4096.0kbits/s > > and the resulting output (the input is 100 frames raw DV), is only > 40 K and doesn't show anything when played with mplayer... > > Maarten > > > |