VideoHelp Forum
+ Reply to Thread
Results 1 to 24 of 24
Thread
  1. Member Abas-Avara's Avatar
    Join Date
    Aug 2009
    Location
    Azerbaijan
    Search Comp PM
    I have edited variable framerate videos in Sony Vegas. Now I want to export these to a lossless format.

    Considering I can only export to 25fps or 30 fps, would it even make sense to render to "lossless" YUV in Sony Vegas? Isnt there by default a quality loss because the frames are converted from variable to 25?
    Last edited by Abas-Avara; 19th Jan 2020 at 10:46.
    The flag once raised will never fall!
    Quote Quote  
  2. Are you sure that the source videos are have a variable framerate ? What do you intend to do with the edited / rendered footage ? If you want to further process it with another utility, or compress it with an external encoder, then it certainly makes sense as it removes one generation loss to the whole workflow. Anyway, from what I could understand, most editors automatically convert the imported footage to RGB straight away, and unless the editor has a “smart render” feature and the editing work only involved straight cuts, the rendering can never be lossless relative to the source videos.
    Quote Quote  
  3. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    vfr was and is a dopey way to save a minuscule amount of file size. vfr would never be used for any serious video work. that said "lossless" encoding is only visually lossless. you can't go back the other way and get back the original file. but anything is better than vfr. if you are going to edit it more than once, sony yuv is a good option. if you are only going to edit the vfr once and export the final video format than it's an unneeded step.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    If you are already "editing" your footage or have edited, in anything other than a simple, on-phone app, you will have ALREADY converted your vfr footage to cfr, whether you realize it or not. And it is NOT a lossless conversion process, though you could still store the result as best as possible by using a lossless storage format.

    Scott
    Last edited by Cornucopia; 20th Jan 2020 at 21:18.
    Quote Quote  
  5. Originally Posted by Abas-Avara View Post
    Isnt there by default a quality loss because the frames are converted from variable to 25?
    Not sure what happens in Sony Vegas but... for general reference:

    Originally Posted by gdgsdg123 View Post
    Originally Posted by ?|IWuc? View Post
    What happens to videos that originally have a variable frame rate but where encoded with a constant frame rate?
    Frames are (usually *) simply duplicated or dropped to achieve the target frame rate.

    * Unless more complex processing (e.g. frame interpolation) involved.


    Also check:
    http://trac.ffmpeg.org/ticket/8063
    https://forum.videohelp.com/threads/395571#post2569794




    Originally Posted by abolibibelot View Post
    Anyway, from what I could understand, most editors automatically convert the imported footage to RGB straight away...
    Could you please name a few? So I can avoid them when I someday somehow had the interest to try some... (never tried any serious one before, no joking)







    Originally Posted by aedipuss View Post
    vfr was and is a dopey way to save a minuscule amount of file size.
    While reducing redundancy does help efficiency... (not only in the file size)


    The reason for VFR is to optimize the handling of the "consecutive duplicates", which is actually a smart move.

    The real problem is... the world seemed to have got accustomed to CFR.



    Originally Posted by aedipuss View Post
    vfr would never be used for any serious video work.
    Who knows?..



    Originally Posted by aedipuss View Post
    that said "lossless" encoding is only visually lossless. you can't go back the other way and get back the original file.
    So... you mean lossless encoding in Sony Vegas is a completely joke?

    * The term is very confusing... Follow-Up



    Originally Posted by aedipuss View Post
    but anything is better than vfr.
    Originally Posted by gdgsdg123 View Post
    Note: the reason to use CFR over VFR is mainly for legacy support, while the CFR schema itself is suboptimal.
    Originally Posted by gdgsdg123 View Post
    Originally Posted by babygdav View Post
    ...ensure compatibility across a wide range of devices.
    Note: compatibility and performance are usually mutually exclusive.
    Anyway, avoiding things you are unfamiliar with is a wise move.

    Though sometimes you'll have no choice... but to face them.


    Related: http://trac.ffmpeg.org/ticket/8482







    Originally Posted by Cornucopia View Post
    If you are already "editing" your footage or have edited, in anything other than a simple, on-phone app, you will have ALREADY converted your vfr footage to cfr...
    Not strictly true...
    Last edited by gdgsdg123; 22nd Jan 2020 at 01:06.
    Quote Quote  
  6. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    lossless avi of any type - huffyuv, utcodec, lagarith, etc., are all a one way street. once you encode to them you can't re-encode back to what any file format was and get the exact same file back.

    that said if you are editing in vegas there is no better option than converting all sources file to sony yuv and using it on the timeline.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  7. Originally Posted by Abas-Avara View Post
    I have edited variable framerate videos in Sony Vegas. Now I want to export these to a lossless format.

    Considering I can only export to 25fps or 30 fps, would it even make sense to render to "lossless" YUV in Sony Vegas? Isnt there by default a quality loss because the frames are converted from variable to 25?
    What lossless format are you using?
    An image sequence for the render FORMAT?

    Anyways, in Vegas 17, I'm only seeing avc, hvec, magix intermediate, mpeg-1/2, p2, avc/mvc, mxf, etc.

    All of these appear to me to be compressed formats.

    ...

    If you pick one, like Magix Intermediate, click CUSTOMIZE TEMPLATE, you can pick a few more standard frame rates, but nothing variable or custom.

    ...

    Anyways, there's always a loss when converting from/to lossy formats, eg mpeg 2 to mpeg 4. But if you're going from lossy to lossless, no loss in information.

    If you're going from one frame rate to another, as long as the maximum frame rate of the original is the same as the constant frame rate of the output, you shouldn't be losing any frames either.
    Eg. If the vfr for one section is a max of 25fps and you output 25fps cfr, no frames lost. 1 fps in vfr simply gets duplicated to 25 frames for that second.

    As for color depth and bits, if your source is 4:2:2 10-bit, you'd obviously have to output to at least 4:2:2 10-bit lossless or better. If you encode to lossless 4:2:0 8-bit, you'll lose quality.
    Quote Quote  
  8. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    Originally Posted by babygdav View Post
    Originally Posted by Abas-Avara View Post
    I have edited variable framerate videos in Sony Vegas. Now I want to export these to a lossless format.

    Considering I can only export to 25fps or 30 fps, would it even make sense to render to "lossless" YUV in Sony Vegas? Isnt there by default a quality loss because the frames are converted from variable to 25?
    What lossless format are you using?
    An image sequence for the render FORMAT?

    Anyways, in Vegas 17, I'm only seeing avc, hvec, magix intermediate, mpeg-1/2, p2, avc/mvc, mxf, etc.

    All of these appear to me to be compressed formats.

    ...

    If you pick one, like Magix Intermediate, click CUSTOMIZE TEMPLATE, you can pick a few more standard frame rates, but nothing variable or custom.

    ...

    Anyways, there's always a loss when converting from/to lossy formats, eg mpeg 2 to mpeg 4. But if you're going from lossy to lossless, no loss in information.

    If you're going from one frame rate to another, as long as the maximum frame rate of the original is the same as the constant frame rate of the output, you shouldn't be losing any frames either.
    Eg. If the vfr for one section is a max of 25fps and you output 25fps cfr, no frames lost. 1 fps in vfr simply gets duplicated to 25 frames for that second.

    As for color depth and bits, if your source is 4:2:2 10-bit, you'd obviously have to output to at least 4:2:2 10-bit lossless or better. If you encode to lossless 4:2:0 8-bit, you'll lose quality.


    so you're a newb vegas user. render as/video for windows. choose an output then configure to what you want.


    Image
    [Attachment 51614 - Click to enlarge]
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  9. Originally Posted by aedipuss View Post
    so you're a newb vegas user. render as/video for windows. choose an output then configure to what you want.
    Image
    [Attachment 51614 - Click to enlarge]
    Thanks!
    Completely forgot about AVI and MOV after Quicktime for Windows was terminated years ago and PCs were fast enough to edit MP4 etc natively without proxies.

    Guess yuv and uncompressed avi are among the few accessible lossless codecs now that quicktime is gone (thus no support for other codecs it used to support).
    Quote Quote  
  10. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    lol quicktime was killed off by apple for all windows computers what 10 years ago? vegas will support most lossless codecs you install. they will show up in video for windows. but if you're editing in vegas, sony yuv is good...
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  11. Guess yuv and uncompressed avi are among the few accessible lossless codecs now that quicktime is gone (thus no support for other codecs it used to support).
    it is not a problem at all, after installation of some lossless to system, the are available in that Video For Windows selections.

    Also for op, YUV Sony that was uncompressed I think, not lossless as the term "lossless" might be understood like "compressed without loss".

    Also that Prorez export 422 (under Magix intermediate) , so called almost lossless is not bad also , to use to keep size of video in sane numbers.
    Quote Quote  
  12. Originally Posted by aedipuss View Post
    lossless avi of any type - huffyuv, utcodec, lagarith, etc., are all a one way street. once you encode to them you can't re-encode back to what any file format was and get the exact same file back.

    that said if you are editing in vegas there is no better option than converting all sources file to sony yuv and using it on the timeline.
    I suppose you mean editing with Sony Vegas only... (as the mentioned codecs can be handled with FFmpeg, and likely without loss if done properly)

    Also what about the lossless x264 put in AVI container?
    Quote Quote  
  13. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    all the "lossless" codecs are only visually lossless. there's no way to re-encode a lossless avi back to exactly the same file it started as.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  14. Originally Posted by aedipuss View Post
    all the "lossless" codecs are only visually lossless. there's no way to re-encode a lossless avi back to exactly the same file it started as.
    You mean in general?.. (out of the realm of Sony Vegas)

    * Quality wise only or bit wise?
    Quote Quote  
  15. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    bit for bit wise. quality wise they are fine.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  16. @aedipuss
    lossless avi of any type - huffyuv, utcodec, lagarith, etc., are all a one way street. once you encode to them you can't re-encode back to what any file format was and get the exact same file back.
    None of them, is it certain ? For audio, I know for a fact that at least APE is lossless for both compression and decompression (the WAV file decompressed from an APE file by Monkey's Audio has the exact same size and checksums as the original WAV file) ; and as a bonus it can also preserve the timestamps (optional).
    It would certainly be a welcome feature for lossless video codecs, if only for testing purposes, as it's much easier to verify that two files are exactly identical (all checksums will match) than to test if they are “visually” identical.

    @gdgsdg123
    * Quality wise only or bit wise?
    Obviously “bit wise” was meant here, since lossless codecs are by their very definition expected to preserve 100% of the source quality, in a 100% reproducible manner. For instance I once compressed two AVI files, one in MagicYUV and the other in Lagarith converted from the MagicYUV one (both lossless codecs, the Lagarith file was smaller by about 10% — I had to convert from one lossless format to the other because of some SNAFU with the editor), with ffmpeg + libx264 at the same settings, and the resulting MP4 files were exactly identical (same size and same checksums). Which is funny as the lossy codec produces a more “reproducible” output than the lossless ones, “bit wise” (for instance if I had converted back the Lagarith file to MagicYUV, and the other way around, most likely I'd have obtained different files).
    Quote Quote  
  17. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    audio wav files are easy. they are like all i-frame video.

    unfortunately video uses i, p, b, and now slices(parts) of i, p and b frames. which means a video frame can reference a part of a past frame or future frame to create the new frame. once encoded to lossless avi there's no way to recreate bit for bit any source as it's now a changed source.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  18. The lossless codecs are literally lossless if you use them correctly. What comes out of the decoder is exactly the same uncompressed video (bit for bit) as the uncompressed video that went into the encoder.

    Of course, if you transcode a YV12 AVC video to, say Lagarith YV12, you will first be decompressing the AVC frames (resulting in maybe a 20 fold increase in file size), then compressing those uncompressed frames with Lagarith. Lagarith may get a 2:1 compression ratio but that still leaves you with a file that's 10x larger than the original AVC video. Later, when those Lagarith frames are decompressed, the output will be exactly the same uncompressed YV12 frames that were given to Lagarith. You'll be back to a file that's 20x larger than the original AVC video. If you recompress those frames with an AVC (or HEVC, or VC1, or whatever lossy) encoder you will not be able to restore the original AVC video's quality and size. Any time you compress video with a lossy codec you will get a loss of quality. The best you can do is use high enough a bitrate to keep the losses minimal.

    Typically you want to use lossless intermediates when your editor doesn't work with a particular source format. Or when you are going to use multiple programs sequentially -- you don't want to degrade your video with a lossy encoding by each of the intermediate programs. And of course, you want to capture with a lossless codec if you want to avoid creating compression artifacts before you start filtering or editing.
    Quote Quote  
  19. Originally Posted by aedipuss View Post
    bit for bit wise. quality wise they are fine.
    Originally Posted by abolibibelot View Post
    Obviously "bit wise" was meant here...
    ...I wonder why would you even care about this, as long as the input and output remain quality wise identical. (unless for testing purposes)



    Originally Posted by abolibibelot View Post
    It would certainly be a welcome feature for lossless video codecs, if only for testing purposes, as it's much easier to verify that two files are exactly identical (all checksums will match) than to test if they are "visually" identical.
    More likely something to do with the muxers * rather than the codecs...

    Container information (like metadata, which you can even write an article in...) presents, that does influence the file's content.

    * What responsible for fitting the encoded data into the container.


    Also FYI, SSIM usage reference: http://trac.ffmpeg.org/ticket/7825



    Originally Posted by abolibibelot View Post
    @aedipuss
    lossless avi of any type...
    None of them, is it certain?
    No. It's possible to make the output bit exact by using a deterministic encoder and instructing the muxer not to write random container information.



    Originally Posted by aedipuss View Post
    unfortunately video uses i, p, b, and now slices(parts) of i, p and b frames. which means a video frame can reference a part of a past frame or future frame to create the new frame.
    Jargon Explanation



    Originally Posted by aedipuss View Post
    once encoded to lossless avi there's no way to recreate bit for bit any source as it's now a changed source.
    Before encoding, the input has to be decoded first... Which means: if the inputs are quality wise identical (even bit wise different), they are effectively identical to the encoder.

    Which usually ends in identical output (from the encoder) unless the encoder is non-deterministic (which is not so common).
    Last edited by gdgsdg123; 22nd Jan 2020 at 00:22.
    Quote Quote  
  20. Member Abas-Avara's Avatar
    Join Date
    Aug 2009
    Location
    Azerbaijan
    Search Comp PM
    Thanks for the replies. The VFR is on average between 25 and 30 fps (concerns old videos recorded with Nokia N95). Whats the best fps to convert to? 25 fps (PAL), 29,97 fps or 30 fps (NTSC)? I will use the Sony YUV codec
    The flag once raised will never fall!
    Quote Quote  
  21. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    what's your intended final video going to be? pal or ntsc? pal is normally 25fps and ntsc 30fps. i'd say go with what you want to end up with.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  22. Member Abas-Avara's Avatar
    Join Date
    Aug 2009
    Location
    Azerbaijan
    Search Comp PM
    Its PAL since I live in Europe. However I wanted to choose the fps that does the best job / preserves as much of the original as possible. I guess I will do PAL if there is no difference
    The flag once raised will never fall!
    Quote Quote  
  23. Originally Posted by Abas-Avara View Post
    Thanks for the replies. The VFR is on average between 25 and 30 fps (concerns old videos recorded with Nokia N95). Whats the best fps to convert to? 25 fps (PAL), 29,97 fps or 30 fps (NTSC)? I will use the Sony YUV codec
    30fps. Standard cell phone master frame rate.

    Maintain the original frame rate of the original all the way through editing in whatever video program you use, then output to whatever final frame rate you decide upon (most match the original).

    For tv playback, the selection of 25fps pal might be needed if your playback equipment can't handle 30fps pr 29.97ntsc. You should test first. Keeping the output of the final video at the same original frame rate maintains the best picture quality and details.
    Quote Quote  
  24. Originally Posted by Abas-Avara View Post
    The VFR is on average between 25 and 30 fps (concerns old videos recorded with Nokia N95).
    Do realize an important concept: timebase.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!