I have some footage from a Canon HF M400 camcorder that I recorded in the pf24 frame rate mode. It is in a 60i container and I need to perform pulldown (I edit with Sony Vegas, it has no built in detection for that frame rate).
When opening the mts file in avidemux it detects the frame rate as 60 frames a second, rather than fields, which is wrong. I am able to get around that problem by first converting to avi. It is a lossless conversion, I used mp4camtoavi.
Now when I open the file with avidemux I at least get the proper 29.97 frame rate detected.
When I use the decomb telecide filter by itself, it does as it should, the interlaced frames are combined into 2 duplicates, the frames that were already progressive appear untouched.
I need those duplicate frames removed and the frame rate dropped to 23.976, but when I add the decomb decimate filter it just smudges every frame and doesn't delete the duplicates.
The filters are in the proper order, first is decomb telecide, then beneath is decomb decimate. The cycle count is correct (5). What am I doing wrong? Is there a simpler way of getting this done?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 25 of 25
Thread
-
-
I can confirm it doesn't work in avidemux. Looks like some bug. It might work on another version (either older or newer beta). Interestingly, when you push the preview button in the filter section it looks like it's working correctly
It's not necessarily "simpler", but an alternative method is with avisynth
or ffmpeg can IVTC now with -vf pullup -r 24000/1001 -
There is a bit of a learning curve for avisynth (it's all script based) , but it's very powerful for video manipulations, filtering etc...There isn't any good central resource except maybe the avisynth mediawiki (it's not that great to learn from)
http://avisynth.nl/index.php/Main_Page#New_to_AviSynth_-_start_here
The script is actually very easy for what you want to do, but it can be confusing for people new to avisynth or not that familiar with computers or programming:
DirectShowSource("video.mts")
AssumeTFF()
TFM().TDecimate()
ffmpeg is command line utility, but that makes it easy to batch process, say all the clips in a folder with a batch command line or batch file. I can help you with that - what format do you want to import into vegas ? A lossless codec like ffv1 or huffyuv will be very large in filesize, and ffv1 is sluggish to edit (very compressed) at HD sizes. Some people go with high bitrate MPEG2 because it's easy to edit and very compatible in vegas . Cineform would be fantastic (excellent editing performance and quality), but not offered in ffmpeg (you could use avisynth /vdub/cineform however) -
I don't think I have the space for lossless 1080 footage. For my actual editing in Vegas, I will use the original mts as a proxy. I only have problems with them when I render, so I will bring in the proper ivtc clips as a last step. A high bitrate mpeg2 should suffice, but I'm open to trying cineform if I can find easy enough instructions for avisynth.
-
For ffmpeg from the commandline:
Code:for %a in ("*.mts") do ffmpeg -i "%a" -vf pullup -r 24000/1001 -vcodec mpeg2video -q:v 2 -acodec copy -f mpegts "%~na.new.m2ts"
or if you want to do it from a .bat file, just replace the "%" with "%%"
Code:for %%a in ("*.mts") do ffmpeg -i "%%a" -vf pullup -r 24000/1001 -vcodec mpeg2video -q:v 2 -acodec copy -f mpegts "%%~na.new.m2ts" pause
-
You would need to use an IVTC'ed proxy, because the framecount is higher for the original clips, or proxy of the original clips (you couldn't just swap in an IVTC clip to replace the non IVTC'ed clip)
Alternatively, you could edit as interlaced 29.97, then IVTC the exported file at the end, but you run the risk of cadence breaks unless you're very careful where you cut -
avisynth is pretty simple to IVTC once you get going
1) install avisynth
2) Download the TIVTC package and put tivtc.dll in the avisynth plugins folder . Most .dll's are autoloading if placed int the plugins folder , but some need to be loaded manually or with LoadCplugin()
http://web.missouri.edu/~kes25c/
3) Open a file in notepad , copy & paste the script below. You need to change the paths (replace PATH , with the c:\folder or whatever, and names to match your file. Unfortunately you will need 1 script per file. But there are avisynth batch scripters and utilities
Save it, rename the extension from .txt to .avs
Code:DirectShowSource("PATH\video.mts") AssumeTFF() TFM().TDecimate()
You can actually frameserve into vegas with avfs , or sometimes ffdshow avs2avi works . But I wouldn't use DirectShowSource as a source filter for direct frameserving into vegas, because non linear seeks can cause frames to go out of order - that makes editing impossible. (Linear encoding without temporal filtering is fine with directshowsource.) -
I tried ffmpeg first, got an error relating to the "%a."
I followed the steps for avisynth, but when trying to open the file in virtualdub I get "AVI import filter error: (unknown) ." I added the TIVTC.dll and got a windows pop up asking me to confirm the action, does that mean it registered successfully?
Sorry, I'm not too familiar with doing things without a gui.
___________________
In Vegas, I've had success in the past with replacing converted media with that of a different frame rate (resolutions, compression too), although the frame rate has changed, the clip duration is the same. Vegas would drop in the replacement at the same starting point as the original, things would still line up (it might slightly nudge on cuts, as vegas snaps to frames and it is a different frame rate). Vegas detects the change in media, and changes how it will handle interlacing for the clip during render (no more crazy blending or choppiness thanks to a proper ivtc). -
for ffmpeg put the first %a in quotes:
Also, are your files .mts or .m2ts ?
Code:for "%a" in ("*.mts") do ffmpeg -i "%a" -vf pullup -r 24000/1001 -vcodec mpeg2video -q:v 2 -acodec copy -f mpegts "%~na.new.m2ts"
DirectShowSource() relies on your system configured directshow filters and splitters. By default in Win7, the Microsoft decoders are configured and don't work so well with avisynth
In Vegas, I've had success in the past with replacing converted media with that of a different frame rate (resolutions, compression too), although the frame rate has changed, the clip duration is the same. Vegas would drop in the replacement at the same starting point as the original, things would still line up (it might slightly nudge on cuts, as vegas snaps to frames and it is a different frame rate). Vegas detects the change in media, and changes how it will handle interlacing for the clip during render (no more crazy blending or choppiness thanks to a proper ivtc).
Compression won't matter eitherway (as it's decoded to uncompressed on the timeline)Last edited by poisondeathray; 12th Jan 2014 at 00:59.
-
Files are mts.
Yes, quotes in place. FFmpeg gives me an error in red.
%a no such file or directory
As a test, I tried to replace the "%a" with the location of the folder where the file was to see if that helped, but I got the same error. What does the "%a" command do?
I do not have a splitter installed. I guess that explains why my avs won't load.
Interesting. What timeline/project settings ? -
For avisynth, do you have haali media splitter, or lav splitter installed and configured ? For directshow decoders, ffdshow or lav . On windows7 you can use preferred filter tweaker to adjust
AVI import filter error: (unknown) -
For ffmpeg, it's just a wildcard
Open the command prompt in the same directory, or navigate to that directory using dos commands like cd folder . ffmpeg.exe has to been in the system folder , or the folder in question, or you have to specify a full path in the commandline, or setup as an environment variable
ugh... not sure about avisynth . It probably has something to do with your setup. Double check that paths are correct, maybe post your full script
The potential problem with using hard telecined (24p in 60i) on a 24p timeline is sometimes the wrong frame will be dropped in the 3:2 , 5 frame cycle, and depending on where you make edits. Yes, the overall durations match, but your edits won't necessarily match once you swap the proxy out with the true 24p -
could you post a sample? anything would work. i'll see if the old HV20 pf24 hdv tools can be made to work with the h264/mp4 that cam produces.
--
"a lot of people are better dead" - prisoner KSC2-303 -
I used the cd command to change to the directory of ffmpeg, I have one of the video files in question in the same folder as the ffmpeg binary. Attached a screenshot of the command prompt.
My avisynth avs looks like this:
Code:DirectShowSource("C:\Users\Derek\Desktop\avchd_convert_v9\00002.mts") AssumeTFF() TFM().TDecimate()
Originally Posted by aedipussLast edited by Dcourtwreck; 12th Jan 2014 at 12:43.
-
For ffmpeg you don't have the correct directories . ffmpeg is in the "...bin" folder, but presumably your video files are not in that directory . The command line should be called within the folder of files to be converted, and if ffmpeg isn't in the same directory, or not in the system path , that path has to be specified
replace "PATH\TO" to whereever you put ffmpeg.exe
Code:for %a in ("*.mts") do "PATH\TO\ffmpeg.exe" -i "%a" -vf pullup -r 24000/1001 -vcodec mpeg2video -q:v 2 -acodec copy -f mpegts "%~na.new.m2ts"
I have one of the video files in question in the same folder as the ffmpeg binary.
It might be easier to do it with a batch file
1) Place a copy of ffmpeg.exe in the directory of files to be converted
2) Open a text file in notepad in the directory of files to be converted, type the following, save it , change the extension from .txt to .bat, (e.g. "batch.bat")
Code:for %%a in ("*.mts") do ffmpeg -i "%%a" -vf pullup -r 24000/1001 -vcodec mpeg2video -q:v 2 -acodec copy -f mpegts "%%~na.new.m2ts" pause
So did the avisynth method work for you ? Can you load the .avs in vdub ? post any error messages verbatimLast edited by poisondeathray; 12th Jan 2014 at 12:54.
-
But it looks like you are starting the commandline with "ffmpeg for..." , not "for..."
-
The one liner will not open either, same error. I didn't know the 64bit version was trouble, I'm going to have to go back and go 32bit everything. Will report back.
-
khaver made some batch intermediate tools with GUI's back a few years ago . They have PDF instructions and screenshots. They were meant for HV20 (HDV), but should work with anything (avisynth based). I don't know if there are updated versions, but he posts at this forum as well.
http://hddv.net/showthread.php?35295-Batch-3-2-Pulldown-Remover
http://hddv.net/showthread.php?29578-Batch-Intermediate-Creator-New-Version -
there is an old tool that will ivtc the 30i to an intermediate 24p that will edit in vegas pro fine.
search for - Batch_32_Pulldown_Remover_v14
install it and any of the other programs it needs if you don't already have them. install the UT codec. use the ut yuv420 bt709 compression.
use the output intermediate 24p video and the audio from your original 30i. the wav the program file creates is always to short.
Last edited by aedipuss; 12th Jan 2014 at 14:57. Reason: pdr beat me
--
"a lot of people are better dead" - prisoner KSC2-303 -
After going 32 bit, I can now open the test script in virtualdub, and the ones that link to my mts files. So that means I can create the files through virtualdub now if I choose to. Cool beans
Originally Posted by poisondeathrayOriginally Posted by aedipuss
Originally Posted by poisondeathray
Even if that doesn't work out, I do have proper ivtc clips now.
Thank you poisondeathray and aedipuss, I really do appreciate the help
I may end up having more questions, but I felt I needed to throw a "thanks" in. -
What would be the reason for that? For a "lossless" workflow ? Concerned about the loss incurred with MPEG2 ?
It's still "dicey" to do it with non indexed clips such as doing it with DirectShowSource()
Loading AVCHD clips with avisynth can be problematic, especially when you need frame accuracy and temporal seeking
If you get more involved with avisynth , you might consider getting DGNVTools if you have an Nvidia card, it's more reliable but not free
DSS2 is supposed to be frame accurate, but relies on container timestamps and has a last frame bug (it always missing last frame, and sometimes "hangs" when encoding to the end)
FFMS2 usually has frame repeats and issues with frame rate
A reportedly way that works with AVCHD is L-Smash Source, using LWLibavVideoSource() with repeat=true, but there are still some people that have problems getting it work properly with AVCHD for whatever reason
Also, to frameserve into vegas, you must convert to RGB. And most "lossless" intermediates such as lagarith, huffyuv, ut video codec, are not treated as YUV by vegas, they are treated as RGB . That has big implications when you need to salvage superdarks or superbrights, as they might be clipped depending on how you have vegas setup (most non-native camera formats are converted using "computer RGB" , not "studio RGB") . So for a dark footage it can be dangerous unless you either correct for it beforehand, or use an intermediate that is treated as YUV -
Originally Posted by poisondeathray
Interesting, but I have an amd card. So that it out.
Similar Threads
-
Avidemux aspect ratio question [from newbie to Avidemux]
By ANOther1676 in forum EditingReplies: 1Last Post: 20th Jan 2012, 20:07 -
HV40: Record in HDV(PF24) vs HDV(24F)
By videobread in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 12Last Post: 23rd Dec 2011, 20:44 -
Fraps footage too dark in AviDemux
By Dr_Asik in forum EditingReplies: 3Last Post: 1st Apr 2011, 04:17 -
footage from 5d Mark II mixed with XLII footage
By segan in forum Newbie / General discussionsReplies: 2Last Post: 13th May 2010, 14:24 -
Avidemux 2.5.2
By shivz@013.net in forum EditingReplies: 2Last Post: 16th Jan 2010, 08:40