12-31-2023, 09:34 AM
|
|
Free Member
|
|
Join Date: Jan 2023
Posts: 10
Thanked 1 Time in 1 Post
|
|
I have done a lot of searching but can't seem to find the answer.
I simply want to trim the beginning and end of an AVI file captured with an ATI USB 600 and the huffyuv codec through VirtualDub. I am using Direct Stream Copy in VirtualDub (1.9.11). I am using Copy in AviDemux.
With both applications, the overall bitrate went from 47.7 Mb/s to 84.6 Mb/s
I cannot see any other options to resolve this. Is this expected behavior trimming a huffyuv file? I can trim it when converting to h.264 but just trying to save 1hr50min of "dead space" in the mean time. Also, if I ever have some files I want to put away in the lossless format, this would be wasteful. Thank you.
Original File
Code:
General
Complete name : L:\Suz\Music Man 3-3.avi
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
Format settings : WaveFormatEx
File size : 42.7 GiB
Duration : 2 h 8 min
Overall bit rate : 47.7 Mb/s
Frame rate : 29.970 FPS
Video
ID : 0
Format : HuffYUV
Format version : Version 2
Codec ID : HFYU
Duration : 2 h 8 min
Bit rate : 46.1 Mb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 3:2
Frame rate : 29.970 (30000/1001) FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Bits/(Pixel*Frame) : 4.454
Stream size : 41.3 GiB (97%)
Audio
ID : 1
Format : PCM
Format settings : Little / Signed
Codec ID : 1
Duration : 2 h 8 min
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 1.37 GiB (3%)
Alignment : Aligned on interleaves
Interleave, duration : 32 ms (0.96 video frame)
Interleave, preload duratio : 31 ms
Avidemux File
Code:
General
Complete name : L:\Suz\Music Man 3-3_edit.avi
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
Format settings : PcmWaveformat
File size : 6.68 GiB
Duration : 11 min 17 s
Overall bit rate : 84.6 Mb/s
Frame rate : 29.970 FPS
Video
ID : 0
Format : HuffYUV
Format version : Version 2
Codec ID : HFYU
Duration : 11 min 17 s
Bit rate : 83.1 Mb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 3:2
Frame rate : 29.970 (30000/1001) FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Bits/(Pixel*Frame) : 8.022
Stream size : 6.55 GiB (98%)
Audio
ID : 1
Format : PCM
Format settings : Little / Signed
Codec ID : 1
Duration : 11 min 17 s
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 124 MiB (2%)
Alignment : Aligned on interleaves
Interleave, duration : 16 ms (0.48 video frame)
VirtualDub File
Code:
General
Complete name : L:\Suz\Music Man 3-3trimmed-vdub.avi
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
Format settings : PcmWaveformat
File size : 6.67 GiB
Duration : 11 min 17 s
Overall bit rate : 84.6 Mb/s
Frame rate : 29.970 FPS
Writing library : VirtualDub build 32842/release
Video
ID : 0
Format : HuffYUV
Format version : Version 2
Codec ID : HFYU
Duration : 11 min 17 s
Bit rate : 83.1 Mb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 3:2
Frame rate : 29.970 (30000/1001) FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Bits/(Pixel*Frame) : 8.022
Stream size : 6.55 GiB (98%)
Audio
ID : 1
Format : PCM
Format settings : Little / Signed
Codec ID : 1
Duration : 11 min 17 s
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 124 MiB (2%)
Alignment : Aligned on interleaves
Interleave, duration : 33 ms (1.00 video frame)
Interleave, preload duratio : 500 ms
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
12-31-2023, 10:44 AM
|
|
Premium Member
|
|
Join Date: Jan 2017
Location: USA
Posts: 203
Thanked 92 Times in 66 Posts
|
|
I cannot speak for Avidemux. I use Virtualdub to trim unwanted frames from a lossless file such as a Huffyuv AVI. I use Direct Stream Copy option in the Video menu and do a File -> Save as AVI (F7) once I have either selected a range using Edit -> Set selection start (Home) and Set selection end (End). Alternatively, I also use those same Set selection start and end and then cut those frames from the copy loaded in Virtualdub, then save. If a range is not selected, then it will save all the frames remaining.
There should not be anything else you have to do with Virtualdub setup to make an exact copy when in the Direct stream copy Video mode, and it should save very quickly (the rate of frames per second it processes should be very high), and not look like it is trying to re-encode the file.
However, I don't know how Virtualdub operates under the hood. I would guess it doesn't even use a codec (i.e. Huffyuv) when it's doing a Direct stream copy. I say that, because when Direct stream copy is selected in the Video menu, the Compression option in the Video menu is disabled, so you are not able to select a destination codec.
If you are certain the edited file is still Huffyuv encoded, then my guess as to why you are seeing such a different bitrate is that this is an average over the entire video. Huffyuv is a variable rate encoder. If you look at the metrics in Virtualdub as it is encoding a capture, you'll see the rate changes depending on what is being captured. Some tapes are nice and clean and so it can encode much more efficiently, while others have a lot more noise and so the bit rate is higher because it is trying to preserve all that noise without any loss of information. If most of what you cut from the original file is just a blank screen, then the average bit rate over the 2 hour file is going to be greatly reduced because it can encode that part of the video much more efficiently than the few minutes of video you are trimming out of the 2 hour file. If it can encode almost 2 hours of blank screen at a very low bitrate, but the few minutes of video you are saving is encoded at a bitrate several times higher than that, then the average of the 2 hours of blank + your few minutes of video is going to be much lower than when you only save the few minutes of video.
Hope this helps.
|
12-31-2023, 11:39 AM
|
|
Free Member
|
|
Join Date: Jan 2023
Posts: 10
Thanked 1 Time in 1 Post
|
|
The specs for all of the files are above.
You make a good point. A lot of "blank" video in the original file. Almost 110 minutes. That long section may have a much lower bitrate and the section with actual video. I was expecting my file size to go down in a linear fashion.
I will do a test with a file that only needs a little bit trimmed on each end and see what happens.
|
11-12-2024, 08:25 AM
|
|
Premium Member
|
|
Join Date: May 2018
Location: Cedar Rapids, Iowa
Posts: 24
Thanked 1 Time in 1 Post
|
|
Hope I'm not breaking a rule by jumping into an old thread like this, but I have a question about editing that I believe fits here.
Quote:
Originally Posted by keaton
I use Virtualdub to trim unwanted frames from a lossless file such as a Huffyuv AVI. I use Direct Stream Copy option in the Video menu and do a File -> Save as AVI (F7) once I have either selected a range using Edit -> Set selection start (Home) and Set selection end (End).
|
Quote:
Originally Posted by keaton
... and it should save very quickly (the rate of frames per second it processes should be very high), and not look like it is trying to re-encode the file.
|
I have a 7min20sec AVI video from which I'm trimming off a total of about 30 seconds. I used the Direct Stream Copy Video mode as you suggested, and selected my start and end points.
But when I hit File -> Save as AVI, it begins a fairly long process of around three minutes to save the new video. Or at least... it seems long to me. Is this expected? Or am I doing something wrong?
Perhaps this processing time is normal - I just want to make sure before I continue along my journey.
Thanks!
EDIT - sorry, you probably need more info... here are a few bits that might be helpful(?):
It's a captured NTSC (Japanese) VHS tape, 720x480, 7min20sec, about 2.8GB, AVI. Captured in VirtualDub via GV-USB2 capture cable. Running Windows 10 Home.
Last edited by CaseyStelken; 11-12-2024 at 08:54 AM.
|
11-14-2024, 07:23 AM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,242
Thanked 2,585 Times in 2,197 Posts
|
|
PM'd, and answered:
Quote:
Originally Posted by CaseyStelken
I have a 7min20sec AVI video from which I'm trimming off a total of about 30 seconds. I used the Direct Stream Copy Video mode as you suggested, and selected my start and end points.
But when I hit File -> Save as AVI, it begins a fairly long process of around three minutes to save the new video. Or at least... it seems long to me. Is this expected? Or am I doing something wrong?
Perhaps this processing time is normal - I just want to make sure before I continue along my journey.
|
A new file is created. Direct Stream Copy is almost entirely write speed related, which is why fast quality SSDs are best for editing.
Quote:
EDIT - sorry, you probably need more info... here are a few bits that might be helpful(?):
It's a captured NTSC (Japanese) VHS tape, 720x480, 7min20sec, about 2.8GB, AVI. Captured in VirtualDub via GV-USB2 capture cable. Running Windows 10 Home.
|
Nope, not important here.
|
11-18-2024, 06:57 AM
|
|
Premium Member
|
|
Join Date: May 2018
Location: Cedar Rapids, Iowa
Posts: 24
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by lordsmurf
A new file is created. Direct Stream Copy is almost entirely write speed related, which is why fast quality SSDs are best for editing.
|
Of course! I suddenly feel very stupid for even asking this question in the first place... any video tutorial I watched that showed a lightning-fast save process was processing a very short example of a video clip, so of course it processed quickly. Not only is my video file significantly longer than the examples I watched, but my SSD is... a bit full at the moment, haha (I need to do some transferring). So that's probably affecting write speeds as well.
My wife and I recently had our second kid, so the only time I'm able to work on this project is by getting up around 5am, when I can focus for an hour or two before everyone else wakes up. So I'm going to chalk it up to being overly tired when I initially asked this question so I don't feel so dumb about it, haha.
Anyway - THANK YOU!
|
Thread Tools |
Search this Thread |
|
|
All times are GMT -5. The time now is 06:29 PM
|