Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st May 2011, 22:09   #1  |  Link
HamsterLord
Registered User
 
HamsterLord's Avatar
 
Join Date: Aug 2005
Posts: 3
Seek problems with Panasonic .MTS AVC files

Am trying to process .MTS files from my Panasonic LX5 in AVISynth. These are AVC video 1280x720 50fps + AC-3 audio.

Trim() does strange things.

eg: Trim(clip,300,399) on a 1402 frame video gives me frames 300-399 of video followed by frame 399 repeated for 1140 frames - a total of 1240 frames. Preview in VirtualDubMod looks fine, its just when saving as an avi.

Have installed the latest Haali, ffdshow, AVISynth and ffmpegsource. Am using TsRemux on the panasonic .MTS and saving as a .m2ts file. This file is then loaded using FFmpegSource2()

Incidently, FFmpegSource2 seems to drop the 50fps video down to 25fps - thats exactly what i want, so thats fine (I guess the "ReFrames : 2 frames" flag in the video means duplicate frames?)

Am i doing anything wrong? would DGAVCDecDI+DiAVC be the solution? I'd really like to use AVISynth for editing.


Here is the .avs:

fhd=FFmpegSource2("00005b.m2ts",atrack=-1)
f=Lanczos4Resize(fhd,720,576)
f.Trim(400,499)


Media info for the clip:

General
ID : 0
Complete name : C:\pictures\201105_wales\20110519\00005.MTS
Format : BDAV
Format/Info : BluRay Video
File size : 77.9 MiB
Duration : 56s 307ms
Overall bit rate : 11.6 Mbps
Maximum Overall bit rate : 18.0 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Duration : 56s 300ms
Bit rate : 10.9 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16/9
Frame rate : 50.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.238

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Duration : 56s 307ms
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz

Text
ID : 4608 (0x1200)
Menu ID : 1 (0x1)
Format : PGS
HamsterLord is offline   Reply With Quote
Old 31st May 2011, 22:19   #2  |  Link
Lam3rD
Registered User
 
Join Date: Oct 2009
Posts: 47
1. Ref Frames is something completely different http://mewiki.project357.com/wiki/X264_Settings#ref
2. ffmpegsource doesn't work well with TS, Remux in matroska and try again, everything should work properly.

What version of avisynth are you using? Trim is a very basic function and it shouldn't behave this way regardless of how bugged the input was.
__________________
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."
-- Albert Einstein
Lam3rD is offline   Reply With Quote
Old 1st June 2011, 10:15   #3  |  Link
HamsterLord
Registered User
 
HamsterLord's Avatar
 
Join Date: Aug 2005
Posts: 3
Quote:
Originally Posted by Lam3rD View Post
1. Ref Frames is something completely different http://mewiki.project357.com/wiki/X264_Settings#ref
2. ffmpegsource doesn't work well with TS, Remux in matroska and try again, everything should work properly.

What version of avisynth are you using? Trim is a very basic function and it shouldn't behave this way regardless of how bugged the input was.
Hi Lam3rD, many thanks for the help, much appreciated.

Tried the following:

ffmpeg -i 00005.MTS -vcodec copy -acodec copy -sn 00005.mkv

then used the same .avs but with FFmpegSource2("00005.mkv",atrack=-1)

Exactly the same result unfortunately. When saving as an avi, VirtualDubMod still seems to think there is 1240 frames rather than 100, but only shows 100 frames when playing or scrubbing the trackbar. File information also shows only 100 frames.

My AVISynth version is 2.58.


Edited to add:
Ah, just done some further experiments. Am saving as XViD and using "Load Processing Settings" in VirtualDubMod - suspect this might be the problem, Trim() has always worked before, and i just tried a short uncompressed avi and got exactly the same behaviour - 1240 frames when saving.

Will try a different version of VirtualDubMod later tonight and report back...

Last edited by HamsterLord; 1st June 2011 at 10:18.
HamsterLord is offline   Reply With Quote
Old 2nd June 2011, 00:20   #4  |  Link
HamsterLord
Registered User
 
HamsterLord's Avatar
 
Join Date: Aug 2005
Posts: 3
mystery solved!

Its an issue with "Load Processing Settings" in VirtualDubMod.

The last line of the .vcf settings file has this:

Quote:
VirtualDub.subset.AddRange(0,1240);
Which is the actual length of the video, and you can't just delete that line or VirtualDub thinks the file is zero length. Therefore every time i do an encode, the settings have to be entered manually - bit of a pain when encoding to Xvid....
HamsterLord is offline   Reply With Quote
Old 9th June 2011, 18:22   #5  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Simpler solution: use virtualdub, not virtualdubmod, and your problems will almost certainly go away
TheFluff is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.