Inconsistent output when TS to avi (xvid)

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

Post Reply
takilara
Beginner
Beginner
Posts: 1
Joined: Wed Aug 19, 2009 9:40 pm

Inconsistent output when TS to avi (xvid)

Post by takilara » Thu Aug 20, 2009 1:26 am

Hello.

I convert TV episodes from TS to xvid so that my kid can play them on his dvd player (that takes divx/xvid). Untill recently, i've done this using Auto Gordian Knot, however due to the supreme GUI and batch capabilities of MediaCoder, i started using MediaCoder instead.

With the last build, i had some problems with some of the avi files missing some 10-20 seconds at the end, but that was fixed last build, but i then noticed another phenomena. Some of the avi's wont report a duration in VLC, and wont seek properly in VLC. A working source file and a non working source file are very similar. (recording from same tv channel, same postprocessing (trimmed start and end position in ProjectX)). But in the output files, it looks like alot of the "properties" is missing from one of them (Duration, overall bit rate, CBR, format profile, aspect ratio is wrong, etc etc)

I've figured out that if i choose copy audio instead of trying to get out CBR 128, it works for all the files, and the resulting files look very similar in mediainfo, but if i use LAME MP3 CBR 128 on all, not all the files work properly.
If I open the avi that has seeking problems in Virtualdub, it states the following:

Code: Select all

[!] AVI: Index not found or damaged -- reconstructing via file scan.

[!] AVI: Keyframe flag reconstruction was not specified in open options and 
    the video stream is not a known keyframe-only type.  Seeking in the video 
    stream may be extremely slow.

[!] AVI: Variable bitrate (VBR) audio detected. VBR audio in AVI is 
    non-standard and you may encounter sync errors up to 0ms when attempting 
    to extract WAV files or playing in some players. If this is a problem, use
    Full Processing mode is recommended to decompress or recompress the audio.
    (This warning can be disabled in Options, Preferences, AVI. bitrate: 128.0
    ± 0.0 kbps)

The one without seeking problems give no warning when opened in VirtualDub.

Both files seek fine in Media Player Classic.


MediaCoder Build: 0.7.1.4490
Video Format: Xvid, 1500Kbps Two-pass
Audio: Source: (auto Select), Encoder: Lame Mp3, 128 kbps CBR
Container: AVI, Multiplexer: Auto Select

One more piece of information:
In the properties window of mediacoder, there is one noteable difference between the working and nonworking source, the nonworking says:

Code: Select all

Overhead: 0.5%
No idea what that means.

I doubt this is MediaCoders fault, but I'm posting here for help.
Things im suspecting:
* VLC
* LAME (or LAME settings)
* Container (or container settings)
* Faults in source files

I've attached my preset, and output from mediainfo for both source files (working.ts, nonworking.ts) and both resulting avi's (working.avi, nonworking.avi)

I hope you can help :)

Many regards
Espen

Preset

Code: Select all

<MediaCoderPrefs>
  <node key="overall.ui.mode">Advanced</node> 
  <node key="overall.ui.browserMode">App Mode</node> 
  <node key="overall.ui.expertView">Console Output</node> 
  <node key="overall.ui.optionTab">3</node> 
  <node key="overall.ui.param">948,640,350,59</node> 
  <node key="overall.ui.noWelcome">4490</node> 
  <node key="overall.audio.source">Default</node> 
  <node key="overall.video.mode">Two-Pass</node> 
  <node key="overall.video.bitrate">1500</node> 
  <node key="overall.video.dar">true</node> 
  <node key="overall.video.darw">16</node> 
  <node key="overall.video.darh">9</node> 
  <node key="overall.video.format">XviD</node> 
  <node key="overall.container.format">AVI</node> 
  <node key="overall.playback.render">false</node> 
  <node key="audioenc.helixmp3.mode">CBR</node> 
  <node key="audioenc.speex.mode">CBR</node> 
  <node key="audioenc.ffmpeg.codec">MP3</node> 
  <node key="audioenc.ffmpeg.bitrate">128</node> 
</MediaCoderPrefs>
(Strange, the preset mentions helixmp3, ive tried Helix Mp3 to see if it was lame's fault, but no change, but mediacoder is set to use lame, not helix now...)

MediaInfo

Code: Select all

General
Complete name                    : D:\dvb\analysis
onworking.avi
Format                           : AVI
Format/Info                      : Audio Video Interleave
File size                        : 155 MiB
Writing application              : MEncoder UNKNOWN-4.2.4
Writing library                  : MPlayer

Video
ID                               : 0
Format                           : MPEG-4 Visual
Codec ID                         : XVID
Codec ID/Hint                    : XviD
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 5:4
Frame rate                       : 25.000 fps
Standard                         : PAL
Resolution                       : 12 bits

Audio
ID                               : 1
Format                           : MPEG Audio
Codec ID                         : 55
Codec ID/Hint                    : MP3
Bit rate                         : 128 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Alignment                        : Aligned on interleaves

General
ID                               : 1
Complete name                    : D:\dvb\analysis
onworking.ts
Format                           : MPEG-TS
File size                        : 639 MiB
Duration                         : 13mn 29s
Overall bit rate                 : 6 622 Kbps

Video
ID                               : 224 (0xE0)
Menu ID                          : 258 (0x102)
Format                           : MPEG Video
Format version                   : Version 2
Format profile                   : Main@Main
Format settings, Matrix          : Default
Duration                         : 13mn 29s
Bit rate mode                    : Variable
Bit rate                         : 5 906 Kbps
Nominal bit rate                 : 10 000 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Standard                         : PAL
Colorimetry                      : 4:2:0
Scan type                        : Interlaced
Scan order                       : Top Field First
Bits/(Pixel*Frame)               : 0.570
Stream size                      : 570 MiB (89%)

Audio
ID                               : 192 (0xC0)
Menu ID                          : 258 (0x102)
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Duration                         : 13mn 29s
Bit rate mode                    : Constant
Bit rate                         : 256 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Video delay                      : 92ms
Stream size                      : 24.7 MiB (4%)
Language                         : German
Language, more info              : Clean effects

Text
ID                               : 144 (0x90)
Menu ID                          : 258 (0x102)
Format                           : Teletext
Language                         : German

General
Complete name                    : D:\dvb\analysis\working.avi
Format                           : AVI
Format/Info                      : Audio Video Interleave
File size                        : 127 MiB
Duration                         : 10mn 57s
Overall bit rate                 : 1 622 Kbps
Writing application              : MEncoder UNKNOWN-4.2.4
Writing library                  : MPlayer

Video
ID                               : 0
Format                           : MPEG-4 Visual
Format profile                   : Simple@L3
Format settings, BVOP            : No
Format settings, QPel            : No
Format settings, GMC             : No warppoints
Format settings, Matrix          : Default (H.263)
Codec ID                         : XVID
Codec ID/Hint                    : XviD
Duration                         : 10mn 57s
Bit rate                         : 1 481 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Standard                         : PAL
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.143
Stream size                      : 116 MiB (91%)
Writing library                  : XviD 1.2.1 (UTC 2008-12-04)

Audio
ID                               : 1
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 3
Codec ID                         : 55
Codec ID/Hint                    : MP3
Duration                         : 10mn 57s
Bit rate mode                    : Constant
Bit rate                         : 128 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 10.0 MiB (8%)
Alignment                        : Aligned on interleaves
Interleave, duration             : 24 ms (0.60 video frame)

General
ID                               : 1
Complete name                    : D:\dvb\analysis\working.ts
Format                           : MPEG-TS
File size                        : 429 MiB
Duration                         : 10mn 56s
Overall bit rate                 : 5 480 Kbps

Video
ID                               : 224 (0xE0)
Menu ID                          : 258 (0x102)
Format                           : MPEG Video
Format version                   : Version 2
Format profile                   : Main@Main
Format settings, Matrix          : Default
Duration                         : 10mn 56s
Bit rate mode                    : Variable
Bit rate                         : 4 844 Kbps
Nominal bit rate                 : 10 000 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Standard                         : PAL
Colorimetry                      : 4:2:0
Scan type                        : Interlaced
Scan order                       : Top Field First
Bits/(Pixel*Frame)               : 0.467
Stream size                      : 380 MiB (88%)

Audio
ID                               : 192 (0xC0)
Menu ID                          : 258 (0x102)
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Duration                         : 10mn 57s
Bit rate mode                    : Constant
Bit rate                         : 256 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Video delay                      : -76ms
Stream size                      : 20.1 MiB (5%)
Language                         : German
Language, more info              : Clean effects

Text
ID                               : 144 (0x90)
Menu ID                          : 258 (0x102)
Format                           : Teletext
Language                         : German



Luisppk
Amateur
Amateur
Posts: 42
Joined: Wed Aug 26, 2009 10:33 am

Re: Inconsistent output when h.264 to avi (xvid)

Post by Luisppk » Wed Aug 26, 2009 11:24 am

Hi.

I got a similar problem. Except, i'm trying to convert h264(mp4)+aac(2 chan) to Xvid 2pass + mp3 cbr 128.
Vlc looks with no inferior time line, and when i try Gspot 2.70a, file Container data says:

"Corrupt Avi Header
- Chunk: /RIFF:AVI
- Offset: 0x00001004
- Value0xffffeff8
AVI v1.0
Video: 95.2 MB (81.01%)
Audio:21.6 MB (18.42%)
AVI Overhead 694 KB (0.58%)
"

And one thing i noticed, in the AUDIO field says....

0x0055 (MP3) ... Instead of... 0x0055 MPEG-1 Layer 3


I worked fine with previous versions, until i tried Media coder v4488. I quickly discarded it an return to previous. Also Isee how quickly the new versions were arriving. So when i found v4495, i think.... ¡Thats it!.....
Obviously not....

I work also with Virtualdubmod, with a lot of improves an plugins to solve problems like this. Unfortunaly, can't convert files from H264... but thats why i got Media coder too.

I take the converted corrupt file into VDmod and it says...

"keyframe flag reconstruction was not specified in open options and the video stream is not a known keyframe-only type.
AVI: Index not found or damaged -- reconstructing via file scan."


It also throw the common error at the beggining, about VBR audio. Which surprises a lot of me, because I encoded CBR 128 in media coder.

Well... I used in VDmod Fast Recompress with Xvid codec, at the same compression (in Media coder) with only 1 pass..... and..... ¡¡¡WORKS!!!

Obviously, i see more new versions coming through Media coder... Hope get it done soon.
Me... I'm going back to previous version again... and my VDmod... with 5 years (or more)and no great update in basic program, still giving solutions.

Bye... SYL

L.

---------------------------- New data coming! --------------------------------------

I really hate got beaten by anyone or anything... that includes Media coder...

So... I study the facts... including the previous report from Takilara...
I've noticed he explains something about Helix mp3...
(Strange, the preset mentions helixmp3, ive tried Helix Mp3 to see if it was lame's fault, but no change, but mediacoder is set to use lame, not helix now...)
So... i download again v4495, and installed Helix and fraunhoffer. Do the same job, first with Helix and... ¡WORKS!. Then I try Fraunhoffer and ... ¡Works too!

Just to give it an opportunity, I tried Lame again.... nothing...

I decide to stay with Franshoffer. I know now Lame is the problem.
By the time I'm writing this , i just already transcode 10 diferent files with great success. (I also prove it in my DVD standalone player.)

So... ¡Thats it! Hope you (all) can wort it out too...

Best regards...

L.

Post Reply