Log in

View Full Version : Convert DV files to ????


Pages : [1] 2

jmone
4th July 2009, 12:27
I've 100's of Home Video Clips stored on my HTPC that are a mix of DV Type-1, Type-2 in both 4:3 and Anamorphic. Due to issues with compatibility in streaming these files to devices like the PS3 and issues with getting correct aspect ratios for the Anamorphic files I'm thinking of coverting all of these files to a format that:
1) Minimises Transcoding Degradation (don't care how much disk space it takes up as at 25mbs DV takes heaps anyway)
2) Supports both 4:3 and 16:9 aspect ratios correctly
3) Wide SW / HW support for the container, audio, video streams

Any suggestions?

Thanks
Nathan

Ghitulescu
4th July 2009, 18:15
1. RAW AVI minimizes the transcoding degradations, as you need only to decode DV not to reencode/transcode again ;)
Now seriously, almost every codec gives you good performances if the bitrate is high enough.
DVD should be universal by now, h.264 may also be used.

However, I think you forget to say what would be the hardware platform (so open are the standards only in Utopia).

2. DVD, h.264 and many others

3. Try AVI or MKV. Avoid other containers (WMV, MOV, ASF etc.) which are proprietary (AVI is also a proprietary container, however it's so wide spread that almost every soft/hard knows it).

jmone
4th July 2009, 22:00
Thanks,
I have all my DV on a Server and that when accesses via a PC based client play back perfectly. Compatibility issues start comming witht he CE Devices like the PS3/Popcorn Hour/Handheld devices that just don't have a DV Codec. Ideally I'd like to be able to add DV Support to these devices and NOT transcode but that is not going to be possible.

I firstly tried streaming/transcoding progs (TVersity / PS3Server) but even when getting it working, I've always had issues with getting the correct aspect ratio on the Anamorphic stuff.

I know I could use MPEG but I'm not convined that this is the best codec to transcode to. My attempts to use h.264 (in Handbrake) have also failed to get the Aspect Ratio correct.

Hence I thought I'd ask what others are doing?

Thanks
Nathan

SeeMoreDigital
4th July 2009, 22:09
Given that your .DV sources are most likely "pure-interlaced" I would encode them a video format that supports interlaced encoding and playback. Personally I would not recommend de-interlacing any "pure-interlaced" source.

MPEG-2 is still the most obvious encoding choice because interlaced encoding and playback is supported within the DVD standard. If you choose this method don't be tempted to re-size during the encoding process.


Cheers

2Bdecided
5th July 2009, 00:11
...with the caveat that many people (myself included) seem to have difficulty encoding home shot DV to MPEG-2 without visible artefacts. Shooting style, noise, original lighting and quality etc all play havoc with the MPEG-2 encoder, and while those rick people with Procoder can get an artefact-free (but soft!) result, most of us with cheaper software struggle.

So by all means use MPEG-2 (not sure you could count on de-interlacing on an unknown platform with anything else!) - but keep the originals for best quality.

(I've always thought it should be possible to do a lossless transform from DV to MPEG-2 I-frame only - except the colour sampling isn't the same, the exact use of DCTs may not be the same, and a 25Mbps I-frame only MPEG-2 doesn't fall within the main profile / main level spec supported by most machines - so, not that useful really!)

Cheers,
David.

SeeMoreDigital
5th July 2009, 00:26
Hi David,

Have you considered converting each interlaced field into a separate frame. Doubling the frame-rate?

In my experience the perceptual loss in detail is much less when converting to other formats, such as MPEG-4 AVC. Also, hardware playback support is no longer the issue it once was.

Ghitulescu
5th July 2009, 08:04
Thanks,
I have all my DV on a Server and that when accesses via a PC based client play back perfectly. Compatibility issues start comming witht he CE Devices like the PS3/Popcorn Hour/Handheld devices that just don't have a DV Codec. Ideally I'd like to be able to add DV Support to these devices and NOT transcode but that is not going to be possible.

I firstly tried streaming/transcoding progs (TVersity / PS3Server) but even when getting it working, I've always had issues with getting the correct aspect ratio on the Anamorphic stuff.

I know I could use MPEG but I'm not convined that this is the best codec to transcode to. My attempts to use h.264 (in Handbrake) have also failed to get the Aspect Ratio correct.

Hence I thought I'd ask what others are doing?

Thanks
Nathan

DV is made for TVs, so DVDs. Transcoding from one to the other will not modify the PAR nor the DAR. Unless of course you change the standard.

You'll have PAR/DAR issues only with codecs/software/hardware designed for PC displays (including portables). I do not trust this popcorn as I had once one in my hand and I was not very convinced about how it plays say divx.

In any case, viewing DV on a cellphone or similar is a bit overkilling, but that's my personal view. To see the advantages of DV over say VHS you need at least 20" (try 28") or al least 6 visual grades.

What I'm doing? Well I keep the DVDs as DVDRs. HDD are so sensitive ;)

jmone
5th July 2009, 23:29
David - this mirrors my experience, all I see are the additional MPEG introducted artefacts when playedback on a large format (eg 60" TV). Have you had any sucess in coverting to another format?

SeeMoreDigital - I'm happy to try the one DV Field > one MPEG Frame idea, but what prog/technique are you using for this (eg do you just select 50fps for PAL DV Material) in the encoder?

Ghitulescu - I'm just trying to find a more universally acceptable format for my DV stuff that does not degrade the quality when transcoding.

Thanks
Nathan

Blue_MiSfit
6th July 2009, 03:31
jmone,

There are many MPEG-2 encoders out there - one of the best free ones is HCenc. Have you tried HC? I think you might be quite impressed with the results of building a DVD containing your video at max bitrate, assuming 2ch AC3 audio.

If you're willing to consider other options, AVCHD does allow for standard NTSC / PAL resolutions. You could quite feasibly build an AVCHD disc containing interlaced H.264 (encoded by x264, of course!), and the same 2ch AC3 audio. This will quite probably end up looking much better, since x264 is much more efficient than any MPEG-2 encoder!

I'd suggest filtering your video only a little bit. Typically DV produced by consumer grade cameras exhibits a lot of chroma noise. This can be quickly and effectively cleaned up with FFT3DGPU, by only touching the chroma planes.

So, something like this:

AviSource("movie.avi") #assuming you're using Cedocida to decode your DV source to interlaced YUY2
fft3dgpu(plane=3, sigma=.8, sigma2=1, sigma3=1.2, sigma4=.5, interlaced=true)

ConvertToYV12(interlaced=true)


Then feed this avisynth script into x264, and specify interlaced bff coding mode, with 2 pass VBR to meet your target bitrate - and VBV enabled. I'd turn on all the whiz-bang features you can, being careful not to break the AVCHD spec's max reference frames, b-frames etc... MeGUI and Ripbot264 are great front-ends for x264 encoding.

Take the result, and mux it with an AC3 (I'd encode using eac3to, it uses the Aften AC3 encoder which is very good) into an AVCHD file structure using TSMuxeR. Then burn the result to a UDF formatted DVD and see if your BluRay player likes it.

I think you'll be very impressed by the improvement in quality over standard DVD :D

~MiSfit

Ghitulescu
6th July 2009, 06:19
If you're willing to consider other options, AVCHD does allow for standard NTSC / PAL resolutions. You could quite feasibly build an AVCHD disc containing interlaced H.264 (encoded by x264, of course!), and the same 2ch AC3 audio. This will quite probably end up looking much better, since x264 is much more efficient than any MPEG-2 encoder!

Since I'm the only one in my family owning MiniDV devices (2 cams and 1 deck) I always converted my DVs to DVDs as they play on every DVD player (I mean they have no problems in playing it/them). Since I do all the editing on PC then outputting on a DVD recorder set to 1h (they are rarely over 1 hour) I achieve probably the best quality/time ratio.

Since almost all my DVs are shot in plain air (plenty of light) I never noticed problems with noise. On the other hand, color/luma noise appeared on DVs shot in subideal conditions (mostly indoor, when the AGC is forced beyond the "safe" limits).

I think you'll be very impressed by the improvement in quality over standard DVD :D
~MiSfit
Would you suggest a minimum bitrate for h.264 so that the quality of 1h DVD is matched? I knew from other posts that h.264 reaches the quality of MEPG2 at about 1/2 of the latters' bitrate. In other words you can pack twice as much video at the same quality.

Is this quality improvement due to chroma filtering as in your code, h.264 over MPEG2 or simply because the first 2 generations of BD players are better than the current DVD players?

I own a BD player but I never thought of using h.264 for DVs. I'll give it a try as soon as I'll have some time.

SeeMoreDigital
6th July 2009, 09:34
Since I'm the only one in my family owning MiniDV devices (2 cams and 1 deck) I always converted my DVs to DVDs as they play on every DVD player (I mean they have no problems in playing it/them). Since I do all the editing on PC then outputting on a DVD recorder set to 1h (they are rarely over 1 hour) I achieve probably the best quality/time ratio.The great thing about the new AVCHD and Blu-ray standards is they both support 50 and 60fps.

A couple months ago at work I did some tests with some PAL 720x576 DV sources. Which involved converting each interlaced field into a separate 1280x720 progressive frame encoded with MPEG-4 AVC.

Using multiAVCHD, the encode was re-muxed to the AVCHD "flash-memory" standard. The "SD" card was then inserted into a Panasonic TV and played...

I'm of the opinion, this above method looks better than converting to interlaced MPEG-2 ;)

Ghitulescu
6th July 2009, 12:08
The great thing about the new AVCHD and Blu-ray standards is they both support 50 and 60fps.

A couple months ago at work I did some tests with some PAL 720x576 DV sources. Which involved converting each interlaced field into a separate 1280x720 progressive frame encoded with MPEG-4 AVC.


So you treat each field separately as a frame, thus the 50p for PAL (1280x720x50p is allowed ;)). Maybe I'm wrong but I thought that would keep only half of the vertical resolution ... You did a smart line doubling? ... Is there any script to do this in avisynth/vdub?

SeeMoreDigital
6th July 2009, 14:07
Is there any script to do this in avisynth/vdub?In VirtualDub (v1.9.2 Build 31953), the "Deinterlacer" filter option you require looks like this: -

http://i39.tinypic.com/jsklqw.png

Depending on the interlaced source, select either the "Double Frame Rate, Top Field First" or "Double Frame Rate, Bottom Field First".

EDIT: Just so as you know. In order for afore mentioned to work correctly, the sourcews must be "pure interlaced". A few days ago I got very confused by some sources which I was lead to believe were pure interlaced but turned out to be phase shifted progressive video.


Cheers

nalooti
8th July 2009, 16:41
1. RAW AVI minimizes the transcoding degradations, as you need only to decode DV not to reencode/transcode again ;)
Now seriously, almost every codec gives you good performances if the bitrate is high enough.
DVD should be universal by now, h.264 may also be used.



I though that DV contained an mpeg2-encoded content! (i.e. it's already compressed). I'm confused...
For minimal degradations I'd ask how to "extract" the mpeg2 stream and put it in an AVI/MPEG container without re-encoding ?

That is what I'd like to do but all guides in doom9 or elsewhere talk about capturing in AVI mode 1 or 2 and then compressing to Divx or mpeg2 for DVD followed by authoring.

I think I just can't get something. Can you help please?

SeeMoreDigital
8th July 2009, 17:13
I though that DV contained an mpeg2-encoded content! (i.e. it's already compressed). I'm confused... Here you go then: -

http://en.wikipedia.org/wiki/DV

2Bdecided
9th July 2009, 13:25
@SMD,

If you're going up to 1280x720p50, there are much better ways of doing it (better deinterlacer, better upsizer etc) - but only if you have time to spare.

That's not really archiving the original content though.

Cheers,
David.

Blue_MiSfit
11th July 2009, 11:50
As the Wikipedia indicates - DV is a DCT based, keyframe only codec.

It's not MPEG-2 :)

Essentially, you have three options when it comes to making AVCHD discs:

1) Leave as 480i60 / 576i50 (whichever format your master tapes are)
2) Do a smart bob-deinterlace to 480p60 / 576p50
3) Do #2, but upscale to 720p60 / 720p50

AviSynth can do all of these things, and do them all quite well. The most time consuming (CPU intensive) process is smart bob-deinterlacing your sources. If you have time to spare, method 2 would be my suggestion.

If you want to upscale to 720p (with pillar box mattes as appropriate to make 4x3 content display correctly), you can do that as well, but there won't be much improvement, and you'll need more bitrate to make it look good - which translates to less minutes per disc!

Here's a sample AviSynth script to perform option 2:


AviSource("foo.avi")

#Let's assume it's 4x3, Interlaced NTSC DV, decoded into YUY2 by Cedocida
AssumeBFF()

#And now let's generate a temporary clip of spatially interpolated frames
edi=NNEDI(field=-2)

#Finally, we'll use YADIFMod with our special clip to smart bob, using NNEDI for spatial interpolation.
YADIFMod(mode=1, edeint=edi)

#Now we have 720x480 video at 60p! Let's convert to YV12 for x264 encoding
ConvertToYV12()

#And while we're at it, let's clean the chroma
FFT3DGPU(plane=3, sigma=1)


This can then be encoded using x264 to create an AVCHD compliant 480p60 stream.


Would you suggest a minimum bitrate for h.264 so that the quality of 1h DVD is matched? I knew from other posts that h.264 reaches the quality of MEPG2 at about 1/2 of the latters' bitrate. In other words you can pack twice as much video at the same quality.

Is this quality improvement due to chroma filtering as in your code, h.264 over MPEG2 or simply because the first 2 generations of BD players are better than the current DVD players?

I own a BD player but I never thought of using h.264 for DVs. I'll give it a try as soon as I'll have some time.


Minimum bitrate for acceptable quality depends largely on the complexity of the source content, and your eyes :) I'd do some tests, and see how you like the results.

The efficiency improvements come from the H.264 standard and the x264 encoder specifically! For film DVD sources, I can usually achieve transparency at less than 2mbps - but it's all subjective, and highly source dependent!

~MiSfit

jmone
14th July 2009, 22:41
I've had a bit of a play but have not got too far yet (looks like I need some help on the workflow!):
1) Using VirtualDub with the Video Filter "Double Frame Rate, Bottom Field First" (as it is DV).
2) "Save as AVI" creates a RGB32 Bit Video Stream + leaves the 2CH 16 BIT PCM Audio stream in a AVI Container that is 20 times the size of the original. The output looks good so far.
3) Try to encode using x264.exe but get an "unsupported input format (DIB)".

I've not had much of a change to play with Avi_Synth but I see from the sample script above that the Video is converted to YV12 so I'm guessing that x264 does not like RGB32.

Thanks
Nathan

PS - and I thought I'd find a simple "one click prog" to do the convert - anyway at least once I've got the workflow and settings I like it needs be done only once! Thanks....

SeeMoreDigital
14th July 2009, 23:02
I've had a bit of a play but have not got too far yet (looks like I need some help on the workflow!):
1) Using VirtualDub with the Video Filter "Double Frame Rate, Bottom Field First" (as it is DV). I would recommend always double-check the field options for each input source.


2) "Save as AVI" creates a RGB32 Bit Video Stream + leaves the 2CH 16 BIT PCM Audio stream in a AVI Container that is 20 times the size of the original. The output looks good so far.The RGB in .AVI files are "lossless" so they will be massive. If you have FFdshow or Cedocida installed, you could generate a new "progressive" DV in .AVI encode.


3) Try to encode using x264.exe but get an "unsupported input format (DIB)".

I've not had much of a change to play with Avi_Synth but I see from the sample script above that the Video is converted to YV12 so I'm guessing that x264 does not like RGB32.I generate x264 encodes all the time from lossless RGB in .AVI sources... I use AutoMKV :)

That said, if you installed the VfW version of x264, you could configure VirtualDub to encode your "interlaced" (50/60i) DV in .AVI sources directly to "progressive" (50/60p) x264 in .AVI encodes :eek:

jmone
15th July 2009, 01:15
That said, if you installed the VfW version of x264, you could configure VirtualDub to encode your "interlaced" (50/60i) DV in .AVI sources directly to "progressive" (50/60p) x264 in .AVI encodes :eek:

Thanks progress made! (I Think) - Keeping things simple for now I'm using the following.

1) Using VirtualDub with the Video Filter "Double Frame Rate, Bottom Field First" (as it is DV).
2) Compression - x264vfw - default values expect rate factor at 1.0 (high quality)
3) "Save as AVI" produces a file about 90% of the original size and it looks good!

Couple of Q's:
1) How to I convert my Anamporphic DV to 16:9 in this workflow?
2) Any other "Filters" I should look at?
3) Any other x264vfw settings I should play with

Thanks
Nathan

jmone
15th July 2009, 02:08
I've tried some different DAR Settings on my PAL Anamorphic 720x576 DV files but can not quite get it right:
- Default 1:1 DAR = 4:3 Output
- 4:3 DAR = Not quite wide enough
- 16:9 DAR = Far too wide

jmone
15th July 2009, 03:26
Ok - after reading the Aspect Ratio post at http://forum.doom9.org/showthread.php?p=1103726#post1103726 I get:
- 64:45 DAR = Exactly the same display as playing the original DV File (eg files a 16:9 display perfectly) :) but according the the Aspect Ratio post this is "wrong"
- 16:11 DAR = No quite as tall (eg very small letterbox) but according to the Aspect Ratio post this is "correct"

Blue_MiSfit
15th July 2009, 05:38
Why are you people advising this poor soul to store his videos as separated fields (not bobbed) using x264vfw out of all things?!?!

Bob deinterlace properly, and encode x264 properly!!!!

~MiSfit

jmone
15th July 2009, 06:28
Just to summarise - I've '00s of individual DV-AVI Files on my HTPC shot in PAL (720x576i in both 4:3 and Anamorphic) with 2ch PCM for Audio. All I want is a simple way to convert these to a file format (not a disc) that:
1) Is (more) widely Supported (including correct Aspect Ratios)
2) Does not suffer from to much the transcoding
3) Don't care about saving HDD space (happy to have about the same size as the original DV-AVI files.

I understand enough to there are choices required for the Container, Video Stream, and Audio Stream but that is about it!

So far the "workflow" I've got is using Virtual Dub:
1) Add Video Filter - Deinterlace - Interpolate using bob algorithm & Double Frame Rate, Bottom Field First
2) Compression - x264vfw - default values (but playing with the rate factor to adjust "quality" vs "size")
3) For the Anamorphic DV Footage set SAR Width "64" and SAR Height "45"

I've yet to test how compatible these files are with various devices and the result looks good (but soft) on a 60" TV feed from an HTPC using FFDSHOW as the decoder.

That said, I'm happy for any advice as I'd prefer to do this once "right".

Thanks
Nathan

Ghitulescu
15th July 2009, 08:37
My bad experience with some standalone-hdd-based-players in divx (or were they xvid?, don't remember) using "regular" bitrates (like 7-800MB/90min) made me disregard these formats (was actually the last straw).

These players however perfectly played a ripped DVD, including menus and DD audio, correct DAR.

The MPEG joint committee considered that a bitrate higher than 9800 is a waste of space as no image improvements can be noticed. If you plan a diskless player you may raise the bitrate to say 15000 (some Sony DVD-recorders actually use this bitrate for recordings made onto their HDD).

On my DVD-recorder I begin noticing artifacts (DV->firewire->DVD) starting with about 8000 (like 1.5h/DVD or 80min SP DV tape to DVDR4.7, or some 90min LP ;)).

Since I did this completely in hardware, I do not have to worry about BFF, PAR, DAR, color spaces, the result is super ok on my 50" plasma fed by a RGB Pio or a HDMI BD. I let the BD do the deinterlace and the scaling.

The policy of archivars worldwide is to copy 1:1 their archived items. Only if they need a viewable copy they perform image enhancements, scalings etc. The reason is obvious ...

SeeMoreDigital
15th July 2009, 09:57
So far the "workflow" I've got is using Virtual Dub:
1) Add Video Filter - Deinterlace - Interpolate using bob algorithm & Double Frame Rate, Bottom Field First
2) Compression - x264vfw - default values (but playing with the rate factor to adjust "quality" vs "size")
3) For the Anamorphic DV Footage set SAR Width "64" and SAR Height "45"Arguably, the weakest part of chain is using a VfW x264 encoder. This is because it places the AVC video stream within the .AVI container. Which is too old to support many of the newer encoding implementations without hacking, such as b-frames (which aid compressibility).

Personally, I would experiment by generating x264 encodes without b-frames (B-VOP's) and use a "constant bit-rate" of over 6Mbps.

The audio stream could either be left as it is (ie: 2Ch PCM) or encoded to 2Ch AC3.

I'd also recommend the audio and video streams be muxed into the .M2TS container, using TSmuxer.

I've yet to test how compatible these files are with various devices and the result looks good (but soft) on a 60" TV feed from an HTPC using FFDSHOW as the decoder.There a quite a few "hardware" devices that support playback of AVC video in .TS or .M2TS (even .MOV, .MP4 and .AVI).

Indeed, I'm just about to receive delivery of one of these: -

http://www.avforums.com/forums/streamers-network-media-players/1034459-xtreamer-hd-media-player-comments-questions.html

jmone
15th July 2009, 10:17
I'm happy with TS / M2TS containers and familiar with many of the TS muxer style progs, but is there any one stop tool that can accept DV-AVI and spit out a TS file without having to manually demux, transcode, remux each stream?
Thanks
Nathan

2Bdecided
16th July 2009, 15:34
Can't you just drop DV-AVI files straight into an MPEG-2 encoder? I know the old version of TMPGenc I have does it just fine - I think there's even a batch mode (though you'd have to separate out the 4x3 and 16x9 ones - or patch the flags later with DVDpatcher).

Since you're not worried about disc compatability or file size, you can go up to 15Mbps - you're never going to see problems with MPEG2 at that bitrate (unless you're very picky and your footage is very noisy).

Hope this helps.

Cheers,
David.

Blue_MiSfit
17th July 2009, 02:39
Again - why are we talking about storing interlaced footage as field separated progressive?!!

Keep interlaced, or bob-deinterlace (using something good), and encode with x264's CLI encoder or a GUI wrapper (or an MPEG-2 encoder like HC) , do whatever with the audio, and store in the container of your choice...

2Bdecided
17th July 2009, 09:24
Ok - after reading the Aspect Ratio post at http://forum.doom9.org/showthread.php?p=1103726#post1103726 I get:
- 64:45 DAR = Exactly the same display as playing the original DV File (eg files a 16:9 display perfectly) :) but according the the Aspect Ratio post this is "wrong"
- 16:11 DAR = No quite as tall (eg very small letterbox) but according to the Aspect Ratio post this is "correct"

720 pixel wide content is wider than 16x9 if it respects ITU PAR (where 704 pixel wide content is exactly 16x9 - crop to 704 to get 16x9!)

720 pixel wide content is exactly 16x9 if it respects "digital" PAR (which was made up simply for that - is mis-defined 720 pixels as being the full image width, rather than more than it)

You can't know which is "correct" for a given camcorder unless you test very carefully (i.e. film a perfect circle, and then look at which PAR gives you a perfect circle in the PC). The difference is visible but small.

Cheers,
David.

SeeMoreDigital
17th July 2009, 09:29
Again - why are we talking about storing interlaced footage as field separated progressive?!!Because this method is capable of preserving detail. And provides options such as cropping and re-sizing...

Plus the Blu-ray, AVC-HD formats support 50/60p content (at various resolutions). Making playback in hardware devices and viewing on large displays possible.

2Bdecided
17th July 2009, 12:17
Because this method is capable of preserving detail.A good bobber / deinterlacer is - dumb bob actually reduces perceived resolution.

True "field separated" video jumps up and down (and reduces perceived resolution!).

Cheers,
David.

Ghitulescu
17th July 2009, 19:45
Sorry for interfering again on this subject:
what the OP looks after is a so called "distribution format".
There are few distributiion formats available to the end user (stupid consumer ;)), one of them is MPEG-2 (DVD), the new ones are VC-1 and H.264.

DV is an aquisition or editing format, that means it is optimised for aquisition and editing (only I frames, no "sensible" recompression artifacts up to 5th generation etc.).

You have also to understand the domains wherein they are designed to work for. I might be wrong but MPEG-2 at ML@MP is the best suitable for DV archival, provided the bitrate is high enough. Since HDD space seems to be lesser important as the quality, I suggested in one previous post to use 15 Mbps (as opposed to 9M8 the maximum DVD bitrate for video), I guarantee you that no difference whatsoever is seen between the DV and DVD. Provided the MiniDV tapes are PAL (for NTSC there is a color space change). I see almost no difference starting from ca. 8000 kbps up (1 pass, hardware direct ie minidv->firewire->DVD recorder from 1.5h upwards).

Since MPEG-2 is a distribution format it should at least theoretically play in every device.

H.264 and VC-1 are designed to HDTV. This doesn't mean that MPEG-2 is not useable for HDTV or H.264 for SDTV.

smok3
17th July 2009, 20:47
here is my hcenc ini for temporary dv storage (results are never transparent thought)

*MAXBITRATE 8000
*PROFILE best
*ASPECT 4:3
*CQ_MAXBITRATE 5.000
*PREVIEW
*MATRIX mpeg
*DVSOURCE

(just change aspect to 16:9 when needed)

p.s. ortodox bat file available on request.

(besides hcenc you will also need avisyth and cedocida or similar vfw decoder, hcenc needs (still true?) yv12 input, so something like
avisource('film.avi')
converttoyv12()
would be needed.

SeeMoreDigital
17th July 2009, 22:59
H.264 and VC-1 are designed to HDTV. This doesn't mean that MPEG-2 is not useable for HDTV or H.264 for SDTV.Where-ever did you get this idea from?

jmone
17th July 2009, 23:29
I just used TMPGEnc to convert my test file at 15000 kbs and through the resultant file was half the size I did not notice any quality difference, the aspect ratio stuff just worked, colour space is the same, and of course it should play on everthing (if I don't step too far out of bounds with the data rate I guess). If I go down this path, any comments on:
- Max data rate for compatibility with HW / SW Players
- Min data rate to introduce any extra visable transcoding artifacts
- suggested transcoder SW to use
- GOP Structure - eg I frames only?
- other?

Thanks again,
Nathan

SeeMoreDigital
18th July 2009, 00:03
True "field separated" video jumps up and down (and reduces perceived resolution!).VirtualDub's "Yadif" option prevents this :)

Ghitulescu
18th July 2009, 06:43
Where-ever did you get this idea from?

MPEG joint group committee ? I don't know the exact name of the committee that drafted MPEG, but they had an agenda and that was public some years ago: MPEG1 was designed having VHS/TV/old PCs in mind, MPEG2 came for new TVs/PCs and DVD and the follower of MPEG-2 (was a debate how it should be called, you remember maybe) was designed having HDTV in mind (bandwidth efficiency).

Ghitulescu
18th July 2009, 13:24
I just used TMPGEnc to convert my test file at 15000 kbs and through the resultant file was half the size I did not notice any quality difference, the aspect ratio stuff just worked, colour space is the same, and of course it should play on everthing (if I don't step too far out of bounds with the data rate I guess). If I go down this path, any comments on:
- Max data rate for compatibility with HW / SW Players
- Min data rate to introduce any extra visable transcoding artifacts
- suggested transcoder SW to use
- GOP Structure - eg I frames only?
- other?

Thanks again,
Nathan
At 15Mbps you may use any MPEG-2 encoder, there are no difficult decisions to be taken (15M gives plenty of manoeuver space, you may even end with unused/padded spaces). I used CCE in the past, also TMPG, now I use exclusively my Pio as MPEG-2 encoder for about 5 years now, never regretted. So I cannot give you any advice on [newer] software encoders.

Max bitrate: I would go with 9M8 (DVD), however 15M seems also very popular in Sony recorders, so it should work (AFAIK Sony does not produce the decoding chips). However, even 9M8 is a bit overkilling for clean material - I've seen Hollywood movies in good quality having less than 4Mbps - it really depends
Min bitrate: see above, I would suggest no less than 4Mbps with CCE (3 passes or more) or no less than 6Mbps with TMPG
GOP: using I frames only kills the advantage of MPEG algorithm, use the standard ones for DVDs (15/18, or the presets)

SeeMoreDigital
18th July 2009, 13:50
Ghitulescu, jmone, others....

When discussing bit-rates, to avoid confusion please use the correct abbreviations in the correct way.

Using the term "k" instead of "Kbps" (Kilobits per second). And saying stuff like "At 15kbps you may use any MPEG-2 encoder", instead of "At 1500Kbps you may use any MPEG-2 encoder", is just plain confusing :devil:


Many thanks

Ghitulescu
18th July 2009, 14:18
thanks for checking it up

I always meant Mbps but misstyped kbps. So 15Mbps wont make any difference in MPEG-2 encoder selection, you may use any encoder you may like. For 1500kbps you really need a good MPEG-2 encoder as a lot of decisions have to be made.

jmone
19th July 2009, 08:12
Thanks for all the advice - given the difference of opinion on the containers, settings and tools for transcoding to x264, I've used TMPGenc 2.5 @ 15,000 kbps contstant bit rate / I-Frames only (and just changed the aspect ratio settings between 16:9 and 4:3 depending on the source). The quality of the resultant files look the same as the DV source, and seems to play and stream properly in the testing I've done. I will be keeping the original files as the actual transcoding was a trivial exercise but as always it is the determination of what to do (and the testing) that takes time!

Thanks again, and I'm always open to other suggestions around x264 to try (just for fun!)
Nathan

Blue_MiSfit
20th July 2009, 09:05
CBR is fail.

Try x264 in interlaced mode at CRF 18.

~MiSfit

jmone
20th July 2009, 10:40
thanks - Any suggested GUI Front End?

Blue_MiSfit
21st July 2009, 04:36
MeGUI is my personal favorite. There are plenty - Ripbot264, AutoMKV, MultiAVCHD etc...

2Bdecided
22nd July 2009, 12:43
Why are you now dragging him back to a format where he's going to face interlacing issues in some players?

Why is CBR a fail? It's a fail for the best quality/size compromise - but that's not what he's aiming for!


I think he's spot on with TMPGenc. Two things I'd comment:

1) try it at 8Mbps which would easily fit on DVD (might come in handy)
2) IIRC it only takes RGB input, so you are going through a colour space conversion (DV PAL YV12 > RGB > MPEG-2 interlaced YV12). No way around with with TMPGenc, but it will damage smooth colour gradients, and permanently bleach/clip what was previously recoverable super-white information (of which they'll be plenty in typical DV footage).

Cheers,
David.

Blue_MiSfit
22nd July 2009, 22:02
OP, are you using TMPGenc to create MPEG-2 or H.264 files? It sounded to me like the latter, hence my suggestion to use x264 by itself.

If you want to encode MPEG-2, there are plenty of other tools that will avoid TMPGenc's limitations.

~Misfit

jmone
23rd July 2009, 09:15
Ahhh still got the original PAL DV - and for now I've transcoded to MPEG-2 @ 15Mbps CBR / I-Frames only with TMPGenc.....

SeeMoreDigital
23rd July 2009, 09:24
Ahhh still got the original PAL DV - and for now I've transcoded to MPEG-2 @ 15Mbps CBR / I-Frames only with TMPGenc.....Are your MPEG-2 back-ups interlaced, like your sources?

jmone
23rd July 2009, 10:45
Are your MPEG-2 back-ups interlaced, like your sources?

Yup - Interlaced and 4:2:0 Colour Space