Hello,

I am involved in a project that is creating a video viewer/editor that reads 
information from a Transport stream.  The input file transport stream contains 
video, audio and KLV formatted data streams. My application allows the user to 
select a start and end point within the source file and save all stream 
information between these points to a new transport stream file. There is a 
'nice to have' requirement that asks for the output files to be generated in 
MXF format.

My code works by performing an av_seek to the appropriate point in the library. 
It then reads each packet in turn from the input file and writes it to the 
output file. This has proven successful when the output file has an extension 
of ".ts". When the output file extension is ".mxf", the writing of the header 
fails to output the data streams.

My question is "Are data streams supported when outputting a transport stream 
(.ts) to a .mxf file?"

As an additional test, I have tried to use the command line avconv to perform a 
conversion. Typing the command "avconv -i infile.ts outfile.mxf" resulted in 
the following output.

anthony.venables@localhost:/mercury/VIDEO_FILES> /usr/share/libav/avconv -i 
infile.ts outfile.mxf
avconv version 11.4, Copyright (c) 2000-2014 the Libav developers
  built on Jul 17 2015 08:43:40 with gcc 4.3 (SUSE Linux)
[h264 @ 0x8f53900] SEI type 1 truncated at 65
    Last message repeated 5 times
[mpegts @ 0x8f4e020] Continuity check failed for pid 192 expected 0 got 15
Guessed Channel Layout for  Input Stream #0.3 : stereo
Input #0, mpegts, from 'infile.ts':
  Duration: 00:00:33.44, start: 34250.181256, bitrate: 15924 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: Libav
  No Program
    Stream #0.0[0xbd]: Data: [0][0][0][0] / 0x0000
    Stream #0.1[0xfc]: Data: [0][0][0][0] / 0x0000
    Stream #0.2[0xe0]: Video: h264 (Main), yuv420p, 1280x720, 50 fps, 90k tbn, 
100 tbc
    Stream #0.3[0xc0]: Audio: mp2, 44100 Hz, 2 channels, s16p, 128 kb/s
[mpeg2video @ 0x8f54860] MPEG1/2 does not support 90000/1 fps
Output #0, mxf, to 'outfile.mxf':
    Stream #0.0: Video: mpeg2video, q=2-31, 200 kb/s
    Metadata:
      encoder         : Lavc56.1.0 mpeg2video
    Stream #0.1: Audio: pcm_s16le, 0 channels
    Metadata:
      encoder         : Lavc56.1.0 pcm_s16le
Stream mapping:
  Stream #0:2 -> #0:0 (h264 (native) -> mpeg2video (native))
  Stream #0:3 -> #0:1 (mp2 (native) -> pcm_s16le (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters 
such as bit_rate, rate, width or height
anthony.venables@localhost:/mercury/VIDEO_FILES>

As you can see, the output file only has two streams, a video and an audio 
stream. I understand that the command line call is missing some information to 
allow conversion of the video and audio correctly, but this is a secondary 
issue at this point.


Anthony Venables
Senior Software Engineer

Information Fusion
Airbus Group Innovations UK
Quadrant Campus, Celtic Springs, NP10 8FZ, Newport, UK
Office: +441179361588
E-mail: 
anthony.venables.exter...@airbus.com<mailto:anthony.venables.exter...@airbus.com>




<html><head></head><body><font color="black" face="arial" size="2">
The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.
</font>
</body>
</html>

_______________________________________________
libav-api mailing list
libav-api@libav.org
https://lists.libav.org/mailman/listinfo/libav-api
  • [libav-api] Exporting a M... VENABLES, Anthony (HQ Supplier for Airbus Group)

Reply via email to