Log in

View Full Version : x264 LAVF/FFMS input public beta test (v2.1)


Pages : 1 2 3 [4]

TheFluff
27th March 2010, 22:47
I had similar problem with FFmpegSource.
http://forum.doom9.org/showthread.php?p=1363469#post1363469
http://forum.doom9.org/showthread.php?p=1364213#post1364213

Nobody cares :/

Both myrsloik and I are absurdly busy at the moment (him even more than me though), submit a patch or harass someone else until they do.
M2TS support is still generally lolbroken though and I think the real solution is to either fix lavf's parser or write a new ts parsing library from scratch and get ffms2 to use it.

LoRd_MuldeR
27th March 2010, 23:00
Both myrsloik and I are absurdly busy at the moment (him even more than me though), submit a patch or harass someone else until they do.
M2TS support is still generally lolbroken though and I think the real solution is to either fix lavf's parser or write a new ts parsing library from scratch and get ffms2 to use it.

...I though FFMS2 uses Haali's TS parser, if available? :confused:

Atak_Snajpera
27th March 2010, 23:40
me too

TheFluff
28th March 2010, 16:30
...I though FFMS2 uses Haali's TS parser, if available? :confused:

It does, but even that doesn't always work, especially not for m2ts (it also doesn't work on non-Windows platforms because it's called as a COM object). There are tons of funny issues with m2ts, judging by how many people are complaining about it.

Atak_Snajpera
28th March 2010, 22:06
Can you just force FFmpegSource to divide frame number by 2 for m2ts flaged as interlaced? ffmpegsource should report number of real frames not number of fields. for examples 24p NTSC AVCHD footage is always stored as 29.97i (telecine 3:2) and number of frames is absolutely wrong.

TheFluff
29th March 2010, 00:43
What does "flagged as interlaced" mean? PAFF, I assume (what about MBAFF)? How do you tell the difference with lavc anyway, scan the entire stream and check for avframe->interlaced_frame? I guess I could do that during indexing, but I'd rather find out why it's doing it at all.

Mr VacBob
29th March 2010, 03:03
You can't tell PAFF from decoded AVFrames, since ffmpeg always returns whole frames (= two fields). The only way they're exposed in the API is that avcodec_decode_video doesn't return a frame when you pass it the first field's packet.

AVParser could be extended to do this, or you could do handwritten parsing since only MPEG2 and H.264 are weird enough to have separate field pictures.

kemuri-_9
26th February 2011, 04:01
post a sample.

Blue_MiSfit
26th February 2011, 04:21
@Dogway:

Please do not bring old threads back to life. Start a new thread for issues like this.

Thanks,
Derek

Dogway
26th February 2011, 04:31
Sorry, I was unsure what to do really.

dansus
26th February 2011, 18:03
Im struggling to work out the parms required to force SAR 1:1 in --Video-Filter;

--video-filter crop:2,2,2,2/resize:1280,720,method=lanczos/? (source 4:3 anamorphic, want 16:9 1:1 ouput)

Edit: Coffee's kicked in, worked it out;

--video-filter crop:2,2,2,2/resize:1280,720,1:1,method=lanczos


Still struggling with correct fps output, source is 29.970 after deinterlace and its spitting out 59.940.

ffms [info]: 1440x1080i 0:1 @ 60030/1001 fps (vfr)
.

sneaker_ger
26th February 2011, 21:39
--no-interlaced --fps 30000/1001

sneaker_ger
26th February 2011, 21:47
btw.:
Why isn't "--no-interlaced" documented in fullhelp?
And why is everything from "--no-i" to "--no-interlaced" accepted?

LoRd_MuldeR
26th February 2011, 21:57
And why is everything from "--no-i" to "--no-interlaced" accepted?

getopt (http://www.gnu.org/s/libc/manual/html_node/Getopt.html) ;)

sneaker_ger
26th February 2011, 22:23
I see.

dansus
26th February 2011, 22:25
--no-interlaced --fps 30000/1001

That seems to have worked, except playback is in slow motion now.. :p

sneaker_ger
26th February 2011, 22:40
Then your source is not 29.970.

dansus
26th February 2011, 22:48
Then your source is not 29.970.

Media Info says;

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=1, N=56
Codec ID : 27
Duration : 1mn 11s
Bit rate mode : Variable
Bit rate : 8 593 Kbps
Maximum bit rate : 20.0 Mbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 4:3
Frame rate : 29.970 fps
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First

sneaker_ger
26th February 2011, 22:52
Did you perhaps use bobbing (e.g. yadif mode 1) or mistyped "30000/1001"?
Upload a sample otherwise.

dansus
26th February 2011, 23:08
Did you perhaps use bobbing (e.g. yadif mode 1) or mistyped "30000/1001"?
Upload a sample otherwise.

Seems ok, using ffms in x264.exe

x264.exe --preset slow --crf 21.5 --level 4.1 --video-filter crop:2,2,2,2/resize:1280,720,1:1,method=lanczos --no-interlaced --fps 30000/1001 --output "C:\Output.mkv" --demuxer ffms --index "C:\x264-index" "C:\testhd.ts"

Sample - http://www.mediafire.com/?5j9x0az19sx00eq

dansus
26th February 2011, 23:45
Doesnt like PAL MBAFF either (BBCHD)


ffms [info]: 1440x1080i 4:3 @ 27679/1001 fps (vfr) ??

Theres some weird effect playback too.

http://www.mediafire.com/imgbnc.php/e2879fbe2596144c80f54cec75eb04b8929a7f61334b2b312e76dddd0fb0eedf6g.jpg

sneaker_ger
26th February 2011, 23:55
Yes, I also had some troubles on your sample.
This command line seems to result in acceptable output:
x264 testhd.ts -o output.mkv --vf yadif:0,bff/select_every:2,0 --fps 60000/1001

I didn't manage to bob and I don't know what I'm doing wrong.

dansus
27th February 2011, 00:06
Yes, I also had some troubles on your sample.
This command line seems to result in acceptable output:
x264 testhd.ts -o output.mkv --vf yadif:0,bff/select_every:2,0 --fps 60000/1001

I didn't manage to bob and I don't know what I'm doing wrong.

So your saying you couldnt get the right output with ffms?
.

sneaker_ger
27th February 2011, 00:08
Test my command line, it looks fine, but I did not manage to bob.

dansus
27th February 2011, 00:18
Test my command line, it looks fine, but I did not manage to bob.

Cant seem to get that code to run, crashes after index. Im sure its just me being a noob.. :)

sneaker_ger
27th February 2011, 00:20
I'm using this build (http://www.cs.helsinki.fi/u/jeekstro/x264/1913/x264_1913_64.7z).

dansus
27th February 2011, 00:31
I'm using this build (http://www.cs.helsinki.fi/u/jeekstro/x264/1913/x264_1913_64.7z).

Is that a x64 build? Yep, rename link to 1913_32 if you need x86 version.

dansus
27th February 2011, 00:41
This command line seems to result in acceptable output:
x264 testhd.ts -o output.mkv --vf yadif:0,bff/select_every:2,0 --fps 60000/1001


That did the trick. Thanks.

What would be the best parms for PAL i50 content, --vf yadif:0,tff --fps 25/1 ?

Wasnt aware Yadif had been built in to x264, need to look into this more, see what other goodies lie within.

http://www.mediafire.com/?kehnkpejkcmluk9

sneaker_ger
27th February 2011, 02:22
Good question, theoretically "--vf yadif --fps 25" should work, but since it screws up on your sample it either means the capture is corrupted or ffms is too buggy to handle it. Search around the forum for BBC and you might find some tips as you are not the only one that has problem with it.