+ Reply to Thread
Results 1 to 8 of 8

Thread: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

  1. #1
    Member
    Join Date
    Jan 2012
    Location
    Budapest
    Posts
    720

    Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    Hello Guys!

    Do you think that FFV1 "lossless" video codec is a real lossless video codec? I have serious doubts.

    At first I used Xmedia recode (and later other 3 transcoders) to transform AVCHD MTS (progressive segmneted frame) camcorder files into FFV1 MKV format. I tried 4:2:0 planar 12bpp and all avaiable other higher FFv1 options. They had the same results ((

    The png photos were taken by Potplayer from the video-frame: 810 th.
    The original camcorder file (179 M.byte only) is located here: http://dictaphone.atw.hu/00097.MTS

    Photos:
    Seach the difference in the red square! (please, download and enlarge them in a photo viewer application)

    Original MTS file: (frame: 810)
    http://dictaphone.atw.hu/mts.png

    The FFV1 file: (frame 810)
    http://dictaphone.atw.hu/ffv1.png


    I red an article, which proposed the unecessary color palette conversion as the cause of quality losses. But it is not beliveable: http://forum.doom9.org/archive/index.php/t-72709.html

    Have you got any idea or suggestion about this "lossless" quality problem? The huffyuv didn't produced that quality problem.

    Thank you for your reply!
    Quote Quote  

  2. #2
    Member
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    28,706

    Re: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    yes FFV1 itself is 100% definitely lossless in the same colorspace/model, but you might have some other problems - eg. maybe problem with xmediarecode (it's implementation of FFV1, or preprocessing of the video) , or problem with method of capturing screenshots with potplayer

    Your screenshots show too much loss of detail in the shadows. You probably inadvertently used wrong lossy codec or one of the other problems above
    Quote Quote  

  3. #3
    Member
    Join Date
    Dec 2005
    Posts
    59,181

    Re: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    I agree. This is a codec (decoding the original video), handling, or filter issue, not an FFV1 issue.

    I opened your MTS PNG file in VirtualDub and saved as FFV1 YV12 with

    Code:
     ImageSource("1.png", start=0, end=10).ConvertToYV12()
    Then I opened that image again and the FFV1 YV12 AVI file with:

    Code:
    v1=ImageSource("1.png", start=0, end=10).ConvertToYV12()
    v2=AviSource("1.avi")
    sub = v1.subtract(v2) 
    substrong = sub.levels(112,1,144,0,255) 
    StackVertical(StackHorizontal(v1.subtitle("png"),v2.subtitle("ffv1")),StackHorizontal(sub.subtitle("Difference"),substrong.subtitle("Difference amplified 8x")))
    This script subtracts one video from the other and shows the differences and the differences amplified by 8x. You can see that there are no differences, even with 8x amplification:

    Click image for larger version

Name:	big.png
Views:	727
Size:	5.78 MB
ID:	14946

    Those flat gray expanses at the bottom left and right indicate the two videos are identical.

    Then I compared your two PNG files using the same technique.

    Code:
    v1=ImageSource("1.png", start=0, end=10).ConvertToYV12()
    v2=ImageSource("2.png", start=0, end=10).ConvertToYV12()
    sub = v1.subtract(v2) 
    substrong = sub.levels(112,1,144,0,255) 
    StackVertical(StackHorizontal(v1.subtitle("png"),v2.subtitle("ffv1")),StackHorizontal(sub.subtitle("Difference"),substrong.subtitle("Difference amplified 8x")))
    Here are the differences amplified by 8x (just the lower right quadrant):

    Click image for larger version

Name:	two.png
Views:	683
Size:	4.54 MB
ID:	14948
    Last edited by jagabo; 2nd Dec 2012 at 13:26.
    Quote Quote  

  4. #4
    Member
    Join Date
    Jan 2012
    Location
    Budapest
    Posts
    720

    Re: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    Ok, but what is the same colospace? (I know 4:2:0) AVCHD is YV12, but what is the perfect 4:2:0 PLANAR in FFV1 conversion? 12bit/sec? (12bpp) AVCHD is also a 12bpp video, isn't it?
    Quote Quote  

  5. #5
    Member
    Join Date
    Dec 2005
    Posts
    59,181

    Re: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    YV12 is 4:2:0 planar, 12 bit/pixel. AVC is usually 4:2:0 12 bit/pixel but can be other formats. Also keep in mind that the format used internally is not necessarily the same thing the decoder provides to the program requesting frames.
    Last edited by jagabo; 2nd Dec 2012 at 10:14.
    Quote Quote  

  6. #6
    Member
    Join Date
    Jan 2012
    Location
    Budapest
    Posts
    720

    Re: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    Quote Originally Posted by jagabo View Post
    YV12 is 4:2:0 planar, 12 bit/pixel. AVC is usually 4:2:0 12 bit/pixel but can be other formats. Also keep in mind that the format used internally is not necessarily the same thing the decoder provides to the program requesting frames.

    Do you think that most transcoders are wrong? Forexample the Xmedia recode?
    Quote Quote  

  7. #7
    Member
    Join Date
    Dec 2005
    Posts
    59,181

    Re: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    I don't know what Xmedia Recode is doing. But the sample image you posted indicates something is screwing up your FFV1 encodings. And what you're seeing is far worse than a colorspace conversion.
    Last edited by jagabo; 3rd Dec 2012 at 06:34.
    Quote Quote  

  8. #8
    Member
    Join Date
    Dec 2005
    Posts
    59,181

    Re: Is the "lossless" FFV1 codec a fake? (IMPORTANT)

    I used VirtualDub to convert your MTS file to AVI with FFV1, then remuxed the FFV1 video into an MKV with mmg. Here's a portion from the area of your screen caps. On my computer it looks like your original mts.png image, not the ffv1.png.
    Attached Files
    Last edited by jagabo; 3rd Dec 2012 at 07:18. Reason: file attachement failed
    Quote Quote  

+ Reply to Thread

Similar Threads

  1. WebEx WMV file, can't open in VirtualDub, says "missing codec"
    By violetta in forum Newbie / General discussions
    Replies: 13
    Last Post: 22nd Jul 2016, 21:39
  2. Replies: 4
    Last Post: 9th Jun 2010, 04:08
  3. Which audio codec I need to enable for playing "cook/ffcook" audi
    By tigerb in forum Newbie / General discussions
    Replies: 2
    Last Post: 18th Sep 2009, 23:10
  4. Replies: 24
    Last Post: 20th Oct 2008, 23:49
  5. is there an free "anyfile to uncompressed/lossless" solution?
    By squadjot in forum Newbie / General discussions
    Replies: 4
    Last Post: 19th Sep 2008, 13:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts