View Full Version : Transcode DNxHD in MOV to h.264
Aegwyn11
18th August 2011, 02:13
I'm hoping for a little help from some of you experts here...I've got a DNxHD encoded file wrapped in MOV, and I need h.264 in a TS. If I can get h.264 wrapped in something, I can get it from that to a TS, but I'm struggling finding a decent way to transcode from DNxHD to h.264. I'd like to encode at a high bitrate and preserve as much quality as possible, and it would be huge if whatever did the encoding supported Hi422P (4:2:2 10-bit). Thanks in advance for the ideas/help.
smok3
18th August 2011, 10:53
can you provide a short sample? (i guess ffmpeg and friends (ffms) wont decode dnxhd in 10 bit fashion?)
Aegwyn11
18th August 2011, 12:40
I don't know of a way to trim the clip at all...
BTW, I believe that the clip itself is actually 8-bit. Not 100% confident, but again, not sure how to check.
mp3dom
18th August 2011, 13:08
You can probably use QTPlugin and AviSynth to decode the file or try ffmpeg. Both will decode to 8bit. If your source is 8bit natively, there's almost no reason to use a 10bit AVC file (you can encode it as lossless or at very high bitrate). Also 10bit AVC is quite uncommon actually and some NLEs can have problems managing it. You should use something similar to AVC-Intra 100 specs which allows a 10bit 4:2:2 AVC files (Edius and FinalCut supports it natively I think).
About the 10bit, if your source is not at 220Mbps then it's 100% sure that you have an 8bit file. At 220Mbps you can choose between 8bit (DNxHD 220) and 10bit (DNxHD 200 X). You can try to use MediaInfo for more details about your file.
poisondeathray
18th August 2011, 14:30
About the 10bit, if your source is not at 220Mbps then it's 100% sure that you have an 8bit file. At 220Mbps you can choose between 8bit (DNxHD 220) and 10bit (DNxHD 200 X). You can try to use MediaInfo for more details about your file.
10-bit doesn't have to be 220Mbps, it depends on the file characteristics. For example , 10-bit 1080p24 is 175Mb/s , but 10-bit 1080i60 is 220Mb/s for DNxHD
QTSource and FFMS2 in avisynth can decode it , but only at 8-bit
I think FFMPEG, FFMBC can decode at 10-bit, but only encode DNxHD at 8-bit.
The precompiled builds only have 8-bit x264 (I think you would have to compile it yourself for 10-bit x264 support)
SeeMoreDigital
18th August 2011, 16:14
If you have the "Pro" version of QuickTime you could convert the (lossy VC-3) DNxHD video stream into say, an lossless RGB.mov video stream or PNG image sequence.
Both are easier to work with using other encoding softwares ;)
EDIT: Also QuickTime Pro offers an option to "trim a selection" from your source.
Cheers
Aegwyn11
18th August 2011, 16:29
MediaInfo's pretty usefull...thanks! Below is the info on the file.
I'm going to investigate the QT Pro path...I've got access to some tools to encode raw files, so that might be the easiest.
If there are better ideas based on the file information, please let me know. Thanks!!
ID : 2
Format : VC-3
Codec ID : AVdn
Codec ID/Info : Avid
Codec ID/Hint : DNxHD
Duration : 11mn 43s
Bit rate mode : Constant
Bit rate : 145 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Original height : 540 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Bits/(Pixel*Frame) : 2.339
Stream size : 11.9 GiB (99%)
Language : English
Encoded date : UTC 2011-05-26 21:30:13
Tagged date : UTC 2011-05-26 22:00:29
poisondeathray
18th August 2011, 16:51
Your file is the 8bit 1080i29.97 variety of DNxHD
Since your end goal is h.264 in a transport stream, one option is to use ffmbc or ffmpeg to encode to 8-bit 4:2:0 h.264 directly into a transport stream. In this example I used intra (all I-frames), interlaced flags, and crf10, but you can use a lower crf value if you want larger filesize (less quailty loss), or different settings
ffmbc -i input.mov -vcodec libx264 -acodec copy -fpre "C:\PATH\libx264-fast.ffpreset" -intra -flags +ildct+ilme -crf 10 -r 30000/1001 -f mpegts output.m2ts
*If you are planning to use QT, be careful about gamma shifts. QT doesn't treat DNxHD as YUV, it treats it as RGB, but it doesn't use standard matrices for the conversion so you may get a weird gamma shift. You can search for "quicktime gamma shift bug" it's discussed frequently .
SeeMoreDigital
18th August 2011, 17:00
Width : 1 920 pixels
Height : 1 080 pixels
Original height : 540 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
You'll need to keep your eye on these!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.