Go Back    Forum > Digital Video > Video Project Help > Encode, Convert for discs

Reply
 
LinkBack Thread Tools
  #1  
04-01-2020, 03:35 AM
Nik92 Nik92 is offline
Free Member
 
Join Date: Apr 2020
Posts: 7
Thanked 0 Times in 0 Posts
Hi All,

I'm capturing VHS via VirtualDub as uncompressed UYVY.
I want to encode it with FFV1 as final result for storage.
Here’s the part I don’t fully understand.
Captured file, UYVY, doesn’t have any flags whether it’s interlaced or progressive.
In fact, according to this page, UYVY is always progressive:
https://www.loc.gov/preservation/dig...dd000365.shtml
FFV1 encodes it as progressive as well and now if I check media info, it’s progressive.
In any case, for both UYVY and FFV1 the content is kept as interlaced:
Code:
ffmpeg -filter:v idet -frames:v 100 -an -f rawvideo -y NUL -i D:\VD\VHS_full_FFV1_pass1.mkv
Code:
[Parsed_idet_0 @ 000001bbf074e480] Repeated Fields: Neither:   101 Top:     0 Bottom:     0
[Parsed_idet_0 @ 000001bbf074e480] Single frame detection: TFF:   101 BFF:     0 Progressive:     0 Undetermined:     0
[Parsed_idet_0 @ 000001bbf074e480] Multi frame detection: TFF:   101 BFF:     0 Progressive:     0 Undetermined:     0
My question is, do I lose any quality by encoding interlaced content as progressive?
Will there be any problem to deinterlace such encoded video in the future?

Thanks in advance!
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
04-01-2020, 10:28 AM
hodgey hodgey is offline
Free Member
 
Join Date: Dec 2017
Location: Norway
Posts: 1,683
Thanked 449 Times in 385 Posts
It won't have any quality loss provided there is no chroma subsampling in the vertical direction (i.e 4:2:0), since fields are weaved together on alternating lines. Lossy compression will also cause issues if you encode interlaced as progressive.

FFV1 doesn't have any interlacing flag, but since it's lossless it's fine as long as it's kept as 4:2:2 (which it should be unless you intentionally change it.)

You do however have to take into account that any application opening the file will not know that it is interlaced footage, and what field order it is. It would be great if the lossless codecs usable for capture had full support for flagging interlaced/progressive and field order, but I don't know any that do. Huffyuv and utvideo can mark a video as interlaced, but has no field order flag (and for whatever reason ffmpeg and other apps like to assume bottom field first). lossless H.264 (and possibly H.265) does support both interlaced encoding and a field order flag, but it's extremely slow to encode and decode, so it's not all that practical for capture and editing.
Reply With Quote
The following users thank hodgey for this useful post: lordsmurf (04-20-2020), msgohan (04-04-2020), Nik92 (04-01-2020)
  #3  
04-01-2020, 03:15 PM
Nik92 Nik92 is offline
Free Member
 
Join Date: Apr 2020
Posts: 7
Thanked 0 Times in 0 Posts
Thanks a lot hodgey.
Since the goal of encoding it with FFV1 for me was to store and use as source file later, I don't care that much if it will be incoreclty recognised by apps (that's probably video players in general).

Anyway, I tried to capture with huffyuy and encode it with FFV1 and I was able to make FFV1 video interlaced with some tricky solution I found:
Code:
ffmpeg -i D:/VD/VHS_HUFF.avi -top 1 -f yuv4mpegpipe - | ffmpeg -i - -i D:/VD/VHS_HUFF.avi -map 0:0 -map 1:1 -c:v ffv1 -threads 12 -g 1 -slices 4 -slicecrc 1 D:/VD/VHS_HUFF_FFV1_pipe_simple.mkv
Code:
Video
ID                          : 1
Format                      : FFV1
Format version              : Version 3.4
Format settings, GOP        : N=1
Codec ID                    : V_MS/VFW/FOURCC / FFV1
Duration                    : 1 min 32 s
Bit rate mode               : Variable
Bit rate                    : 82.2 Mb/s
Width                       : 720 pixels
Height                      : 576 pixels
Display aspect ratio        : 5:4
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                   : Interlaced
Scan type, store method     : Interleaved fields
Scan order                  : Top Field First
Compression mode            : Lossless
Bits/(Pixel*Frame)          : 7.931
Stream size                 : 909 MiB (98%)
Writing library             : Lavc58.75.100 ffv1
Default                     : Yes
Forced                      : No
coder_type                  : Golomb Rice
MaxSlicesCount              : 4
ErrorDetectionType          : Per slice
Now it looks like I have a better option although I might even stick to UYVY as I wanted to edit a bit source file in Adobe Premiere before encoding it with FFV1.
And unfortunately Adobe Premiere can't export into Huffyuv (only found UYVY).

Thanks
Reply With Quote
  #4  
04-04-2020, 06:49 AM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 1,323
Thanked 334 Times in 276 Posts
Quote:
Originally Posted by hodgey View Post
It would be great if the lossless codecs usable for capture had full support for flagging interlaced/progressive and field order, but I don't know any that do.
For what it's worth, I noticed that my Canopus NHX-E2 captures produced by their Edius software have the full complement: interlaced flag, TFF field order, and aspect ratio*. Compression ratio is excellent, and it's fast enough for capture on an old machine.

But if I try using VirtualDub to compress with this Canopus/Grass Valley Lossless Codec, the Configure button is greyed out. The resulting file plays 4:3 in MPC-HC but not VLC, and no deinterlacing is done by either player.

* It's 720x486 with DAR 4:3 -- slightly incorrect, but close enough for casual viewing. Should be 1.347:1 not 1.333:1 if my math is right.
Reply With Quote
The following users thank msgohan for this useful post: lordsmurf (04-20-2020)
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Let Youtube encode interlaced VHS capture? Mejnour Project Planning, Workflows 8 02-06-2019 02:37 AM
PAL progressive source in interlaced DVD camjac251 Restore, Filter, Improve Quality 1 01-03-2019 04:35 PM
Output both progressive and interlaced? koberulz Restore, Filter, Improve Quality 51 08-01-2017 05:57 PM
Cine film conversion, interlaced vs. progressive? Sparx Capture, Record, Transfer 3 08-28-2016 04:28 PM
Interlaced video to progressive (double frame rate) metaleonid Edit Video, Audio 23 09-29-2013 09:51 PM

Thread Tools



 
All times are GMT -5. The time now is 03:08 AM