i would like to capture directly into mpeg-1 or mpeg-2 using virtualdub and the ffdshow codec. im already doing this. but when i go to author im running into problems.
i am trying to keep it in 2 steps, capture, then author. seems like a step will need to be added.
64bit capturing at;
-720x480 (for NTSC) ffdshow mpeg-1 or mpeg-2 @2500kbps as a test for quality
-acm ac3 audio 48000 2 channel 128kbps
then author;
i prefer linux, so these are ran via linux command line
-mplex, receiving error "file unecognisable") ( i was only trying to test mplex to see if it would just mux the file without recompressing it. the goal here is to NOT let the video recompress. )
-dvdauthor, receiving error 'no vobu's found'
so i would like to know if there is a way to have virtualdub add the vobu's into the stream at capture to satisfy the author process, or why mplex is not recognizing the file.
im guessing its the constraint that vdub cant satisfy all the dvd compatible mpeg requirements?
heres the file structure as it stands after being captured from vdub
is the field order acceptable? what GOP do i need to readjust for if any, why is the aspect ration coming as 3:2? are these the constraints that are impeding the process?Code:# mediainfo test_mpeg-2.avi General Complete name : test_mpeg-2.avi Format : AVI Format/Info : Audio Video Interleave File size : 685 KiB Duration : 5s 239ms Overall bit rate : 1 072 Kbps segm : c:\Vdub\Caps\ Video ID : 0 Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP : No Format settings, Matrix : Default Codec ID : MPG2 Codec ID/Info : (MPEG-1/2) FFmpeg Codec ID/Hint : Ffmpeg Duration : 5s 239ms Bit rate mode : Variable Bit rate : 915 Kbps Width : 720 pixels Height : 480 pixels Display aspect ratio : 3:2 Frame rate : 29.970 fps Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Bottom Field First Compression mode : Lossy Bits/(Pixel*Frame) : 0.088 Stream size : 585 KiB (85%) Audio ID : 1 Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Codec ID : 2000 Duration : 5s 184ms Bit rate mode : Constant Bit rate : 128 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Stream size : 81.0 KiB (12%) Alignment : Aligned on interleaves Interleave, duration : 32 ms (0.97 video frame)
--
edit, ok until i get someone who has insight on this, i am going to keep expanding this post.
i found a capture method that allows it to be further processed, in virtualdub in the mpeg-2 encoder settings i turned on b-frames in the ffdshow mpeg-2 codec, and using the fourcc of MP2(not sure if this part is necessary), and after capture, im able to run it through # ffmpeg in the command line successfully now. woohoo! What i need to know if running it through ffmpeg is losless or not. heres what i know, maybe somebody can take a look at the specs and tell me what happened to the pixels, wether they were resampled LOSSY or not.
captured file
ffmpeg processingCode:$ mediainfo test-mpeg-2-bframes.avi General Complete name : test-mpeg-2-bframes.avi Format : AVI Format/Info : Audio Video Interleave File size : 568 KiB Duration : 3s 804ms Overall bit rate : 1 223 Kbps segm : c:\Vdub\Caps\ Video ID : 0 Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP : Yes Format settings, Matrix : Default Codec ID : MPG2 Codec ID/Info : (MPEG-1/2) FFmpeg Codec ID/Hint : Ffmpeg Duration : 3s 804ms Bit rate mode : Variable Bit rate : 1 068 Kbps Width : 720 pixels Height : 480 pixels Display aspect ratio : 3:2 Frame rate : 29.970 fps Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Bottom Field First Compression mode : Lossy Bits/(Pixel*Frame) : 0.103 Stream size : 496 KiB (87%) Audio ID : 1 Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Codec ID : 2000 Duration : 3s 584ms Bit rate mode : Constant Bit rate : 128 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Stream size : 56.0 KiB (10%) Alignment : Aligned on interleaves Interleave, duration : 34 ms (1.02 video frame)
result of the ffmpeg processingCode:$ ffmpeg -i test-mpeg-2-bframes.avi -target ntsc-dvd test-bframes-vob.mpg ffmpeg version N-30954-g1986380, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 22 2011 13:28:34 with gcc 4.6.0 20110603 (prerelease) configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.122. 0 / 52.122. 0 libavformat 52.110. 0 / 52.110. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, avi, from 'test-mpeg-2-bframes.avi': Duration: 00:00:03.80, start: 0.000000, bitrate: 1223 kb/s Stream #0.0: Video: mpeg2video (Main), yuv420p, 720x480 [PAR 1:1 DAR 3:2], 104857 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 128 kb/s [buffer @ 0x1bbb1c0] w:720 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: Output #0, dvd, to 'test-bframes-vob.mpg': Metadata: encoder : Lavf52.110.0 Stream #0.0: Video: mpeg2video, yuv420p, 720x480 [PAR 1:1 DAR 3:2], q=2-31, 6000 kb/s, 90k tbn, 29.97 tbc Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop, [?] for help frame= 114 fps= 0 q=2.0 Lsize= 1016kB time=00:00:03.58 bitrate=2322.3kbits/s dup=1 drop=0 video:785kB audio:196kB global headers:0kB muxing overhead 3.584905%note the final file size went from 568kb to 1016kbCode:$ mediainfo test-bframes-vob.mpg General Complete name : test-bframes-vob.mpg Format : MPEG-PS File size : 1 016 KiB Duration : 3s 804ms Overall bit rate : 2 188 Kbps Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP : No Format settings, Matrix : Default Format settings, GOP : M=1, N=18 Duration : 3s 804ms Bit rate mode : Variable Bit rate : 9 000 Kbps Width : 720 pixels Height : 480 pixels Display aspect ratio : 3:2 Frame rate : 29.970 fps Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.869 Stream size : 4.08 MiB Audio ID : 189 (0xBD)-128 (0x80) Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Muxing mode : DVD-Video Duration : 3s 584ms Bit rate mode : Constant Bit rate : 448 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Stream size : 196 KiB (19%) Menu
+ Reply to Thread
Results 1 to 11 of 11
-
Last edited by wolfdogg; 16th Jul 2011 at 19:41.
-
damn, did i come to the wrong forum or what?
Nevertheless, I think you've been doing things in the wrong wayVideo and audio capture should (always?) use uncompressed (or lossless) output. Later, after some editing, you can compress both video and audio with lossy codecs. Also, MPEG-video is not quite suitable for the AVI container, at least if you insist on using B-frames
Sometimes I didn't care very much about the quality of the captured video, and I used the H263+ codec for capturing, but with Constant Bitrate, and without B-frames — however those were the exceptions, not the rule.
Last edited by El Heggunte; 18th Jul 2011 at 06:17. Reason: grammar, typos
-
I wanted to speak specifically to the MPEG-1 part of this which wolfdogg suggested as a possibility. Many DVD authoring program incorrectly refuse to accept MPEG-1 video for DVD authoring. From what I can determine it seems that MPEG-1 is limited to VCD resolutions and 1.85 Mbps on the bit rate.
Is there a reason you're trying to produce AVI output? I would think that using a standard MPEG program stream or a transport stream would be what you want to get as output. -
yes, i was using mpeg-1 at first, i learned that its limitations are suitable for low bitrate and non interlaced video. since dvd is high bit race, and usually ilaced i chose mpeg-2.
the reason its an avi is because i prefer virtualdub, it works great for me for capturing, and im completely used to it.
the reason i wanted to cap in mpeg dvd compliant was because i could save a step of having to re-encode, which i have learned to dislike much. when compressing during capture, GONE are the days of waiting for a video to resample, and having to build jobs and batches in vdub.
i didnt really know much about b-frames at all, i just found that when i turn them on, it was allowing the process to work, its that simple. you just reminded me that i think i turned it on to satisfy the fiel running through mplex infact, i have eliminated mplex from the process, since i learned that its only for multiplexing, and not for what i was using it for. i thought somehow it helped satisfy the GOP. do you suggest i leave it off if possible? does it slow down encoding, or reduce quality or something?
i am happy to say that i have solved the dilemma, by first capturing with virtual dub in ffdshows mpeg-2 codec, with b-frames on, and by adjusting the output part of the encoder to 40x33 (ntsc-16x9) aspect ratio, interlaced, top field first. i also compress >= ac3 128kbps @48khz
this allowed me to take the direct capture and run it with ffmpeg like this;
$ ffmpeg -i in.avi -target ntsc-dvd -vcodec copy -acodec copy out.vob
the -vcodec copy says to directly copy the video, without recompress. thats beautiful, its what i was trying to achieve. so the process is done in less than 2 seconds. perfect.
then with that, i was able to run it through dvdauthor without a hitch, because the stream was in perfect condition now.
$ dvdauthor -o /path/for/dvd/dir -x dvd.xml
those last 2 steps of ffmpeg and dvd author were fairly quick, with almost no wait time.
so essentially, once the video was captured, it was ready for burning within minutes.
whats wrong with this, since there was no generation loss, or desctructive processes to the file from the capture all the way to the convertion to .vob's?
i am still able to edit the capture, with a direct stream copy, no filtering needed for thiese tests, just to cut commercials, and unwanted material, this is lossless on the direct stream copy.
i look at it like a huge success of an idea. is it useful only for me, or is this entirely useful to those that dont need to filter or can filter on capture?
now, i ran into a problem, i cant capture mpeg-2 6000kb/s without massive sync problems, why the heck is this happening? i can capture in mpeg-1 with no problems, although i didnt try it at 6000kbps, and i can capture huffyuv lossless no problems obviously.Last edited by wolfdogg; 22nd Jul 2011 at 04:11.
-
Many programs can't handle MPEG video in AVI files. It's possible to use an external encoder and muxer to output an MPG file directly from VirtualDub:
http://forums.virtualdub.org/index.php?act=ST&f=3&t=18840&
You could also try remuxing with AviDemux. I just verified that AviDemux works for remuxing MPG in AVI into an MPG container.Last edited by jagabo; 1st Oct 2011 at 07:57.
-
Capturing with ffdshow ? good luck man... You might wanna try windvr3 instead which will make nice mpeg(1,2) progressive frames though, i've used it for years, tested & approved.
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
This sounds like something i might be looking for because i can eliminate the time it takes to re-encode, it can be done on the fly right? Im not familliar with this, can you elaborate a bit? I had to download the new experimental version just to find this option by the way, its version 1.10.1
I didnt think about that one. I wonder if it does any compression, it sounds like it might not, and therefore might be quick and lossless, wouldnt it? Your talking about editing a file already captured right? then demux, then remux? if so, unless its quick, it adds more processes, and would rather just capture in huffyuv and then run through ffmpeg with the dvd-ntsc option i think it was, which will compress it dvd compatible. Thats an interesting thought though, because i might be able to use the avidemux in my linux script in the place of ffmpeg, which is basically doing the same thing. im not using ffmpeg in the linux script to compress, just to convert the file dvd compatible, which i guess is the same thing avidemux is doing isnt it?
my goal here is to make dvd compatible in 2 steps, and with no recompress time,
1)capture
2)fun through ffmpeg with -vcodec copy (just copies video codec, doesnt recompress), or something similar (avidemux possibly)
then i can do the last 2 steps
3)run through dvdauthor (only takes a minute to run)
4)burn disc
will the outputting of the video capture stream to an external encoder be able to satisfy a few criteria that im trying to achieve?
1) on the fly compression?
a)do i still capture in huffyuv to serve it, or will i be capturing raw? or does the capture only move to the external encoder?
2) create a dvd compliant mpeg2 file with out any sync issues?
whats wrong with capturing with ffdshow? do you say this because i am trying to make a dvd, or do you say this because ffdshow is inferior? i didnt quite understand that. And, if i used windvr, i wouldnt be using vdub which is almighty awesome, lol, but even worse, the file wouldnt be editable by vdub so i wouldnt be able to cut any commercials without using another 3rd party program right? essentially your recommending to dump vdub if i want to end up with a dvd compatible file?
im pretty determined to use vdub, and to make this work, but im eager to hear your suggestions just the same..Last edited by wolfdogg; 10th Jan 2012 at 03:44. Reason: reasons for editing are overrated
-
AviDemux in "copy" mode doesn't reencode. It just remuxes. It just takes a few seconds (depending on the size of the video), the same as ffmpeg in copy mode.
I'm talking about using VirtualDub to create an AVI file with MPEG video, then opening that AVI in AviDemux and remuxing it into an MPG container.
I've never actually used it. Can it do realtime compression while capturing? I don't know. It will depend on the encoder settings you use. But generally, high quality MPEG 2 compression is slow. If you need a particular file size (and you usually do with DVD) you need to use 2 passes -- which isn't possible while capturing. You capture as you normally would, just specify the external encoder to use instead of using HuffYUV. You get a DVD compliant video stream by setting the encoder to DVD compliant settings. -
i have been working on the external encoder of virtualdub all night, thats a wonderful new insight for me. thanks for that tip. i have made a couple successes, and many failures. but i judge my work by the successes. i just posted my particular problem in the linked thread you linked. its not related to this topic, its an alternate method im trying out.
ill look into the avidemux at a later time. thanks for the tips!
When i was capturing in FFdshows MP2, i was capturing at 6000kbps, but there was some sync problems. i thought the logic was if you turn up the quality (down the compression) then the system obviously doesnt have to work as hard, and less chance of sync loss. So i guess, what you said about MPEG2 having to work very hard to compress, i guess thats why the sync issues. If i cant overcome that, it wont work. But, i want to try to capture at 3000kbps and see how it looks, and to see if miraculously there might not be any sync issues. If i capture at 10000kbps which might not have sync issues, it defeats the purpose of capturing in MPEG2. because then it will need a recompress. In that case i would just go back to huffyuv like im doing lately.
One thing i want to note about sync issues that im aware of, you have to turn OFF all the vdub resync features(the actual name escapes me right now but its under the timing settings), and let your processor and hard drives just handle it if they can, when the vdub resync feature is on, nothing is in sync no matter what, it over compensates all the time.Last edited by wolfdogg; 10th Jan 2012 at 07:30.
Similar Threads
-
Is there a way to capture directly to MPEG-2 on a Mac?
By pf4711 in forum MacReplies: 10Last Post: 24th Feb 2012, 18:15 -
Can I capture/copy DV directly to DVD MPEG2?
By shina00 in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 1Last Post: 17th Nov 2011, 06:16 -
Capture and record video directly to DVD
By ruslenko in forum Capturing and VCRReplies: 8Last Post: 9th Oct 2010, 08:47 -
Stream an MPEG file over UDP as MPEG-TS and convert back to MPEG.
By Tengil123 in forum Video Streaming DownloadingReplies: 0Last Post: 27th Nov 2009, 04:40 -
Question - Capturing to MPEG directly with VHS cropping
By joejoe in forum Capturing and VCRReplies: 2Last Post: 24th May 2009, 22:45