AMV Encoders - A/V Sync Test

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Re: AMV Encoders - A/V Sync Test

Postby Quu » Sat Sep 11, 2010 3:56 pm

blah... then by that logic, windows and hpc-hc is a superior solution to linux and mplayer

i need to find the git for uau's mplayer... though i don't expect it to fix things
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Quu » Sat Sep 11, 2010 4:00 pm

also... and this sounds wierd... if i "loop" the video... mplayer does not skip any frames at all under linux the second time through... so it might be a file buffering issue I can investigate
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Quu » Mon Sep 13, 2010 2:23 pm

ok... some help if possible...
is it possible to export with MPC-HC (their documentation is rather, sparse) to an uncompressed avi? (if not, then I might have to do it manually with GraphEdt... blah)

I want to do something with linux, and I don't know how:
I want Linux with the nvidia proprietary drivers (needed for VDPAU) with two screens (VGA 1280x1024 and HDMI 1920x1080), three audio outs (headphone, optical digital, and hdmi audio out), support for wired and wireless networking, samba, and ntfs reading, all installed on an 8 gig flash drive
I currently can do this with ubuntu 10.10 (which i have been doing)

but here is the "hard parts"...
I want the GUI limited to only one of the screens, with the other monitor only available to mplayer. The mouse and all desktop elements can't be allowed onto this second monitor. With Ubuntu desktop, when I try to enable this, it works... part way. The second monitor is its own window (:0.1) with its own copy of the menu, and i can move my mouse over to it... i basically want my second monitor to belong to mplayer, with nothing else being able to touch it.

I tried this with Ubuntu-Netbook (I love the GUI/menu for netbook)... but when I enabled the second monitor with the netbook edition... the screen kept reseting and never got to the menu.

I don't care about desktop effects and fanciness of the GUI on the user interaction screen. All i need to be able to do is run a java app's gui, run a web browser, and run a file browser. also, I need to be able to choose which screen is the GUI and which is the video... but i could simply have two flash drives, and boot into the proper linux based ont he conventions needs.

I also need to be able to switch the audio around... i need to assign the "default" audio to one of the three outputs that a convention does not use, and manually tell mplayer to use the on the con would use.

My current testing under Linux has been frustrating... to say the least. While i love the netbook UI for ubuntu, it's simplicity is what I was aiming for, when i enable the second display, it becomes unusable. With the desktop ubuntu, when i enable the second monitor, either i merge both monitors into one, like how windows does it, or if i keep both monitors seperate, a menu and everything appears on the second monitor. Plus, when every i play videos with mplayer and vdpau under ubuntu desktop, i get tearing... i think that is an issue with all the desktop managers, hence why I was hoping to have a clean x display with nothing else running except mplayer's output.
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby kholaras » Mon Sep 13, 2010 2:41 pm

MPC-HC has no transcoding feature, so if you want to get an accurate representation of DirectShow based output you'll have to run it through GraphEdit. After the con I might try and see if I can add uncompressed output as a 'render' option in my program if you think that'd be useful.
kholaras
 
Joined: 23 Jul 2003

Re: AMV Encoders - A/V Sync Test

Postby Quu » Mon Sep 13, 2010 3:58 pm

mainly i wanted to test the a/v sync of the mpc-hc filters... make sure that when they decode mp3 or aac audio, they match the other players (I already found lots of issues... though most players use faad2 for aac decoding so they tend to even out)
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Quu » Mon Sep 13, 2010 5:01 pm

btw, this is my test plan
http://quutar.110mb.com/VideoTest.xml

the test app is not ready for other people to use... but I am getting some nice results... when I am done, i will publish the test app so other people can confirm my results.
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Zarxrax » Mon Sep 13, 2010 5:06 pm

The mpc-hc filters are available separately from here: http://sourceforge.net/projects/mpc-hc/files/
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: AMV Encoders - A/V Sync Test

Postby BasharOfTheAges » Mon Sep 13, 2010 5:46 pm

break out the xorg.conf file and start hacking at it. Fun times will be had.
Another Anime Convention AMV Contest Coordinator 2008-2014 & Head of the AAC Fan-works Theater - follow us on Twitter: https://twitter.com/#!/AACFanTheater
:sorcerer: :sorcerer: |RD: "Oh, Action!" (side-by-side) | |
User avatar
BasharOfTheAges
Just zis guy, you know?
 
Joined: 14 Sep 2004
Location: Merrimack, NH
Status: Extreeeeeeeeeme

Re: AMV Encoders - A/V Sync Test

Postby Quu » Mon Sep 13, 2010 6:10 pm

Zarxrax wrote:The mpc-hc filters are available separately from here: http://sourceforge.net/projects/mpc-hc/files/


yea, i have those... just sometimes a pain making sure that the filtergraph i make matches theirs... and I am being lazy

hackign at xorg's conf file... when i barely know how it works... that will end well ^_^
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Quu » Tue Sep 14, 2010 5:19 pm

Full details at http://quu.livejournal.com/821424.html
Problem
When encoding a video using modern encoding tools, the idea that the tools would change the audio and video sync of the source material is rarely considered. When initially investigating this, I found that this could not be counted on. MP3 and AAC audio encoders need to pad the beginning of the stream with empty packets, and the amount of empty packets is not always formalized, leading to different vendors using different padding, confusing the decoders. Video encoding tools have a simpler job, since a frame is well defined, but even then, some video encoders automatically change or adjust the frames with default settings, trying to compensate for interlaced source footage.

After initially doing a very broad investigation into audio and video sync, I decoded to narrow my focus. The decoder used has as much to do with the sync of any videos as the encoders. I selected two popular video players that supported an easy export feature, VLC and MPlayer. The idea is to take a known "Baseline" uncompressed AVI file, encode it with various tools, then export it with the players, and test how much the audio and video has gone out of sync as compared to the original AVI exported/played the same way.

My testing is not looking for audio or video quality of the various encoders, but just the ability to maintain the original audio and video sync when played with VLC and MPlayer.

Tools and Version
Stand Alone Full Audio and Video Encoders
Handbrake - 0.9.4 (CLI version used)
x264 JEEB's build with L-SMASH, QTAAC and LAME - x264 0.104.0+1943 19e73ec built on Sep 4 2010, gcc: 4.4.4 (x86.generic.Komisar)

Audio Encoders
FAAC - 1.28
FLAC - 1.2.1
LAME - 3.98.4
Nero AAC Encoder - 1.5.1
QTAACEnc - version 20100725 by tmkk

Video Encoder
x264 (from x264.nl) x264 0.104.1713 c276662 built on Sep 4 2010, gcc: 4.4.4

Muxers
mkvmerge - v4.2.0 ('No Talking') built on Jul 28 2010 18:38:23
mp4box - MP4Box - GPAC version 0.4.5 (build 33 - Dec 11 2008) - compiled by Kurtnoise
mp4creator - mpeg4ip version 1.6.1d
tsmuxer - Version 1.10.6

Results
As far as video sync goes, the default "High Profile" settings in Handbrake breaks the video sync as it tries to compensate for interlaced footage, even when given progressive footage. When the default profile is modified, Handbrake is able to produce in sync video with no lost frames. No matter how it is muxed, x264 footage is always in sync.

For audio sync, things were a little different. Both of the stand alone audio/video encoders where able to produce audio that stayed in sync, even when Handbrake's default setting dropped video frames, the audio was perfectly in sync when played back. Of the stand alone audio encoders, only FAAC and FLAC were able to stay in sync with the encoded video, no matter how they were muxed. Uncompressed PCM audio was also tested, but only VLC was able to play it, and it was in sync when tested. What is strange is that JEEB's build of x264, which included QTAAC and LAME was able to maintain perfect audio sync, but when both of those tools were tested externally, they failed the sync test. Even when JEEB's x264 build imported the externally rendered files they were out of sync, so it is not purely because of the L-SMASH mp4 muxer in JEEB's build.

LAME, Nero, and QTAAC all produced audio files, that when muxed and played back in the two test players, that were delayed when compared to the original audio and out of sync with the video. It did not matter what muxer was used, the audio created by these three stand alone encoders where not played properly by VLC or MPlayer, while FAAC, FLAC, and the stand alone audio/video encoders where.
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Quu » Tue Sep 14, 2010 9:39 pm

I am not sure if i want to test mpeg-2 anymore... nor mpeg-4 ASP, as they both don't scale the way mpeg-4 AVC does.

audio, audio has its own set of issues, and at least now I know what I can focus on...

my options for con distribution are
x264-JEEB+QTAAC+MP4
x264-JEEB+LAME+MP4
x264+FLAC+MKV

the first two have the advantage of being all within the MPEG specs, and the latter has the advantage of lossless audio
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Mister Hatt » Wed Sep 15, 2010 12:03 am

Not using JEEB's builds for the FLAC+MKV version? Also which version of MP4 are you using? There are several. How about vorbis audio? If a user cares enough to use x264 they probably don't want crappy MP3, and AAC isn't always the best choice. Why not NeroAacEnc? But after reading your little writeup on tools I can assume the answers for most of these questions.

However, the issues you've reported re sync sound strange, and I think you should report them to the appropriate people. If you are having sync issues, then generally something is VERY wrong with your muxing or playback and you need to find out what, because this should not be happening. Additionally, I would really suggest against using internal audio muxing in x264 as it is fairly experimental. The only reason QTAAC is used over Nero is that Nero's license and packaging makes it impossible to use.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: AMV Encoders - A/V Sync Test

Postby Quu » Wed Sep 15, 2010 10:36 am

not using JEEB's version in the FLAC+MKV was mainly an trying to avoid assumptions... Once all of this sync issue is done, then a focus on quality can be made. by just saying x264, it could be any of the builders... that is something for a later discussion. The specific requirement of JEEB's builds on the first two is because that is the only one that produced i sync audio.

I could add vorbis audio to the next round of my testing... I was just trying to stick with MPEG as much as possible, thought I might need to get over it. The FLAC and MKV was only thrown in as suggestion from others, and I do like both formats. MP3 is not crappy, it has its advantages and dis advantages. If i add vorbis, should I add anything else?

I posted my findings on doom9, and zarxrax has sent a note to one of the Nero developers about the issue, I am sure Zax can provide more details if he wants. I have been very open with the tools I am using, and the command lines I have run, so that the interested parties could provide advice and suggestions on if I am doing anything wrong.
Lead me not to temptation, for I have deadlines
User avatar
Quu
 
Joined: 26 Dec 2000
Location: Atlanta, GA

Re: AMV Encoders - A/V Sync Test

Postby Mister Hatt » Thu Sep 16, 2010 12:39 am

If using vorbis, you only need to find a good encoder (personally I like aotuv.) There are no advantages of MP3 over AAC that I can think of. As far as media playback goes, AAC is the most common and widely supported format. It generally compresses better than vorbis even. I would say just stick to FLAC (-8, but be weary of channel ordering issues in libflac, and reordering in ffflac) and AAC (-q 0.5 in nero.) The only time I can see MP3 being useful is if the source audio is in that format and one doesn't want to encode to lossy from lossy, but really everyone should rip their own CD/vinyl's or at least use FLAC.

Due to issues with MP4, I would STRONGLY suggest using only MKV. Unless you know exactly what the muxer AND demuxer are doing, it just isn't worth it. Another thing is to try and avoid internal audio encoding. It really is best done separately.

Nice to see how far this has come along, and how reasonable you're being on playback at least. I personally don't agree with ever using VLC (and I'm a long time MPlayer user) but it seems you've mostly got things working. My only worry would be what happens when you get The Unexpected.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Previous

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 0 guests