Wow. I'm scared to death to post here.
I've searched. I promise.
The problem is, there is so many responses and opinions that this big, blurry nebulous fuzzy answer is out there that isn't helping me.
People ask questions and they get responses like "well, it depends" or "what are you trying to do?"
I'm trying to encode captured video encoded as Huffy and PCM WAV into Mp4 with Audio (not sure on codec to use... I've been using Lame MP3) and I want these files to be as compliant and vanilla as possible moving forward.
I WILL NOT ask "what is the best" anything. That's just... dumb.
So, here is what I have, here is what I'm doing, and here is what I'm after.
1. Windows. I'm capturing a BUNCH of old VHS tapes with Windows and a Diamond Capture USB Device.
2. Compressing that stream as a Video/Audio stream using Huffy (and probably PCM WAV).
3. Using about 20 minute snippets and adjusting the audio interleave to maintain as much sync as possible (it starts to go south on me after about 20 minutes)
See this thread for my dissertation and learning curve on this.
4. Now.. Encoding.
Ok. I would like to encode to H264 MP4 format. In an MP4 container (not AVI). That is as close to what is "standard" as possible.
MY GOAL is...
Decent file encoded from the Huffy source that will play across many/any devices, upload to FB and Youtube, and play years from now on most devices (these vids are for my child).
So far, I've used Xvid and just saved the file extension as MP4 and that "seems" to work ok.
But I feel like I'm doin' something "wrong."
I'm encoding audio by converting it to 41000Khz first and then 256kbps CBR Mp3 (Lame)
How am I doing so far? Would anyone like to recommend something different for me?
I have ffmpeg, handbrake, and a slew of other stuff.
Audio encoding I struggle with because in Vdub I have Lame Mp3. I assume that's okay?
I can play what I enode on Samsung blu-ray DVD players (miracle), and my phone, my goal is to make sure that this thing will playback on "tomorrow's" crap.
My tools that I have and have been using:
Diamond USB Capture
Xvid Codec (vdub saves in AVI, I just rename to Mp4)
Lame Mp3 Codec (256kbps, CBR, 41000Khz Stereo)
+ Reply to Thread
Results 1 to 18 of 18
41000 kHz = 41 MHz. No idea whether you meant 48 or 44.1 kHz, but the standard for audio accompanying video has always been 48 unless you count (S)VCD.
When you say XviD I assume you are deinterlacing, possibly by dropping half the motion information.
Since the goal is to "play years from now on most devices", personally I would encode interlaced and constrain the video to SD Blu-ray specs, since it is a standardized H.264 feature set.
Audio, well you'd have to use the less-efficient AC3 if you're following BD logic there.
I disagree. Interlaced, anamorphic, complicated menu system... That's asking for trouble.
Progressive, square-pixels HD H.264, High profile level 4.0 to 4.2 depending on source framerate, stereo LC-AAC audio in MP4 container is the way to go for short and long-term compatibility.
Xvid is older codec, if you insist sure, but only for progressive video stream so you'd need to follow a) example below without that H.264 and AAC thing. Other thing is , how good or if at all is constant quality encoding (named CRF in x264 encoder) using within Xvid like CRF using x264 encoder to encode H.264 video.
For more modern form of encoding choose H264 codec and CRF method. Load those avi's into any x264 front encoder (Handbrake included) , encode MP4 with H.264 and AAC audio in it. You do not have to use VirtualDub if not using any filtering. X264 frontend encoders or Handbrake encode audio as well. Always set preset medium or slower to slower, simply settings in the middle, no extremes and there will be no problems.
a) abandon interlaced, anamorphic video as sneaker says and create MP4 with H.264, square pixel which means no anamorhic video (captured VHS IS anamorphic video) and AAC as audio in it. The problem with this decision? You have to get double frame rate (to 59.94p), therefore deinterlace using QTGMC Anything else is really downgrading your video, like Yadif for example. Simply said, if not using QTGMC, leave it interlaced (and anamorphic therefore as well solution b, bu I have no idea how youtube performs with interlaced download, probably not good). After using QTGMC crop 8pixels from left and right to 704x480 before resizing to 640x480 or any 4:3 ratio (if you do not crop, well, nothing happens as well)
Point for this a) solution is, some would not go over this, because QTGMC is quite complicated and working together with Avisynth. That is why discussions goes always round and round , forth and back, attempts are made. If Avisynth is absorbed, then QTGMC does not work for some, again problem needs to be sorted out, always something, it scares the hell a lot of users, but guys overhere put together latest updated QTGMC versions.
you can also keep this anamorphic after deinterlace not resizing , keeping 720x480, but hey, it is a still hybrid then, no foolproof for playback in all players out there, kind of surprise for a lot of folks in the future. You'd need to choose SAR for H.264 stream as in b) version then
b) keep it anamorphic and interlaced 720x480 using SAR flag sar 8:9 while encoding H.264, or if cropping 8pixels left and right to 704x480 then sar=10:11, but , heck, there is tablets, phones, software players that totally suck deinterlacing, some might fail to show correct aspect ratio etc and again, if having interlaced, what YouTube would do with your downloads, not sure.
but , this b) is simple , no deinterlacing, resizing the only problems with this b) is to know to set that SAR flag in whatever software you use, preferably x264 encoders, questions would pop up like, how do I set it in Handbrake, Etc. DVD falls into this category also, but usually there is no problem to create DVD's, no messing with aspect ratios , it is set automatically.
Last edited by _Al_; 2nd May 2017 at 20:19.
I do not have an AAC encoder for audio as far as I know.
I need to use Vdub to crop and offset audio samples over time to be in sync.
@vapor. I said what I meant. I'm currently using Xvid and am asking for better alternatives.
And again, your reponse assumes that I understand anything about blu-ray specs. Here's what I need...
1. Use this software
2. Encode with these settings.
@sneaker, with all due respect, your reply is meaningless to me.
I am de-interlacing the source using a blend mode in Vdub.
That's perfect for me.
The frame size is not 640x480, or whatever... Here is the exact details:
General Complete name : Z:\Capture\199304_Mike_David_07.mp4 Format : AVI Format/Info : Audio Video Interleave File size : 331 MiB Duration : 10mn 51s Overall bit rate : 4 257 Kbps Writing library : VirtualDub build 35491/release Video ID : 0 Format : MPEG-4 Visual Format profile : Advanced Simple@L5 Format settings, BVOP : 2 Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Default (H.263) Muxing mode : Packed bitstream Codec ID : XVID Codec ID/Hint : XviD Duration : 10mn 51s Bit rate : 3 988 Kbps Width : 672 pixels Height : 440 pixels Display aspect ratio : 3:2 Frame rate : 29.970 fps Original frame rate : 30.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.450 Stream size : 310 MiB (94%) Writing library : XviD 64 Audio ID : 1 Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Mode : Joint stereo Codec ID : 55 Codec ID/Hint : MP3 Duration : 10mn 51s Bit rate mode : Constant Bit rate : 256 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Compression mode : Lossy Stream size : 19.9 MiB (6%) Alignment : Split accross interleaves Interleave, duration : 33 ms (1.00 video frame) Interleave, preload duration : 500 ms
as sneaker says and create MP4 with H.264, square pixel which means no anamorhic video (captured VHS IS anamorphic video) and AAC as audio in it. The problem with this decision? You have to get double frame rate (to 59.94p), therefore deinterlace using QTGMC Anything else is really downgrading your video, like Yadif for example. Simply said, if not using QTGMC, leave it interlaced (and anamorphic therefore as well solution b). After using QTGMC crop 8pixels from left and right to 704x480 before resizing to 640x480 or any 4:3 ratio (if you do not crop, well, nothing happens as well)
I de-interlace with VDub filter (blend is fine).
AAC is for MP4 container, if you encode H.264 and AAC in it. Handbrake would do it for you. Or any x264 font end encoder or ffmpeg.
Your blend looks fine to you, because you did not compare it with QTGMC or compared it using a good hardware deinterlacer visually on some TV etc. Or your VHS is not good and it does not matter, well, good enough for you.
well, if is fine, then just use that Xvid
Call me crazy but I think you guys lose sight of some of these questions because you're so knowledgeable about what you guys use that you assume that everyone that comes here knows the same information...
It seems you guys get into these arguments with each other about this container and that codec and what are you trying to do and use this and that versus that what I'm trying to do. You seem to lose the original question.
If Xvid isnt right for my goal... how do i encode my huffy and pcm wav capture stream to mp4? Im ok with 30fps and blend-mode de-interlacing. Im not asking for 60fps progressive video. I amcapturing using a bleh Diamond USB prodect.
How can I crop and work my audio-syncmagic and get that encoded to a long-suppirted format for the future?
I read that h.264 is the sh$t... but no info on audio. I have Lame MP3 avail. do I need something different?
If you want to try H.264, just load that huffyuv into Handbrake and get MP4. Set deinterlace in there. No audio codec needed.
No one is arguing here about containers. Only how to prepare video and encode. Question about Xvid are almost non existent, because there is something better out there right now.
MP4 with H264 and AAC audio is a standard and it is going to be supported for a hefty long time, same as XviD (with mp3 in it) so why do you ask if it is ok? This is how it used to be done. Except why to put Xvid into MP4? Why not to leave it in AVI as it suppose to be?
You encode Xvid and having MP4 extensions, I answer what you should do. I said it is not easy.
You say I'm lost in the question. So I guess I'm out.
There's no point in talking about preserving your video for years if you're destroying it in step 1 by blending your 60Hz VHS into 30Hz half-images.
This video shows 60fps on YouTube. Getting 60fps from your capture has nothing to do with the cost of your capture device.
I think everyone has agreed H.264 + AAC in MP4 container is the way to go.
Now you have to decide on which software to use. Three softwares were mentioned and all of them can output the mentioned format, all can crop, all can deinterlace:
c.) VirtualDub (setting vanilla VirtualDub up to output H.264 + AAC in MP4 is a bit complicated but a one-time thing)
Also you have to decide if you want to de-interlace to 29.97/30 or 59.94/60 Hz. I agree with vaporeon800 in that 59.94/60 Hz is preferable but it's your decision. Just make sure to keep the original Huffy files for the future.
Usually I would now recommend to setup x264 + qaac + mp4box in vanilla VirtualDub using the "External Encoders" feature. We have a thread for helping with that. Quite a bit simpler but a bit experimental is using Shekh's VirtualDubFilterMod. He has integrated x264 + ffmpeg's aac encoder + mp4 muxing into VirtualDub. For video compression choose 8 bit x264, for audio compression choose ffmpeg aac and then when you go "File">"Save as" choose the "MP4" file type. The rest should work like you are used to from the vanilla VirtualDub.
Very helpful. Ok.
I'll give that a shot.
Is there a way to frameserve from Vdub to handbrake?
I'll start working on the deinterlacing while preserving fields (removing that effect) and keep it at 60fps.
I can try to crop (not videoframe crop... I mean take 1 large AVI (huffy) and crop frames (as in 56,000 frames)).
Ok. One last question. How do I get 60fps (60Hz) but get rid of that awful interlaced "look"?
EDIT. Nevermind I see the youtube video explains that. Sorry.
Last edited by Tolwyn; 3rd May 2017 at 15:04.
If your files lose sync gradually it may be better to also gradually stretch the audio. VirtualDub has different functions for that, for example the "stretch" audio filter. Even better would of course be if you could fix that capturing process of yours to not create async files to begin with.