Log in

View Full Version : ASF files with AVC video


frubsen
20th November 2013, 19:23
Hi all,

I have a whole bunch of ASF files that look to have AVC encoded video.

General
Complete name : H:\SD Card 1\2011-07-30\F174407N3A4P0.asf
Format : Windows Media
File size : 4.36 MiB
Duration : 47s 940ms
Overall bit rate mode : Variable
Overall bit rate : 762 Kbps
Maximum Overall bit rate : 2 097 Kbps
Encoded date : UTC 1970-01-01 00:00:00.000

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Codec ID : H264
Bit rate mode : Variable
Bit rate : 725 Kbps
Width : 352 pixels
Height : 240 pixels
Display aspect ratio : 3:2
Frame rate mode : Variable
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 16 bits
NTSC : 1

General
Complete name : H:\SD Card 1\2011-07-30\F174407N1A2P0.asf
Format : Windows Media
File size : 5.27 MiB
Duration : 47s 929ms
Overall bit rate mode : Variable
Overall bit rate : 922 Kbps
Maximum Overall bit rate : 2 097 Kbps
Encoded date : UTC 1970-01-01 00:00:00.000

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Codec ID : H264
Bit rate mode : Variable
Bit rate : 878 Kbps
Width : 704 pixels
Height : 480 pixels
Display aspect ratio : 3:2
Frame rate mode : Variable
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 16 bits
NTSC : 1

I can play both types of files in VLC no problem. The problem is, I would like to be able to edit them in Premiere however it doesn't recognize the files.

I can create an avs file with only 'directshowsource(file.asf)' and programs like virtualdub will open them, however only the ones that are 704x480. I can't get the other ones to open with the avs script.

What would be my course of action to batch convert all these files? I have probably over 1000. They are recorded from a helmet cam, where it would record 4 angles of video at once.

Blue_MiSfit
20th November 2013, 23:11
Use ffmpeg to remux to mp4 or something that is more common than ASF.

frubsen
21st November 2013, 02:02
geez I tried that this afternoon with ffmpeg and it wasn't working but I just tried again and it seemed to work. Must have been using the wrong parameters.

Thanks.

benwaggoner
22nd November 2013, 17:18
I'm curious where you got these files from?

They have a messed up DAR and file creation date, among other things. When I was at Microsoft we made an official decision not to support H.264 in ASF as ASF was not a friendly container for content where the display and decode order was different. Even supporting B-frames in VC-1 for ASF was quite the hack.

That was a primary reason why Smooth Streaming used fMP4 from the get-go instead of ASF.

Blue_MiSfit
23rd November 2013, 07:37
^^ Always good to get the behind-the-scenes on things, Ben. Thanks for posting.

frubsen
25th November 2013, 04:39
I'm not exactly sure of the source. Someone gave me the files and wanted them put on a DVD. All I know is that it was some type of recording device that recorded 4 angles (360 degrees) of video at once. So 4 streams of video at once. I was able to bring it into Premiere and squeeze each of them back to have them all fit on the screen at once.

My plan was to match them up perfectly, however I discovered that the 4 files of each recording do not match up perfectly. It seems the device wasn't frame accurate on starts and stops.

I've never seen AVC video wrapped in a ASF wrapper so it kind of stumped me heh

filler56789
25th November 2013, 05:45
When I was at Microsoft we made an official decision not to support H.264 in ASF as ASF was not a friendly container for content where the display and decode order was different. Even supporting B-frames in VC-1 for ASF was quite the hack.
Just for the record...

until the beginning of this year, the page http://en.wikipedia.org/wiki/Comparison_of_container_formats still had a useless column entitled "Support for B-frames". Since it clearly had no other purpose than "bash AVI" ;) , I boldly deleted it :) However, several months before this, I had already set the flag to "FALSE" for the ASF container. :sly: And I really became very-amazed on the day that I first read the content below
( from http://lists.ffmpeg.org/pipermail/ffmpeg-devel-irc/2012-June/000751.html ):

[13:29] <burek> sweet :) http://en.wikipedia.org/wiki/Comparison_of_container_formats
[14:17] <av500> asf does not support b-frames, interesting
[14:17] <av500> vc1 with b-frames in ASF works fine....
[14:18] <JEEB> as far as I know ASF is just fine with b-frames
[14:18] <JEEB> it's not AVI after all
[14:18] <JEEB> tl;dr "lol wikipedia" most probably

So apparently JEEB and the others didn't know WMV9 with B-frames depends on a hack on the decoder side :)
Bottom line is, the ASF timestamps have no other goal than supporting variable framerate
( read: tons of dropped frames :devil: :D ).