used format supports is generally an avi container with lossless codec; in my case (HuffYUV), not even the DAR flag is respected
+ Reply to Thread
Results 31 to 51 of 51
Thread
-
-
Your choice,...
users currently on my ignore list: deadrats, Stears555 -
Two points:
- When uploading your lossless AVI to YouTube, it's going to assume based on its "HD" frame dimensions that it's Rec.709, and thus the colors will be somewhat wrong if you don't do the color matrix conversion step.
- Your ffmpeg command is only telling x264 to add tags stating that the file is Rec.709 -- which it isn't, unless you add a separate color matrix conversion step (either Avisynth or extra ffmpeg commands).
My YouTube channel with little clips: vhs-decode, comparing TBC, etc. -
I do during outputting the HD file using vdub2 output in the format tab as shown, I just couldn't see any difference at all with or without conversion, What are we looking at in terms of differences? Could you show us some differences using the lossless sample provided that left unchanged?
-
Code:
video_org=aviSource("TV Commercial.avi") ### upscale without change color matrix upscaled=video_org.nnedi3_rpow2(rfactor=2, nns=4, qual=2, cshift="Spline36Resize", fwidth=1440, fheight=1080) ### upscale with change color matrix upscaled_cm=video_org.Colormatrix("Rec.601->Rec.709").nnedi3_rpow2(rfactor=2, nns=4, qual=2, cshift="Spline36Resize", fwidth=1440, fheight=1080) f_Subtract_Compare(upscaled,upscaled_cm,"upscaled","upscaled_cm") function f_Subtract_Compare(clip c1, clip c2, string t1, string t2) { c3=Subtract(c1, c2).Levels(65, 1, 255-64, 0, 255, coring=false) c4=Compare(c1, c2) stackvertical(\ stackhorizontal(\ subtitle(c1,t1,size=20,align=2),\ subtitle(c2,t2,size=20,align=2)\ ),\ stackhorizontal(\ subtitle(c3,"subtract"+" "+t1+" "+t2,size=20,align=2),\ subtitle(c4,"compare"+" "+t1+" "+t2,size=20,align=2)\ )\ ) }
[Attachment 65089 - Click to enlarge] -
Exactly. I don't think SD analog formats even the pro ones have enough rich data that can be unleashed when converting to 709 besides just upscaling to HD, There is nothing there to begin with. I do keep converting it to 709 though in vdub2 during output from avspmod, just for the sake of being politically correct.
-
The sample you provided is almost all gray/white; where there are colors there is a difference!
When working with HuffYUV videos having no tags on color format, a Colormatrix("Rec.601->Rec.709") is suitable before upscaling. -
I wouldn't call that a difference but oh well, I like to compare things with my own eyes.
-
If you're talking about the command in post #5
That does not convert the video from rec.601 to rec.709 colors. It only flags the video as rec.709. The colors remain whatever they were on input. That is doubly a mistake with rec.601 video, almost guarantying the wrong colors at playback. Players that assume HD is rec.709 will play with the wrong colors. And players that follow the flagged colormatrix will also play with the wrong colors. To convert you need to add colormatrix=bt601:bt709 to the -vf section.Last edited by jagabo; 31st May 2022 at 22:39.
-
[Attachment 65130 - Click to enlarge]
See the difference now? -
Again, I do convert using vdub2 -see post #34, I just don't see a huge difference in my own videos, In other words I don't think it's that important as originally shot HD videos.
-
So nice things can be done with Hybrid I love..
I testing
Filtering->Vapoursynth->DeBlock->Deblock_QED, and
Filtering->Vapoursynth->DeGrain->TemporalDeGrain
and Add grain.
Still my file is from pioneer dvr560 but this time is direct from hdd and was recorded in XP+ mode ~ 15Mb/s bitrate. -
Sure! Deblock_QED and TemporalDegrain are 2 excellent filters
Be careful to do not overdo and create plastic looks. -
So, is there a correct method to convert colormatrix from 601 to 709 using filters in VirtualDub2 only? Suppose my workflow starts from SD and ends with upscaled HD. I googled around, ten-year old answers say that VDub works with 601 only. Will the setting in dellsam34's post convert to selected format (601 or 709), or will it only flag it as the selected format? There is a similar question from 8 years ago; the author self-answered showing "convert format" filter. Is this the correct approach?
-
Vdub2 has the capability to convert 601 to 709 but without flagging, The script I posted only sets the 709 flag. because having 709 without flag may not let some TV's, media players or software to properly display values especially when sharing or delivering the contents to other people, so you want to make sure it's properly converted and the flag is there. What we've discussed above is whether there is a big difference or not for consumer sources, And the members stated there is.
-
1. Check the REAL color range in your file.
There is no color range information (Full or Limited) in your file. So my bet is that, similar to my Panasonic DVD-Recorder, it is 16-254.
2. This is my ffmpeg command line:
ffmpeg.exe -i in.mpg -vf "scale=in_range=full:out_range=full,lut='y=(va l-16)*1.067',yadif=1,crop=702:564:6:2" -c:v libx264 -crf 17 -colorspace:v "bt709" -color_primaries:v "bt709" -color_trc:v "bt709" -color_range 2 -c:a aac -b:a 256k "out (full range+recode+yadif).mp4"
Filtry po kolei:- scale=in_range=full:out_range=full -- information that it is a full range to full range conversion
- lut='y=(val-16)*1.067' -- brightness conversion from 16-254 to 0-254 (this nicely increases the contrast and the VHS gray becomes blacker)
- yadif=1 -- deinterlace from 25fps interlaced to 50fps progressive (yadif also decently removes mpg blocks)
- crop=702:564:6:2 - removing edge distortions - the values must be manually selected (out_w:out_h:x:y)
- -colorspace:v "bt709" -color_primaries:v "bt709" -color_trc:v "bt709" -color_range 2 -- encoding in the bt.709
I don't see any sense in upscaling if you don't do some image manipulation (sharpening, denoising etc). But of course you can, but you need to take care of the correct size conversion to get a 1: 1 pixel.
Edit: adding the "-t 10" parameter will only convert the first 10 seconds - useful for testing.Last edited by rgr; 12th Jun 2022 at 16:31.
-
Hi, Cropping an image causes stretching, if I want to keep the correct aspect ratio, what are my options?
I read about crop and add border there is more options? -
It shouldn't have happened.
What does the output of ffmpeg look like (especially what's in bold and underlined)?
Input #0, mpeg, from '1-audio.mpg':
Duration: 02:04:04.35, start: 0.237711, bitrate: 4691 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn
Output #0, mp4, to 'd:\1-audio (full range+recode+yadif).mp4':
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(pc, bt470bg, progressive), 702x564 [SAR 16:15 DAR 312:235], q=2-31, 50 fps, 12800 tbn -
Hi there, 1st of all sorry to revive this old 3ad...
Very interesting, thanks.
We have found this interesting git that warns about some common "issues" about digitized SD content:
Chromaticities
The chromaticities of NTSC and PAL are different, although both follow the ITU BT.601 standard. It is crucial to get them right, otherwise you will get skewed colors. This applies to both encoding and decoding. When decoding, you may need to override these properties if they are missing or incorrect. When encoding, you must explicitly save each of these properties in the video container, otherwise decoders will try to guess them, and that fails badly if the video is resized and/or deinterlaced with frame bobbing (doubling).
|Standard|Matrix|Primaries|Transfer|
|BT.601 PAL|BT.470BG|BT.470BG|BT.709
|BT.601 NTSC|SMPTE 170M|SMPTE 170M|BT.709
|BT.601 NTSC (old)|BT.470M|BT.470M|BT.709
Originally Posted by gdgsdg12
Thanks in advance to anyone that will help. -
-
Interesting, so don't you think that color shifting applied in the capture stage (in our case BT.601 PAL -> [BT.470BG / BT.470BG] -> BT.709) is useful at all ?
More: do you think is possible to apply those chroma fixes using FFMPEG ?
Our actual FFMPEG (ffplay-test) capture commandline:
Code:ffplay -rtbufsize 1G -pixel_format uyvy422 -framerate 25 -f dshow -i video="Decklink Video Capture":audio="Decklink Audio Capture" -aspect 4:3 -vf "scale=in_range=full:out_range=full,lut='y=(va l-16)*1.067',bwdif=mode=send_field:parity=auto:deint=all"
Last edited by forart.it; 2nd Mar 2023 at 03:25.
Similar Threads
-
NTSC VHS summary 6: Hybrid for Conversions, Deinterlacing, Upscaling to MP4
By brockway in forum Video ConversionReplies: 8Last Post: 28th Oct 2022, 10:54 -
NTSC VHS newbie summary #5: Resolution mp4 creation & upscaling
By brockway in forum Video ConversionReplies: 0Last Post: 29th Jan 2022, 09:43 -
hardware setup for VHS digitization and upscaling home tapes - suggestions?
By ghost2k8 in forum RestorationReplies: 9Last Post: 23rd Dec 2021, 12:41 -
Upscaling VHS & Hi8 to high definition?
By BenKlesc in forum CapturingReplies: 12Last Post: 20th May 2021, 11:58 -
Is a UK PAL video tape compatible with a continental Europe PAL VHS/S-VHS p
By arjaydavis in forum CapturingReplies: 7Last Post: 21st May 2019, 03:38