I want to compress my huge HuffUYV caps to a modern video format or codec that allows me to keep the video interlaced, keep the same video resolution and keep the chroma sub untouched (4:2:2), What do you guys advanced users use? I read in different threads to avoid NLE software such as Adobe premiere and Sony vegas, Is there any other alternatives? or there is no such thing as custom as I wanted it?
+ Reply to Thread
Results 1 to 30 of 42
-
-
It depends on what the goal is, or how you are going to be using it . Why are you doing this ?
i.e. did you want to compress it smaller, but don't mind quality loss ? or lossless compression just more compressed than the huffyuv compression ?
What device / software target(s) / platform(s) ? -
Just for device playback compatibility such as nVidia shield, LG smart TV from USB drive, preferably no loss, Little loss is ok, but MPEG-2 or DV like loss no. My goal is not really compressing as I mentioned, What I meant is a more compatible codec that keeps the video proprieties unchanged.
Last edited by dellsam34; 26th Dec 2016 at 22:45.
-
Likely , they won't support 4:2:2 playback . Most "smart" TV's , android devices, console or bd players etc... only support 4:2:0
What was your original source prior to huffyuv ? -
Do you care about the loss if you can't see it? Try encoding AVC with x264 at crf = 17. AVC/h264 is very widely supported.
-
-
Last edited by dellsam34; 26th Dec 2016 at 23:01.
-
-
if you insist on 4:2:2 perhaps add --output-csp i422
but I doubt if you see any difference and you would have playback problems using non PC devices
I forgot you have interlaced video, if bottom field first (if top field first then --tff), then for 4:3 NTSC:
x264.exe --crf 14 -bff --sar 8:9 --tune grain --vbv-bufsize 17000 --vbv-maxrate 17000
or try:
x264.exe --crf 14 --bff --sar 8:9 --tune grain --output-csp i422 --vbv-bufsize 17000 --vbv-maxrate 17000
if different resolution or system, follow this table:
if %ar%==4:3 if %h%==480 if %w%==720 (set sar=8:9)
if %ar%==4:3 if %h%==576 if %w%==720 (set sar=16:15)
if %ar%==16:9 if %h%==480 if %w%==720 (set sar=32:27)
if %ar%==16:9 if %h%==576 if %w%==720 (set sar=64:45)
if %ar%==4:3 if %h%==480 if %w%==704 (set sar=10:11)
if %ar%==4:3 if %h%==576 if %w%==704 (set sar=12:11)
if %ar%==16:9 if %h%==480 if %w%==704 (set sar=40:33)
if %ar%==16:9 if %h%==576 if %w%==704 (set sar=16:11)Last edited by _Al_; 26th Dec 2016 at 23:19.
-
-
I dont think so. I might be wrong though, but chipsets in common video players do not play 4:2:2 videos
software like ripbot for example where you can modify x264 command line -
or you can try this dmfs to mP4-DVD.zip , you need to install Avisynth
is your HUFFYUV RGB?
Then create huffyuv.INI in notepad:
Code:path_destination :C:\Destination path_temp :C:\Temp x264_variables :--crf 14 --bff --sar 8:9 --tune grain --keyint 60 --output-csp i422 --vbv-bufsize 17000 --vbv-maxrate 17000 nero_variables :-lc -cbr 256000 write avisynth script between lines, no loading clip line in there! -------------------------------------------------------------- ConvertToYUY2(matrix="rec.601") --------------------------------------------------------------
you modify command line as you want, no input output there or avisynth scriptLast edited by _Al_; 26th Dec 2016 at 23:41.
-
Oh I see, Scripting which I'm little unfamiliar with but I'm a fast learner if I get the time, So is this all new? Because back then when editing using scripts there was no MPEG4.
-
It makes no difference, avisynt script outputs always uncompressed video, it is encoder, in this case x264 that encodes that output, and that text file above is just INI file , it is made up thing just for that sort of batch script, that INI file is just a file where locations for files are stored, command lines for video and audio and avisynth script. That batch (having BAT extension , if you cannot see extensions in your PC enable it in windows) uses x264 encoder to encode video and Nero AAC encoder to encode audio and MP4muxer to get MP4 container for those streams. For that batch , you do not need any knowledge, you just drop those two files (that INI and your avi) onto that BAT and it should (in theory) work creating MP4 . I would try it, but I do not have huffuyv codec in PC right now. It works with DV avi videos, that I tried.
you can try that ripbot first, but you'd need avisynth installed and some other stuff as well, but there is more x264 front-end software's around, not sure if you can fully modify command line there, megui for sure, but it is a bit complicated, or you can try ffmpeg command line as well, but I do not use ffmeg, not sure what command line would that be at the moment.Last edited by _Al_; 27th Dec 2016 at 00:00.
-
I might've installed Avisynt at one point of time, never had time or motivation to play with it, I remember sending a sample to one of the DigitalFAQ forum members to show me an example of de-interlaced and color correction filters applied to the sample and the edited file came out fantastic. Anyway to answer your question about RGB or not here is some spec of one of the files:
Video
ID : 0
Format : HuffYUV
Format version : Version 2
Codec ID : HFYU
Duration : 3 min 56 s
Bit rate : 56.3 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 5:4
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Bits/(Pixel*Frame) : 5.426
Stream size : 1.55 GiB (97%) -
it is YUV huffyuv so hopefully AviSource loads 4:2:2 huffyuv avi ok without needing to some extra parameters because that batch creates loading line automatically , you cannot write it in that INI, so your INI would be, now I noticed it is PAL, not NTSC, assuming also 4:3 so SAR is 16:15 :
Code:path_destination :C:\Destination path_temp :C:\Temp x264_variables :--crf 14 --bff --sar 16:15 --tune grain --keyint 60 --output-csp i422 --vbv-bufsize 17000 --vbv-maxrate 17000 nero_variables :-lc -cbr 256000
You cannot specify aspect ratio in VirtualDub, AVi files cannot specify aspect ratio, except DV video. DV video has 4:3 or 16:9 flag. But that is not important for that your Huffyuv avi anyway, you know what aspect ratio is and you set it up while encoding into H.264 with x264 encoder (or that batch script in this case), you specify it with that SAR parameter as you can see above, for different system PAL or NTS or 4:3 or 16:9, you'd pick up appropriate SAR value for that command line. Encoder of course does not change resolution, instead H.264 stream is flagged as anamorphic and video is shown proportionally correct during playback. Players should follow that flag.
You insist to keep video interlaced and to not resize (anyway you should not ever resize if keeping video interlaced anyway) so that is how its done. It is flagged in H.264 stream.
or upload a tiny bit of your Huffuv file and I try it or just do some quick fix if needed so you can just use it right away, then you can do quick test with your player if it is going to play that MP4Last edited by _Al_; 27th Dec 2016 at 00:46.
-
It works, it is top field first, your INI could be this:
Code:path_destination :C:\Destination path_temp :C:\Temp x264_variables :--crf 14 --tff --sar 16:15 --tune grain --keyint 60 --output-csp i422 --vbv-bufsize 17000 --vbv-maxrate 17000 nero_variables :-lc -cbr 256000
then you grab your huffyuv avi and this INI file, drop them together on that _avi to MP4.BAT , you get MP4 , 4:2:2 would be kept and interlacing as well -
you could upsample to 4.4.4 first, see https://forum.doom9.org/showthread.php?t=173005&highlight=ChromaReconstructor] Here then compress it in prorez 4.4.4 or something similar
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
ok, my scripts use avs4x26x.exe and it all changes to 4:2:0 anyway so scratch that, it is 4:2:2 but it was converted to 4:2:0 before, I think, I might be wrong, but x264 reports it uses conversion from 4:2:0 to 4:2:2,
but anyway, I was going in different direction, I just waited if you are going to try it before. Like JVRaines and perhaps many more think. Just use the best deinterlacer there is QTGMC and perhaps do not resize, you get 50p, you would play it everywhere and it would be unrecognizable from original, perhaps even enhanced somehow by QTGMC, you just compare it yourself. Mind you you cannot get deinterlace quality on screen the same way like QTGMC deinterlaces, so even if you manage to get true 4:2:2 and archive it, then during playback deinterlace would not be top notch. You just might have experience with bad deinterlace before or you might read old threads about simple deinterlace, not double frame rate deinterlace that keeps temporal resolution. -
You guys are right, I may just have to de-interlace the video rather than relying on the media player chip or TV, But this is overwhelming for me, I will have to learn the scripts first after doing some reading before I open up a separate thread on how to use QTGMC.
-
whatever you do, use the lossless mode of qtgmc..
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
-
that posted MP4 , just noticed, sorry I forgot to take away that --output-csp i422 from command line, so it is 4:2:2 but it was converted to 4:2:0 before in Avisynth but x264 changed it to 4:2:2 again, so it is messed up a bit anyway
QTGMC has lots of settings, it is like a software on its own and it uses lots of modules that that had different purposes before, it is a fine example what people do and can build upon, check this website:
http://avisynth.nl/index.php/QTGMC#Sharpness
scroll it up or down, it has lots of settings, I could see some source-match/lossless settings etc. but I just used this simple setting:
QTGMC(Preset="slow")
there is downlod button on the left, download it, unzip it, follow instructions, you can put most of the DLL's into Avisynth plugin folder, some files go into system folder, check it out over there, then you just can use my scripts adding one line into Avisynth and that's it, ..., just be prepared, it takes a time and it might use only 40-50% CPU. In that case you could just encode two videos at the same time, starting one encoding, and then the other, running two instances at the same time and CPU will be closer to 100%.
Code:You could use this INI: path_destination :C:\Destination path_temp :C:\Temp x264_variables :--crf 14 --tff --sar 16:15 --tune grain --keyint 60 --vbv-bufsize 17000 --vbv-maxrate 17000 nero_variables :-lc -cbr 256000 -------------------------------------- Load_Stdcall_plugin("C:\..........your path here .........\plugins\yadif.dll") #this plugin needs to be loaded manually, it is not enough that it is in Avisynth plugin folder assumetff() QTGMC(Preset="slow") #or whatever settings you come up with converttoYV12() #this converts video from 4:2:2 to 4:2:0, if QTGMC gives a trouble with 4:2:2, if some DLL's would not take it, you can put this line above QTGMC ---------------------------------------
Last edited by _Al_; 27th Dec 2016 at 18:10.
-
I did process a video with the code you gave me and it came out 4:2:2, There is a little loss I guess due to format conversion, It looks like the video slightly darker and blurrier just tiny bit, Anyway is there a way to keep the PCM audio? Thanks a lot for the help.
Code:Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/avc1) File size : 443 MiB Duration : 3 min 56 s Overall bit rate mode : Variable Overall bit rate : 15.7 Mb/s Encoded date : UTC 2016-12-27 23:57:58 Tagged date : UTC 2016-12-27 23:57:58 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High 4:2:2@L3 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Format settings, GOP : M=4, N=60 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 3 min 56 s Bit rate : 15.4 Mb/s Maximum bit rate : 19.2 Mb/s Width : 720 pixels Height : 576 pixels Display aspect ratio : 4:3 Frame rate mode : Constant Frame rate : 25.000 FPS Standard : PAL Color space : YUV Chroma subsampling : 4:2:2 Bit depth : 8 bits Scan type : MBAFF Scan type, store method : Interleaved fields Scan order : Top Field First Bits/(Pixel*Frame) : 1.487 Stream size : 435 MiB (98%) Title : 64:fps=25.000@GPAC0.6.2-DEV-rev29-gd869dc5-master Writing library : x264 core 148 r2705 3f5ed56 Encoding settings : cabac=1 / ref=3 / deblock=1:-2:-2 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.25 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=6,6 / fast_pskip=1 / chroma_qp_offset=-4 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=tff / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=0 / keyint=60 / keyint_min=6 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=14.0 / qcomp=0.80 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=17000 / vbv_bufsize=17000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.10 / aq=1:0.50 Encoded date : UTC 2016-12-27 23:57:58 Tagged date : UTC 2016-12-27 23:58:03 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 3 min 56 s Bit rate mode : Variable Bit rate : 256 kb/s Maximum bit rate : 265 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 spf) Compression mode : Lossy Stream size : 7.23 MiB (2%) Encoded date : UTC 2016-12-27 23:44:24 Tagged date : UTC 2016-12-27 23:58:03
-
yes, sorry I explained above
To keep PCM is not possible with that script, you just might load both videos avi and MP4 into MKVmerge and uncheck tracks you do not want to get MKV with H.264 and PCM. Do not forget set aspect ratio to 4:3 or perhaps even frame rate to 50p there. But this way, you might confuse some media players as well, not sure how many of them can play MKV container with PCM audio in it, example here:
I just gave it a shot and encoded
QTGMC(Preset="slow", SourceMatch=3, Sharpness=0.2, TR2=2 )
but of course I just did a quick test, I do not know much what I was doing exactly to improve sharpness or to keep it, sharpness could be a bit higher etc.Last edited by _Al_; 27th Dec 2016 at 18:31.
-
Similar Threads
-
Can a video Blu-Ray be created with lots of DVD-format video files?
By Calidore in forum Newbie / General discussionsReplies: 15Last Post: 17th Nov 2016, 08:40 -
caps with the Hauppauge PVR 2 on Youtube are very choppy
By Jonz in forum Capturing and VCRReplies: 0Last Post: 1st Aug 2013, 20:05 -
Image Grabber II/Net Alternative to take multiple caps
By Lord Kram in forum Newbie / General discussionsReplies: 3Last Post: 15th Jan 2013, 05:09 -
Test Caps - various composite and s-video cables
By BrainStorm69 in forum Capturing and VCRReplies: 36Last Post: 12th Apr 2012, 13:51 -
Vid Caps
By moonshadow in forum Video Streaming DownloadingReplies: 5Last Post: 22nd Feb 2012, 09:31