freeMXF.org

Open discussion about freeMXF.org tools and MXF in general
It is currently Mon Nov 19, 2018 4:01 am
Board index » MXF Categories » General MXF



Post new topic Reply to topic  [ 4 posts ] 
Author
Search for:
Message

Offline
Board User

Joined: Fri Nov 09, 2007 8:47 pm
Posts: 5

Post Posted: Fri Nov 09, 2007 10:31 pm 
Top  
I'm trying to find out what's needed to get VLC play some MXFlib wrappings.

Mpeg only frame wrapped op1a are ok.
Audio only frame wrapped op1a are almost ok, no sound because VLC sees no codec : "undefined". (see fix below)

However Mpeg+Audio doesn't work at all...
Any idea why ?

Fix to get VLC play op1a wav wrapped files :

in esp_wavpecm.cpp
Code:
// set Little endian order s16l
Ret->SetValue(SoundEssenceCompression_UL, DataChunk(16,SoundEssenceCompressionS16L_UL_Data));


in ulmap.h
Code:
const UInt8 SoundEssenceCompressionS16L_UL_Data[16] = {  0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x04, 0x02, 0x02, 0x01, 0x7f, 0x00, 0x00, 0x00 };
const UL SoundEssenceCompressionS16L_UL(SoundEssenceCompressionS16L_UL_Data);


Thanks.

 Profile  

Offline
Board User

Joined: Fri Nov 09, 2007 8:47 pm
Posts: 5

Post Posted: Sat Nov 10, 2007 2:04 pm 
Top  
I asked the ffmpeg team to give a look why it doesn't play and I got this :

Quote:
Reimar Döffinger <bugs@reimardoeffinger.de> added the comment:

The header of that files gives the track ID for both sound and video
track as 0x15010501 (which is obviously nonsense since they can't both
have the same one).
The track ID of the actual audio track is 0x16010101, but that is
discarded since it is not in the headers.
I do not know the details of the specs but I would guess the file is broken.

...

More precisely, I think it violates SMPTE 379, section "7.3 Element to track
relationship"



I'll give a look if I can find some tweak to get around this.

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Mon Nov 19, 2007 12:18 pm 
Top  
You are right - this is a bug in mxfwrap.

To fix it:

Move this line ~1340 of mxfwrap.cpp:
Code:
         // The source will have be allocated a StreamID when added to the BodyStream - we need that for track linking later
         TrackInfoList.back()->EssenceID = Source->GetStreamID();

To just after this line at ~ 1360 of mxfwrap.cpp:
Code:
         // Add this stream to the body writer (first pass only)
         if(iTrack == 0) Writer->AddStream(Streams.front());


Then change:
Code:
Streams.back()->GetTrackNumber()

to:
Code:
Streams.back()->GetTrackNumber(TrackInfoList.back()->EssenceID)

in each of the siz AddxxxTrack() lines at ~1500 to 1530 of mxfwrap.cpp

 Profile WWW  

Offline
Board User

Joined: Fri Nov 09, 2007 8:47 pm
Posts: 5

Post Posted: Mon Dec 10, 2007 11:34 am 
Top  
Yes it does the job perfectly.

Thank you.

 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Jump to:  


Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group :: Style based on FI Subice by phpBBservice.nl :: All times are UTC