Log in

View Full Version : joining mismatching asf video parts


lovelove
2nd September 2011, 03:11
Hi. I have two short video clips I would like to join (without re-encoding, since they are in poor quality and I don't want to degrade the quality any further ... or end up with ridiculously big files for very low quality source video). Both are wmv/wma streams in asf containers, but have different properties (different fps, mismatching height, different audio properties, etc.) as quoted below.

Smart money says you can't join mismatching videos, so I decided to re-encode clip 1 (because I only need the first 10 seconds of it, whereas I need the entire 5m 48s of the second clip ... and I can live with degrading the first 10 seconds of the joined clip due to re-encoding, if there is no other way) to match the properties of clip 2.

However, joining them was impossible. I tried 10+ different tools (ASFtools, ASFbinwin, ASFjoin, Steeper, VirtualDub1.3, and many others ...), all failed. (http://forum.doom9.org/showthread.php?p=1522837#post1522837) (post #155 and following). The final stumbling block was "compatibility error: audio block aligns are different". No way around this.

So my 2 questions are:

(1) what would you do to join the 2 clips?

(2) could this (http://forum.doom9.org/showthread.php?t=162423) be of any help?

Here are the 2 clips if someone wants to give it a try (both URLs have identical content, you can choose):
http://www.mediafire.com/file/ni64rrr4dse6btr/clip1+clip2.7z
https://rapidshare.com/files/3804810300/clip1_clip2.7z
(11.29 MB)

many :thanks:

http://img193.imageshack.us/img193/3827/20110902061825screenhun.png

clip 1:
Complete name : F:\clip1.wmv
Format : Windows Media
File size : 28.7 MiB
Duration : 6mn 0s
Overall bit rate mode : Constant
Overall bit rate : 669 Kbps
Maximum Overall bit rate : 674 Kbps
Application : Windows Movie Maker 2.1.4026.0

Video
ID : 2
Format : VC-1
Format profile : MP@LL
Codec ID : WMV3
Codec ID/Info : Windows Media Video 9
Codec ID/Hint : WMV3
Description of the codec : Windows Media Video 9
Duration : 6mn 0s
Bit rate mode : Constant
Bit rate : 600 Kbps
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Resolution : 24 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.260
Stream size : 25.8 MiB (90%)

Audio
ID : 1
Format : WMA
Format version : Version 2
Codec ID : 161
Codec ID/Info : Windows Media Audio
Description of the codec : Windows Media Audio 9.1 - 64 kbps, 44 kHz, stereo (A/V) 1-pass CBR
Duration : 6mn 0s
Bit rate mode : Constant
Bit rate : 64.0 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Resolution : 16 bits
Stream size : 2.75 MiB (10%)


clip1 (re-encoded to match clip2):
Complete name : F:\clip1 (reencoded to match clip2).asf
Format : Windows Media
File size : 1.32 MiB
Duration : 11s 100ms
Overall bit rate mode : Variable
Overall bit rate : 1 000 Kbps
Maximum Overall bit rate : 1 055 Kbps
Encoded date : UTC 2011-09-01 00:32:42.703

Video
ID : 2
Format : VC-1
Format profile : MP@ML
Codec ID : WMV3
Codec ID/Info : Windows Media Video 9
Codec ID/Hint : WMV3
Description of the codec : Windows Media Video 9
Duration : 11s 100ms
Bit rate mode : Variable
Bit rate : 1 023 Kbps
Width : 356 pixels
Height : 240 pixels
Display aspect ratio : 1.483
Frame rate : 30.000 fps
Resolution : 24 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.399
Stream size : 1.35 MiB

Audio
ID : 1
Format : WMA
Format version : Version 2
Codec ID : 161
Codec ID/Info : Windows Media Audio
Description of the codec : Windows Media Audio V2 - 20 kbps, 22 kHz, mono
Duration : 11s 100ms
Bit rate mode : Constant
Bit rate : 20.0 Kbps
Channel(s) : 1 channel
Sampling rate : 22.05 KHz
Resolution : 16 bits
Stream size : 27.1 KiB (2%)


clip 2:
Complete name : F:\clip2.asf
Format : Windows Media
File size : 8.56 MiB
Duration : 5mn 48s
Overall bit rate mode : Constant
Overall bit rate : 206 Kbps
Maximum Overall bit rate : 211 Kbps

Video
ID : 2
Format : VC-1
Format profile : MP@ML
Codec ID : WMV3
Codec ID/Info : Windows Media Video 9
Codec ID/Hint : WMV3
Description of the codec : Windows Media Video 9
Duration : 5mn 48s
Bit rate mode : Constant
Bit rate : 180 Kbps
Width : 356 pixels
Height : 240 pixels
Display aspect ratio : 1.483
Frame rate : 15.000 fps
Resolution : 24 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.140
Stream size : 7.47 MiB (87%)

Audio
ID : 1
Format : WMA
Format version : Version 2
Codec ID : 161
Codec ID/Info : Windows Media Audio
Description of the codec : Windows Media Audio 9.1 - 20 kbps, 22 kHz, mono 1-pass CBR
Duration : 5mn 48s
Bit rate mode : Constant
Bit rate : 20.0 Kbps
Channel(s) : 1 channel
Sampling rate : 22.05 KHz
Resolution : 16 bits
Stream size : 851 KiB (10%)

setarip_old
2nd September 2011, 06:33
Your re-encoded Clip1 ("To match Clip2") indicates a VARIABLE overall bitrate, while Clip2 indicates a CONSTANT overall bitrate.

(Your original Clip1 indicated a CONSTANT overall bitrate)...

Midzuki
2nd September 2011, 09:52
Hummm, maybe the "root" of the problem is in the fact that "clip1" and "clip2" were encoded at different framerates :confused: If I am not mistaken, the WMV9 bitstream may include some type of "average-framerate" flag, and a sudden change of that in the middle of the playback would explain why the DMO decoder "freezes" :scared:

( yep, only now I perceive that I forgot :o to test those pesky WMVs and MKVs with the libav decoder
:stupid: )

So please reencode clip1 @ 15fps too, and check whether this will make some difference (and for better, hopefully).

lovelove
2nd September 2011, 13:45
thank you all.

@ 15fps: I thought one framerate change would be permissible
(since there are files with variable framerate anyway and they change framerate all the time).

@ vbr: that's because my encoder didn't handle cbr very well.
And I was hoping "join incompatible bitrates" could handle this later. :o

http://666kb.com/i/aijck9sut68tyme5y.jpg

anyway, I'll try to reencode again to fix these parameters.
I never needed to encode to wmv before (and hope it will be limited to exceptional cases like this),
so what (small+tidy) wmv encoder would you recommend?

Midzuki
2nd September 2011, 18:44
Just for the record, I managed to extract the timecodes from both ASF1 and ASF2, and I used them in MKVmerge, whose GUI told me "everything had run fine" :) Except that the resulting "finalclip.mkv" would not play smoothly beyond the tenth second, of course. :rolleyes:

Regarding WMV encoders, I like only WmNicEnc and the .VBS file mod by zambelli.

As for VFR in WMV... well, I presume that only the Microsoft tools and people know the right recipe :(
I mean, they offer to the end-user ZER0 tools and ZER0 knowledge :mad: for full-featured creation and manipulation of ASF files. Quite on the contrary, they keep expecting that everybody should be very happy with infantile applications such as Windows Media Encoder, Windows Movie Maker and Expression Encoder.

lovelove
2nd September 2011, 23:57
.VBS file mod by zambelli. thank you. Is this (http://forum.doom9.org/showthread.php?p=974126#post974126) the tool you are referring to?

Midzuki
3rd September 2011, 00:00
thank you. Is this (http://forum.doom9.org/showthread.php?p=974126#post974126) the tool you are referring to?

Triple "yes".