VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. Obsolete
    Last edited by Felow; 13th Nov 2020 at 00:40.
    Quote Quote  
  2. With lossy encoders you always lose quality when re-encoding. No matter how much bitrate you use. But if you use high enough a bitrate the losses may not be visible. Re-encoding a corrupt video isn't going to fix the corruption. You need to go back to the original uncorrupt source.
    Quote Quote  
  3. Obsolete
    Last edited by Felow; 13th Nov 2020 at 00:40.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Re-encoding a corrupt video isn't going to fix the corruption. You need to go back to the original uncorrupt source.
    That's a shame then it's going to take me a lot of work to cut the corrupt points and even then with Avidemux there'll almost always be some corruption at cut points in HEVC videos that's what I noticed... the most troublesome are those that last about 10 seconds.
    Quote Quote  
  5. Originally Posted by Felow View Post
    Assuming that my video is 1000 bitrate, what would you recommend so that the loss isn't visible?.
    Forget bitrates and use Rate Factor based encoding. Figure out what rate factor gives you the quality you want (relative to the source -- you can't increase the quality) and you'll get exactly the right bitrate for that quality. I don't use HEVC but with x264 (AVC) I usually use CRF=18 for SD, CRF=20 for HD. At those settings you don't really notice much of a drop in quality at normal playback speed, but you will see differences if you look at enlarged still frames. I may use lower values (higher quality, bigger file) for something where I need higher quality, or higher values (lower quality, smaller file) for things I don't care about.
    Quote Quote  
  6. 1. If the corruption you speak of is something that you fixed by simply cutting out sections of the video, then it doesn't need to be re-encoded at all. Simply use a tool that will combine the cut pieces together without re-encoding. You will have zero loss, except for a few frames around the edit point. The tool you use will depend on what codec the video uses (see below). ffmpeg can combine many types of videos without re-encoding. So can several commercial programs, like VideoRedo.

    2. The quality you get with various bitrates depends on the total number of pixels in the video; the amount of movement in the video; the type of codec used; the quality of that codec; and many other factors. You'll get one bitrate answer for a 640x480 video of a static shot on a tripod with virtually no movement (a newsreader talking head, for instance) encoded with h.264, and a completely different answer for a 4K video of a NASCAR race with the camera panning and cars moving at 200 mph encoded with some other codec.
    Quote Quote  
  7. Originally Posted by johnmeyer View Post
    1. If the corruption you speak of is something that you fixed by simply cutting out sections of the video, then it doesn't need to be re-encoded at all. Simply use a tool that will combine the cut pieces together without re-encoding. You will have zero loss, except for a few frames around the edit point. The tool you use will depend on what codec the video uses (see below). ffmpeg can combine many types of videos without re-encoding. So can several commercial programs, like VideoRedo.

    2. The quality you get with various bitrates depends on the total number of pixels in the video; the amount of movement in the video; the type of codec used; the quality of that codec; and many other factors. You'll get one bitrate answer for a 640x480 video of a static shot on a tripod with virtually no movement (a newsreader talking head, for instance) encoded with h.264, and a completely different answer for a 4K video of a NASCAR race with the camera panning and cars moving at 200 mph encoded with some other codec.
    After doing some research the corruption (artifacts at cutpoints) I'm talking about won't go away completely but it can be minimized to a second or two. If I understood correctly this happens only with when cutting HEVC videos, thus the solution is to cut and merge before encoding to HEVC.
    Quote Quote  
  8. Originally Posted by jagabo View Post
    Originally Posted by Felow View Post
    Assuming that my video is 1000 bitrate, what would you recommend so that the loss isn't visible?.
    Forget bitrates and use Rate Factor based encoding. Figure out what rate factor gives you the quality you want (relative to the source -- you can't increase the quality) and you'll get exactly the right bitrate for that quality. I don't use HEVC but with x264 (AVC) I usually use CRF=18 for SD, CRF=20 for HD. At those settings you don't really notice much of a drop in quality at normal playback speed, but you will see differences if you look at enlarged still frames. I may use lower values (higher quality, bigger file) for something where I need higher quality, or higher values (lower quality, smaller file) for things I don't care about.

    I don't use bitrate, I always use CRF but in this case I wanted to minimize the quality loss as much as I could so I thought choosing a higher bitrate than would do just that.
    Quote Quote  
  9. The artifacts at cutpoints are usually hardly noticeable, especially since, with most encoding, they happen for only 1/2 second.
    Quote Quote  
  10. Originally Posted by johnmeyer View Post
    The artifacts at cutpoints are usually hardly noticeable, especially since, with most encoding, they happen for only 1/2 second.
    Even that isn't acceptable but I'm talking about the artifacts that last 10 seconds those are the worst.
    Quote Quote  
  11. Originally Posted by Felow View Post
    Originally Posted by johnmeyer View Post
    The artifacts at cutpoints are usually hardly noticeable, especially since, with most encoding, they happen for only 1/2 second.
    Even that isn't acceptable but I'm talking about the artifacts that last 10 seconds those are the worst.
    Much of what you're saying now makes no sense. You need to post something which shows what artifacts you are talking about.
    Last edited by johnmeyer; 22nd Feb 2020 at 10:07. Reason: typo
    Quote Quote  
  12. Originally Posted by johnmeyer View Post
    Originally Posted by Felow View Post
    Originally Posted by johnmeyer View Post
    The artifacts at cutpoints are usually hardly noticeable, especially since, with most encoding, they happen for only 1/2 second.
    Even that isn't acceptable but I'm talking about the artifacts that last 10 seconds those are the worst.
    Much of what you're saying now makes no sense. You need to post something which shows what artifacts you are talking about.

    https://imgur.com/a/DxdKdVe

    it's very random sometimes it lasts for about 10 seconds and sometimes 1 or 2 seconds... from what I learned cutting HEVC videos isn't a good idea.
    Quote Quote  
  13. Those artifacts are typical of what happens when you cut on non-keyframes without re-encoding. All inter-frame codecs have that problem. It's worse with h.264 and h.265 videos because they tend to use much longer GOPs, 10 seconds or so, compared to say, MPEG 2 with 1/2 second GOPs.
    Quote Quote  
  14. Originally Posted by jagabo View Post
    Those artifacts are typical of what happens when you cut on non-keyframes without re-encoding. All inter-frame codecs have that problem. It's worse with h.264 and h.265 videos because they tend to use much longer GOPs, 10 seconds or so, compared to say, MPEG 2 with 1/2 second GOPs.
    Those artifacts are bad. You could improve things a lot if you could increase the bitrate for just those re-encoded frames. If you re-encode the whole thing at the super-low bitrate you are using (which is the reason why you are having problems in the first place) the entire video would be degraded like that.

    Solutions?

    1. Tell your cutting tool to only cut on GOP boundaries and lose a few frames at each cut.

    2. If you want/need frame-accurate cuts, then significantly increase the bitrate for the few frames that are re-encoded.

    3. Live with the problem and get on to the next project.
    Quote Quote  
  15. https://tmpgenc.pegasys-inc.com/en/product/tvmw7.html
    Anyways, TMPGENC tools can cut on the frame level regardless of GOP boundaries.
    Quote Quote  
  16. Originally Posted by johnmeyer View Post
    Originally Posted by jagabo View Post
    Those artifacts are typical of what happens when you cut on non-keyframes without re-encoding. All inter-frame codecs have that problem. It's worse with h.264 and h.265 videos because they tend to use much longer GOPs, 10 seconds or so, compared to say, MPEG 2 with 1/2 second GOPs.
    Those artifacts are bad. You could improve things a lot if you could increase the bitrate for just those re-encoded frames. If you re-encode the whole thing at the super-low bitrate you are using (which is the reason why you are having problems in the first place) the entire video would be degraded like that.

    Solutions?

    1. Tell your cutting tool to only cut on GOP boundaries and lose a few frames at each cut.

    2. If you want/need frame-accurate cuts, then significantly increase the bitrate for the few frames that are re-encoded.

    3. Live with the problem and get on to the next project.
    The cutting software I use (Avidemux) is apparently not optimized to cut HEVC, its developer told me: "Did you use Avidemux to encode original videos to HEVC? Could you please provide a sample HEVC video (uncut)? If the videos were encoded as open GOP, clean cuts are possible only if early B-frames are all dropped. This is possible only if no other frames depend on them. The required check is implemented only for H.264, for HEVC we assume that they are not droppable.

    Any work on HEVC is pending a hardware upgrade which would allow me to play at least 720p in real-time."

    I learned my lesson next time I will cut videos and merge them before encoding to HEVC. Now the problem is that I have I encoded all my videos to HEVC (cutpoint arifacts happen at any bitrate in my experience) and I don't have a backup so I can only hope that in the future there would be a free software that can cleanly and accurately cut HEVC videos.
    Quote Quote  
  17. Originally Posted by babygdav View Post
    https://tmpgenc.pegasys-inc.com/en/product/tvmw7.html
    Anyways, TMPGENC tools can cut on the frame level regardless of GOP boundaries.
    That is not a free software unfortunately but I will download the trial version and see if it works.

    Edit: I tried it and it looks like it has to re-encode the video.
    Last edited by Felow; 22nd Feb 2020 at 16:59.
    Quote Quote  
  18. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Felow View Post
    Originally Posted by babygdav View Post
    https://tmpgenc.pegasys-inc.com/en/product/tvmw7.html
    Anyways, TMPGENC tools can cut on the frame level regardless of GOP boundaries.
    That is not a free software unfortunately but I will download the trial version and see if it works.

    Edit: I tried it and it looks like it has to re-encode the video.
    Perhaps this one:
    https://tmpgenc.pegasys-inc.com/en/product/tmsr5.html
    Quote Quote  
  19. https://www.solveigmm.com/en/products/video-splitter/
    https://www.videoredo.com/en/Products_TVSuite_V6.html
    https://www.moo0.com/software/VideoCutter/
    More trials of editors that can smart encode are trimming.

    ...

    Anyways, if those don't do it, you might try avid media composer free, blackmagic davinci, hitfilm express free video editors, cut out the mess and reexport into a hvec with about 1.1-1.5x the original bitrate.... Maybe that'll resolve the issue and retain an acceptable visual quality?
    Quote Quote  
  20. Originally Posted by babygdav View Post
    https://www.solveigmm.com/en/products/video-splitter/
    https://www.videoredo.com/en/Products_TVSuite_V6.html
    https://www.moo0.com/software/VideoCutter/
    More trials of editors that can smart encode are trimming.

    ...

    Anyways, if those don't do it, you might try avid media composer free, blackmagic davinci, hitfilm express free video editors, cut out the mess and reexport into a hvec with about 1.1-1.5x the original bitrate.... Maybe that'll resolve the issue and retain an acceptable visual quality?
    Actually according to my tests cutting HEVC will always result in artifacts... although if you cut from I-FRM to I-FRM the artifacts usually will last only a second or two but that is unacceptable to me. I won't bother with this anymore, I learned my lesson and I will not cut HEVC anymore unless someone creates a program that cuts it cleanly and without re-encoding.

    I will keep the messed up videos stored until then, thanks for the help.
    Quote Quote  
  21. Originally Posted by davexnet View Post
    Originally Posted by Felow View Post
    Originally Posted by babygdav View Post
    https://tmpgenc.pegasys-inc.com/en/product/tvmw7.html
    Anyways, TMPGENC tools can cut on the frame level regardless of GOP boundaries.
    That is not a free software unfortunately but I will download the trial version and see if it works.

    Edit: I tried it and it looks like it has to re-encode the video.
    Perhaps this one:
    https://tmpgenc.pegasys-inc.com/en/product/tmsr5.html
    This one too has to re-encode the cutpoints but when it does so there are no artifacts! I will experiment more with it, thanks.
    Quote Quote  
  22. Originally Posted by Felow View Post
    This one too has to re-encode the cutpoints but when it does so there are no artifacts!
    Any editor will have reencode cut GOPs to prevent corruption. Dumb editors reencode the entire video. Smart editors will only reencode the cut GOPs.
    Quote Quote  



Similar Threads

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