[MEncoder-users] Audio sync problems with HDV footage while performing an inverse telecine

Eric Wescott wescotte at gmail.com
Mon Jun 7 04:31:07 CEST 2010


On 5/4/10 4:41 PM, Alexander Strange wrote:
> On May 4, 2010, at 3:44 PM, Eric Wescott wrote:
>
>    
>> Using "filmdint=io=30:24/fast=0,softskip,harddup,scale=1920:1080 -noskip"? produces some strange color artifacts on the top 50 or so lines of pixels. You can see the detail but it's like there are sections where a green/purple filter is put over it. It's not constant and flickers and seems random where these filters are placed.
>>
>> What exactly is the different between filmdint and pullup?
>> I had a similar problem when using vcodec=huffyuv instead of vcodec=ffvhuff. Using huffyuv would produce a similar problem on random clips but on the bottom of the frame. It however lost the entire detail and just looked almost like a visualization of the audio but didn't actually correspond to the audio playing.
>>
>> Anyway, I seem to have found the solution by removing the -mc 0 section and sticking with ffvhuff.
>>
>>
>> Maybe one more thing to note.. After I get the 24p huffyuv version I'm transcoding it in Final Cut Studio's Compressor application to ProRes 422 and ProRes 422 Proxy. Some files aren't recognized by Compressor (I suspect it's a bug in Perian) and I can detect this by finder not showing a thumbnail preview for this file.
>>      
> Do you have a sample or reliable way to create one for this?
>    
Yes, you can access the file via this link. It's an 80meg HDV file.
https://pantherfile.uwm.edu/wescott/mencoder/Tape004-0045.m2t

Here are the three methods I've used to encode the file
mencoder Tape004-0045.m2t -fps 30000/1001 -vf 
pullup,softskip,harddup,scale=1920:1080 -ofps 24000/1001 -ovc x264 
-x264encopts qp=0 -demuxer lavf -oac pcm -o Tape004-0045.h264.avi
mencoder Tape004-0045.m2t  -fps 30000/1001 -vf 
pullup,softskip,harddup,scale=1920:1080 -ofps 24000/1001 -ovc lavc 
-lavcopts vcodec=ffvhuff:aspect=16/9 -demuxer lavf -oac pcm -o 
Tape004-0045.ffvhuff.avi
mencoder Tape004-0045.m2t  -fps 30000/1001 -vf 
pullup,softskip,harddup,scale=1920:1080 -ofps 24000/1001 -ovc lavc 
-lavcopts vcodec=huffyuv:pred=2:format=422P:vstrict=-1 -demuxer lavf 
-oac pcm -o Tape004-0045.huffyuv.avi

In this case the ffvhuff encoded file will not play in quicktime (via 
Perian) but will in MPlayer. Sometimes (for other HDV clips recorded on 
the same camera) it's reversed (or both won't play) and the ffvhuff 
plays fine but the huffyuv will not. It does seem to be the case that 
the h264 version always plays..

However, h264 is not an ideal codec for editing performance wise.. and 
takes quite awhile longer to encode than the huffyuv versions so I'd 
prefer not to use it.

There is another rare case where the huffyuv or ffvhuff encode will play 
but one, or both produce a strange artifact on the bottom on the video. 
This image is an example of such a problem. The above video produces 
this issue with the huffyuv encode.

https://pantherfile.uwm.edu/wescott/mencoder/shot0001.png

NOTE: The huffyuv generally produces a much larger/noticeable artifact 
than the ffvhuff version. It looks essentially the same but the ffvhuff 
version is physically smaller and doesn't always last the entire video. 
The huffyuv one generally once produced is present for the remainder of 
the clip.


I'm not sure if the playback problem is a Perian bug but there is 
definately an encoding bug in huffy/ffvhuff to produce these artifacts.. 
These issues could be related..

Thanks
Eric Wescott

>    
>> My solution is for these few files that don't work (maybe 50 out of the 5,000) I just encode them as x264 lossless and it does the trick. The only reason I didn't do it for all the files in the first place is it's much slower to transcode from x264->ProRes than Huffy->ProRes..
>>
>>
>> Thanks
>> Eric
>>
>>
>>
>> Laine Lee wrote:
>>      
>>> On 5/3/10 1:22 AM, "Eric Wescott"<wescotte at gmail.com>  wrote:
>>>
>>>
>>>        
>>>> I have about ~5,000 HDV files recorded using an Canon HV30 Camera set to
>>>> it's HD 24F mode. In order to get a proper 24P video file you need to
>>>> perform a inverse telecine. I'm using the following method to create huffyuv
>>>> files which I then transcode again into Apple ProRes for use in Final Cut
>>>> Pro. The page
>>>> http://eugenia.gnomefiles.org/2007/07/13/canon-hv20-24p-pulldown/ lists
>>>> several methods to perform the inverse telecine process but mencoder seems
>>>> to be the only one to do it correctly for me. JES-Deinterlacer produces some
>>>> strange video artifacts..
>>>>
>>>> Anyway, I'm having some issues where some of the files have audio sync
>>>> issues. Sometimes it's just off by a constant rate like and I just shift it
>>>> in Final Cut and it's fine. Other times the file starts in sync and then
>>>> gradually looses sync. I'd say about 10-20% of the files have audio sync
>>>> problems. Here is my current process
>>>>
>>>> mencoder  INPUT.m2t -noskip -fps 30000/1001 -vf
>>>> pullup,softskip,harddup,scale=1920:1080 -ofps 24000/1001 -ovc lavc -lavcopts
>>>> vcodec=ffvhuff:autoaspect -oac pcm -o OUTPUT.avi
>>>>
>>>> ALSO, If I perform a
>>>>
>>>> mencoder INPUT.m2t -ovc copy -oac copy OUTPUT.mpeg
>>>>
>>>> and then transcode to huffy will produce different results and sometimes
>>>> produce a correct final output.
>>>>
>>>> I've tried the most recent builds and a few older ones.. I seem to have the
>>>> same results. I originally followed the guide at
>>>>
>>>>
>>>> Any suggestions?
>>>>
>>>>          
>>>
>>> If you can copy audio with the 2nd example, have you tried it with the
>>> first?
>>>
>>> I've had much better success with filmdint than I've ever had with pullup.
>>> It depends entirely on the source, of course, but what happens if you use
>>>
>>> "filmdint=io=30:24/fast=0,softskip,harddup,scale=1920:1080 -noskip"?
>>>
>>> Maybe you could use Socke's ffmpeg-sox pipe that adjusts ac3 audio tempo. To
>>> raise the pitch slightly (shorten duration), the tempo adjustment factor is
>>> higher than 1. You have to demux and work on the audio, then remux. I put in
>>> the brackets because the first occurrence of sox is actual (not a path)
>>>
>>> ffmpeg -v 0 -i input.ac3 -f sox - | [/usr/local/bin/]sox -S -V -p -p tempo
>>> 1.00003 | ffmpeg -v 0 -i - -acodec ac3 -ab 448000 -y adjusted_tempo_out.ac3
>>>
>>> Play the video and use plus and minus keys to correct audio sync once near
>>> beginning then once near end. For example, if audio has to be moved ahead
>>> 500 milliseconds (500 on the mplayer on screen display, 5 presses of the
>>> plus key), subtract .5 from the total number of seconds of audio, then
>>> divide the original number of seconds of audio by that number to get the
>>> tempo adjustment factor.
>>>
>>> I created an AppleScript droplet to calculate that and perform the operation
>>> that can be downloaded with the other AppleScript droplets here:
>>>
>>> http://lonestar.utsa.edu/llee/HDTV_to_DVD.html
>>>
>>> Laine Lee
>>>
>>>
>>> _______________________________________________
>>> MEncoder-users mailing list
>>> MEncoder-users at mplayerhq.hu
>>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>>
>>>        
>> _______________________________________________
>> MEncoder-users mailing list
>> MEncoder-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>      
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>    



More information about the MEncoder-users mailing list