sean-mahon / ffmbc

Automatically exported from code.google.com/p/ffmbc
0 stars 0 forks source link

Unable to create more than one audio track in MXF output (with GXF Source file) #162

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I want to rewrap a GXF to MXF without recoding the streams.

An MXF output is created that plays in VLC okay but only 1 audio track 
(confirmed with Mediainfo).  I cannot seem to get an MXF output file with both 
tracks of audio from the source file.

Both audio tracks are detected correctly on the GXF input file and listed by 
ffmbc.

I tried to add mapping to select both audio tracks but I get "Number of stream 
maps must match number of output streams" error.  If I remove the second audio 
map, or all mapping then it transcodes with only 1 audio track.

FFmbc version 0.7-rc8
Windows 7 Professional 64bit

C:\Transcode\ffmpeg\bin>ffmbc -v 3 -i c:\Transcode\transcodein\TEST.GXF -vcodec 
copy -acodec copy -map 0:0 -map 0:1 -map 0:2 -y 
C:\Transcode\transcodeout\TEST.MXF
FFmbc version 0.7-rc8
Copyright (c) 2008-2013 Baptiste Coudurier and the FFmpeg developers
Input #0, gxf, from 'c:\Transcode\transcodein\TEST.GXF':
  Duration: 00:00:15.00, bitrate: 16886 kb/s
    Stream #0.0(und): Video: mpeg2video (Main), yuv420p, 720x576i tff [PAR 64:45 DAR 16:9], 15000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.2(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.3(und): Data: unknown (0x0000)
Number of stream maps must match number of output streams

Alternatively, this gets the same result:-

C:\Transcode\ffmpeg\bin>ffmbc -v 3 -i c:\Transcode\transcodein\TEST.GXF -vcodec 
copy -acodec copy -map 0 -y C:\Transcode\transcodeout\TEST.MXF
FFmbc version 0.7-rc8
Copyright (c) 2008-2013 Baptiste Coudurier and the FFmpeg developers
Input #0, gxf, from 'c:\Transcode\transcodein\TEST.GXF':
  Duration: 00:00:15.00, bitrate: 16886 kb/s
    Stream #0.0(und): Video: mpeg2video (Main), yuv420p, 720x576i tff [PAR 64:45 DAR 16:9], 15000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.2(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.3(und): Data: unknown (0x0000)
Number of stream maps must match number of output streams

If remove the -map 0:2 (or all -map) switches, then I get the single track MXF 
output as per the following:-

C:\Transcode\ffmpeg\bin>ffmbc -v 3 -i c:\Transcode\transcodein\TEST.GXF -vcodec 
copy -acodec copy -map 0:0 -map 0:1 -y C:\Transcode\transcodeout\TEST.MXF
FFmbc version 0.7-rc8
Copyright (c) 2008-2013 Baptiste Coudurier and the FFmpeg developers
Input #0, gxf, from 'c:\Transcode\transcodein\TEST.GXF':
  Duration: 00:00:15.00, bitrate: 16886 kb/s
    Stream #0.0(und): Video: mpeg2video (Main), yuv420p, 720x576i tff [PAR 64:45 DAR 16:9], 15000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.2(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.3(und): Data: unknown (0x0000)
Output #0, mxf, to 'C:\Transcode\transcodeout\TEST.MXF':
  Metadata:
    encoder: FFmbc 0.7
    Stream #0.0(und): Video: mpeg2video, yuv420p, 720x576i tff [PAR 64:45 DAR 16:9], stream copy, 25.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, stream copy
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame=  375 fps=2404 Lsize=   29829kB time=00:00:00.00 bitrate=   0.0kbits/s
video:28027kB audio:1402kB global headers:0kB muxing overhead 1.357394%

Alternatively:-

C:\Transcode\ffmpeg\bin>ffmbc -v 3 -i c:\Transcode\transcodein\TEST.GXF -vcodec 
copy -acodec copy -y C:\Transcode\transcodeout\TEST.MXF
FFmbc version 0.7-rc8
Copyright (c) 2008-2013 Baptiste Coudurier and the FFmpeg developers
Input #0, gxf, from 'c:\Transcode\transcodein\TEST.GXF':
  Duration: 00:00:15.00, bitrate: 16886 kb/s
    Stream #0.0(und): Video: mpeg2video (Main), yuv420p, 720x576i tff [PAR 64:45 DAR 16:9], 15000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.2(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Stream #0.3(und): Data: unknown (0x0000)
Output #0, mxf, to 'C:\Transcode\transcodeout\TEST.MXF':
  Metadata:
    encoder: FFmbc 0.7
    Stream #0.0(und): Video: mpeg2video, yuv420p, 720x576i tff [PAR 64:45 DAR 16:9], stream copy, 25.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, stream copy
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame=  375 fps=2671 Lsize=   29829kB time=00:00:00.00 bitrate=   0.0kbits/s
video:28027kB audio:1402kB global headers:0kB muxing overhead 1.357394%

A source TEST.GXF input file can be located here: 
http://www73.zippyshare.com/v/69266115/file.html

Thanks so much for any help you can offer.

Original issue reported on code.google.com by bristolm...@gmail.com on 15 Oct 2013 at 4:35

GoogleCodeExporter commented 8 years ago
You need -newaudio after output file to add another audio track

Original comment by baptiste...@gmail.com on 16 Oct 2013 at 12:18

GoogleCodeExporter commented 8 years ago
Ah.  Thank you so much. I hadn't realised that.  Keep up the great work.

Original comment by bristolm...@gmail.com on 16 Oct 2013 at 1:39