View Full Version : DivX transcoding
Tikker
8th November 2005, 16:18
I'm not sure if this thread should be in the DivX forum, or just general but here goes.
I've got a couple of prismiq devices (www.prismiq.com). Then allow me to stream media from my file server, to the TV/stereo's
I've currently got a library of ~150 DivX 5.2 movies(encoded using autoGK). movies look great on the pc, as well as my handheld lyra, but lose sync sometimes while played via the prismiq.
Talking with prismiq support, it seems the issue is that the box supports DivX1/2 but nothing newer. But they did give me the source code for their transcoder, as well as instructions for how to build a generic transcoder plugin.(http://update.prismiq.com/plugins/)
So I guess what I'm looking for, is anyone that has a prismiq AND has managed to update their own transcoder with a newer codec (or any leads on how to do it)
stephanV
8th November 2005, 17:06
There is no DivX 1 or 2... and a video codec is never responsible for a/v synch. I think you are looking in the wrong direction for solving your problem.
Tikker
8th November 2005, 17:51
There is no DivX 1 or 2... and a video codec is never responsible for a/v synch. I think you are looking in the wrong direction for solving your problem.
well, I came to this conclusion based on the observations that files encoded with older versions of DivX work well, but files encoded with newer DivX do not
the sync problems are definately being caused during the transcoding (the files work fine on the host PC, as well as handheld DivX player)
charleski
8th November 2005, 17:58
Wow, that's great tech support! "Here's a free compiler you can use to write your own SW!"
Unfortunately it's hard to say exactly what the problem would be. What sort of sync-loss do you see? Is the audio out of sync the whole way through or does it gradually drift through the movie? Does this happen the same way every time you play that movie? What are the differences between the movies that retain sync and those that don't? (Bitrate, length, anything you can think of.) Have you tried re-multiplexing the movie (AVI-MuxGUI (http://www-user.tu-chemnitz.de/%7Enoe/Video-Zeug/AVIMux%20GUI/)) - as that can sometimes correct sync problems.
Tikker
8th November 2005, 18:23
Unfortunately it's hard to say exactly what the problem would be. What sort of sync-loss do you see? Is the audio out of sync the whole way through or does it gradually drift through the movie? Does this happen the same way every time you play that movie? What are the differences between the movies that retain sync and those that don't? (Bitrate, length, anything you can think of.) Have you tried re-multiplexing the movie (AVI-MuxGUI (http://www-user.tu-chemnitz.de/%7Enoe/Video-Zeug/AVIMux%20GUI/)) - as that can sometimes correct sync problems.
The movies seem to drift in and out of sync when played via the prismiq (on the pc you can't really tell it's not a dvd)
some movies drift in and out, and some just have the audio gradually slow and get up to 2 secs out of sync. it's always the same movies that cause issues.
I encode all the movies identically with autoGK (autowidth, mp3 audio, 128k VBR)
and no, I've not tried using AVIMux, as I've made the assumption that the problem was with the prismiq transcoder, and not the actual DivX movie(altho, if it turns out that's a bad assumption, I've got a heck of a lot of re-coding to do, jeje)
stephanV
8th November 2005, 18:28
Try it with CBR audio first.
Tikker
8th November 2005, 18:46
I encoded with CBR to start with, and actually had bigger issues with movies getting out of sync :(
switching from CBR to VBR actually fixed sync issue for a big portion of the collection, but there's just a bunch that stubbornly refuse to sync up
on some movies, it stays in sync until the last 30 minutes or so, and some it starts drifting within 15 minutes (forest gump is one of the worst for that)
edit: again, movies always play fine on the pc, but just not when transcoded
stephanV
8th November 2005, 18:55
I'm not sure how this setup works or why anything needs to be transcoded in the first place, but I think you should ask prismiq to fix their stuff instead of letting you do it.
charleski
8th November 2005, 19:19
Try re-multiplexing a movie that shows this problem. You don't have to re-encode it, just strip apart the audio and video then put them back together.
Tikker
8th November 2005, 20:22
I'm not sure how this setup works or why anything needs to be transcoded in the first place, but I think you should ask prismiq to fix their stuff instead of letting you do it.
the prismiq unit has a MPEG hardware decoder (I assume mpeg2, but possibly 4 as well)
as far as I know, it transcodes the DivX on the server side, and just sends an mpeg stream to the prismiq box
the long and short of it tho, is that the original prismiq transcoder was built around older DivX codecs, and I suspect that's likely the issue with movies not playing properly.
If I'm able to find an ambitious coder, or even better, someone that has a prismiq and has built an updated DivX transcoder plugin I'd be set. I don't think there's anything wrong with the actual DivX movies I have, just that the player isn't fully compatible with the new codec(s)
stephanV
8th November 2005, 21:37
Again, a video codec does not influence a/v-synch at all.
Tikker
8th November 2005, 22:50
Again, a video codec does not influence a/v-synch at all.
What else could it possibly be then?
DivX3 files play on the prismiq, and play on the pc np
DivX5 files lose sync on the prismiq, yet play fine on the pc
perhaps I'm wording things poorly, but in my brain the way I see it is that when the plugin does the transcoding, it does it based on what it knows of DivX3, and doesn't handle the changes from DivX3 -> DivX5 properly all the time. Which results in the loss of sync in the subsequent mpeg stream
CWR03
8th November 2005, 22:58
I'm only guessing, but perhaps it's a bitrate problem. Your encodes could be exceeding the player's ability to transcode the video realtime. A simple test would be to encode a DVD that you know is problematic in one file, but reduce the bitrate and see if it's different.
Tikker
8th November 2005, 23:16
hadn't thought of that
if that was the case though, would it not be more likely to see video skip/stutter rather than loss of A/V sync?
I'll send some more time tonight comparing the details of movies that work, and ones that don't
I made the (apparently bad) assumption that since I was using the same settings in autoGK that the movies would all come out the same
but looking at it now, if I have a target size of 1.5gb a 3 hour movie is probably going to have a different bitrate than a 1.5 hour movie
stephanV
8th November 2005, 23:44
What else could it possibly be then?
I have no idea. I still don't understand how the darn thing works. If I understand correctly it uses ffmpeg to transcode (but whatfor and to what?), which has no problem with any version of DivX at all.
perhaps I'm wording things poorly, but in my brain the way I see it is that when the plugin does the transcoding, it does it based on what it knows of DivX3, and doesn't handle the changes from DivX3 -> DivX5 properly all the time. Which results in the loss of sync in the subsequent mpeg stream
A DivX3 decoder can't decode DivX5 at all, if it tries it would crash, produce garbage or a blank screen, but not cause problems with a/v synch.
What I don't understand is why you don't ask for a refund or let prismiq fix this, instead of working around faults in their product.
charleski
9th November 2005, 01:23
All of the sync issues I've seen have come down to one of three things:
1) A fixed mismatch that can be solved by applying an offset to the audio.
2) Progressive sync loss caused by altering the sample rate of the audio incorrectly.
3) Drifting sync loss caused by an oddity in the structure of the container (the .avi in this case) which is solved by re-muxing the file.
but looking at it now, if I have a target size of 1.5gb a 3 hour movie is probably going to have a different bitrate than a 1.5 hour movieA 1.5G 90min film will have a bitrate of ~2.3Mbps, which is pretty high for xvid and may well be swamping the data channels in the device, though it would probably be more likely to show up as skipping than a loss of sync.
I really think you're wasting your time if you don't try remuxing the files before looking at anything else. Certainly the idea of writing your own driver for it is absurd. Divx 5.2 is over a year old and is widely used, if they can't be bothered to support that then they obviously don't have much interest in selling their product.
Tikker
9th November 2005, 15:27
2.3 mbps?
I just checked "Antz" which clocks in at 1:22, and it's bitrate is 307kbps
Braveheart at 2:57 has a bitrate of 143 kbps
Prismiq support says they've tested it up to 320kbps
as for prismiq support, yes they suck, and no, they're not much interested in supporting or selling these devices it seems
Tikker
9th November 2005, 15:33
I have no idea. I still don't understand how the darn thing works. If I understand correctly it uses ffmpeg to transcode (but whatfor and to what?), which has no problem with any version of DivX at all.
I'm pretty sure it transcodes the DivX files into an mpeg2 stream
Would using an older version of the ffmpeg be part of the problem?
jggimi
9th November 2005, 20:46
I'm moving this to hardware players -- since that's the closest match to your device....if I have a target size of 1.5gb a 3 hour movie...It is my belief that you're confusing bits (ones and zeros) with bytes (1 byte = 8 bits).
Lets do the math together, and see if my assumption is correct:
1.5 GB = 1.610.612.736 bytes or 12,884,901,888 bits.
3 hours = 10,800 seconds.
Not bothering to account for AVI frame overhead at all, this is 1,193,046 bits per second, or 1,165kilobits per second, or 1.14 megabits/second. Knock 128kilobits per second off for an mp3 audio track, and you have 1.037Megabits/sec for your video, perhaps just under 1Megabit/sec after accounting for avi overhead. 1.037 megabits is approximately 130 kilobytes.
Tikker
9th November 2005, 23:05
for the most part, I'm happy to admit I really don't have much clue what I'm talking about, so I just have to go off what the screen tells me.
I guess it's possible windows means 211kBps rather than 211kbps
http://tempus.sasktelwebsite.net/movie_spec.JPG
jggimi
9th November 2005, 23:39
Try using GSpot on your .avi file(s).
Tikker
25th November 2005, 22:29
long story short
I've been able to recompile the transcoder with a newer version of ffmpeg
99% of the A/V sync issues have been resolved, but it's still somewhat present
some files still present issues, but I'm not really sure how to attack the issue
I'm actually going to try and use a couple of different formats, to see if it's related strictly to the transcoder. SVCD and raw mpeg2 should be played natively by the prismiq, we'll find out this weekend anyways
Tikker
31st December 2005, 06:36
I've since gone back and attacked the problem from a different angle
I've tried encoding some of the files to SVCD (mpeg2)
the prismiq seems to like that format quite a bit better, but 1 question
does SVCD max out at 480x480 for resolution?
jggimi
31st December 2005, 20:22
480x480 for NTSC, 480x576 for PAL. See www.videohelp.com/svcd for more on this MPEG-2 video disc standard.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.