Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 60Gb of DV footage that I need to store, but 60Gb is WAY too big. I need to transcode it to a lossy format, but I need the resulting video to be robust such that it can be easily edited with a NLV editor later on.

By robust I mean: able to chop it up easily without losing sync. I suppose this has something to do with the regularity of keyframes.

I've read that HuffYUV doesn't work well in Linux (don't know why) and anyway, I think that this won't compress it nearly enough - I need to reduce it to a few Gigs.

I am on Ubuntu, so tools at my disposal are ffmpeg/avconv, Handbrake, etc.

Thanks.

EDIT: here's info about the input:

Input #0, dv, from 'capture001.dv':
  Metadata:
    timecode        : 00:00:00:21
  Duration: 00:13:46.44, start: 0.000000, bitrate: 28800 kb/s
    Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 
                        28800 kb/s, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
    Stream #0:2: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
share|improve this question

1 Answer 1

up vote 2 down vote accepted

There are two industry-standard intermediate codecs that I regularly use:

Both are visually lossless and intra-frame only, which means that they can easily be cut on a per-frame basis, and their playback performance is much better than MPEG-style codecs which use (bi-)predictive coding. ProRes can be read by any decent NLE. For DNxHD, there are plugins for Windows and OS X.

With ffmpeg you can encode to ProRes by calling:

ffmpeg -i input.mpg -c:v prores -profile:v 2 output.mov

If you need to map all audio and video channels to the output, use the -map 0 option before the output file name.

The profile setting corresponds to the ProRes profiles Proxy (0), LT (1), Standard (2) and HQ (3). Refer to the link above to see the average bitrates associated with the different profiles. You haven't specified which DV standard your videos have, but for 720x576 video at 25fps, the Proxy profile would result in a 6 GB/hr file.

Note that you cannot do any visually lossless compression with lower bitrate than what the profiles above offer. Your only choice then is to use an intra-frame only compressed H.264 stream, but the encoding time will increase, and if you plan on editing the files, the generation loss might be too high.

share|improve this answer
    
Thanks. I installed a version of ffmpeg with ProRes encoding support from launchpad.net/~jon-severinsson/+archive/ffmpeg and encoded the file with avconv -i capture001.dv -c:v prores -strict experimental -profile:v 2 output001.mov. However the resulting file is BIGGER than the original DV?! –  artfulrobot Jan 22 at 11:02
    
I didn't see your original bitrate at first. Your original has about 28 MBit/s which equal to 13 GB/hr. The Standard profile has about 18 GB/hr for your frame dimensions and fps. Try using the Proxy profile by setting -profile:v 0, which should result in about 6 GB/hr. –  slhck Jan 22 at 11:19
    
And using LT only reduces file size 18%. (am trying profile 0 now...) Any suggestions for more aggressive compression while maintaining some chop-ability? I don't need very fine control at editing stage - just need to edit it reliably without losing AV sync. –  artfulrobot Jan 22 at 11:22
    
As I mentioned, you could try intra-frame only H.264 with some quantization applied, e.g. ffmpeg -i input.dv -c:v libx264 -keyint_min 1 -x264opts 'keyint=1' -refs 0 -qp 15 out.mp4. Lower QP means better quality (but higher file size), and the highest QP is 51. You'll have to experiment. –  slhck Jan 22 at 11:29
1  
Then I'd suggest compressing with H.264 using the above command, varying the QP to your liking. Something like 25 would probably give you visible quality loss, but definitely smaller file sizes. The audio should be encoded over—it'll be in sync. –  slhck Jan 22 at 15:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.