View previous topic :: View next topic |
Author |
Message |
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Fri May 24, 2013 1:51 pm Post subject: ffmpeg x264 forces interlacing (and artifacts) when encoding |
|
|
Hi.
I'm converting multiple DV tapes to H264/AAC/MATROSKA. I use dvgrab to download the tape into AVI. That seems to work fine - audio in sync, clean video. But when I try to encode it with x264 I get interlacing artifacts even though the original camera is progressive!
There's the ffprobe of the original and converted files:
Code: |
gabriel@orangestar:~/Encoding$ ffprobe ./1.avi
Input #0, avi, from './1.avi':
Duration: 01:00:02.68, start: 0.000000, bitrate: 29898 kb/s
Stream #0.0: Video: dvvideo, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
gabriel@orangestar:~/Encoding$ ffprobe ./1.mkv
[matroska,webm @ 0x9afca20] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from './1.mkv':
Metadata:
ENCODER : Lavf53.21.1
Duration: 00:02:00.00, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264 (Main), yuv420p, 720x576 [PAR 16:15 DAR 4:3], PAR 212:199 DAR 265:199, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Stream #0.1: Audio: aac, 32000 Hz, stereo, s16 (default)
|
The tbr/tbn/tbc parameters differ. The whole DVgrab and encoding thing is driving me nuts Any idea how to some this problem ? (just in case you're wondering - I have a dozen other problems following) |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Mon May 27, 2013 1:05 pm Post subject: |
|
|
The DV format is always interlaced. Either upper or lower. |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Mon May 27, 2013 1:08 pm Post subject: |
|
|
Easiest would be to let the yadif filter sort out the deinterlacing and save to an actual progressive format/ or directly output format. |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Mon May 27, 2013 10:22 pm Post subject: |
|
|
Hmmmmmmm... ok...
So the original is interlaced and it gets artifacts when converting to progressive - thanks for clearing that out
Now just one question - why should I deinterlace the video, rather than using x264 in interlaced mode ? What are the advantages ? I'm worried a bit, because the video is already poor quality :/ |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Mon May 27, 2013 11:21 pm Post subject: |
|
|
It depends on your use case. If you're fine with interlace (sucks if it's to be used on PC and/or Youtube) then keep it, otherwise deinterlace it. You can always do both for twice the storage... |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Wed May 29, 2013 2:03 am Post subject: |
|
|
Interlacing is something of the past. It's anoying they re-introduced it into a new codec. We really should get rid of it.
The main reason they re-introduced it is because most "videostreet" hardware still shoots interlaced. And instead of renewing the hardware they chose to go the other way. |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Wed May 29, 2013 6:28 am Post subject: |
|
|
OK I get it
But what's the best deinterlacing method ? ffmpeg offers a --deinterlace flag, but I'm not sure if the algorithm it uses is good. |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Wed May 29, 2013 7:58 pm Post subject: |
|
|
Encode a small part with "ffmpeg -i INFILE -vf "yadif=1:0" etc. |
|
Back to top |
|
|
|