ffmpeg removendo o terceiro fluxo não está funcionando

6

Eu tenho arquivos com um terceiro fluxo, que podem ser alguns metadados do FCP. Esta é a saída do ffprobe:

ffprobe 00700.mov  
ffprobe version 2.0.1 Copyright (c) 2007-2013 the FFmpeg developers  
  built on Aug 27 2013 20:17:24 with gcc 4.5 (SUSE Linux)  
  configuration: --enable-gpl --enable-shared --enable-libmp3lame --enable-libxvid  --enable-libx264 --enable-nonfree --enable-postproc --enable-version3  
  libavutil      52. 38.100 / 52. 38.100  
  libavcodec     55. 18.102 / 55. 18.102  
  libavformat    55. 12.100 / 55. 12.100  
  libavdevice    55.  3.100 / 55.  3.100  
  libavfilter     3. 79.101 /  3. 79.101  
  libswscale      2.  3.100 /  2.  3.100  
  libswresample   0. 17.102 /  0. 17.102  
  libpostproc    52.  3.100 / 52.  3.100  
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x806f860] multiple edit list entries, a/v desync might occur, patch welcome  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '00700.mov':  
  Metadata:  
    major_brand     : qt    
    minor_version   : 537199360  
    compatible_brands: qt    
    creation_time   : 2013-06-11 15:57:03  
  Duration: 00:02:41.56, start: 0.000000, bitrate: 48439 kb/s  
    Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], 45873 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc  
    Metadata:  
      creation_time   : 2013-06-11 15:57:03  
      handler_name    : Apple Alias Data Handler  
      timecode        : 01:00:00:00  
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 2 channels, s32, 2304 kb/s  
    Metadata:  
      creation_time   : 2013-06-11 15:57:03  
      handler_name    : Apple Alias Data Handler  
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74)  
    Metadata:  
      creation_time   : 2013-06-11 15:58:45  
      handler_name    : Apple Alias Data Handler  
      timecode        : 01:00:00:00  
Unsupported codec with id 0 for input stream 2  

Agora eu quero remover o terceiro fluxo (fluxo 2)

Então eu uso:

ffmpeg -i 00700.mov -vcodec copy -acodec copy -map 0:0 -map 0:1 testout.mov  
ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers  
  built on Aug 27 2013 20:17:24 with gcc 4.5 (SUSE Linux)  
  configuration: --enable-gpl --enable-shared --enable-libmp3lame --enable-libxvid   --enable-libx264 --enable-nonfree --enable-postproc --enable-version3  
  libavutil      52. 38.100 / 52. 38.100  
  libavcodec     55. 18.102 / 55. 18.102  
  libavformat    55. 12.100 / 55. 12.100  
  libavdevice    55.  3.100 / 55.  3.100  
  libavfilter     3. 79.101 /  3. 79.101  
  libswscale      2.  3.100 /  2.  3.100  
  libswresample   0. 17.102 /  0. 17.102  
  libpostproc    52.  3.100 / 52.  3.100  
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8086ca0] multiple edit list entries, a/v desync might occur, patch welcome  
Guessed Channel Layout for  Input Stream #0.1 : stereo  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '00700.mov':  
  Metadata:  
    major_brand     : qt    
    minor_version   : 537199360  
    compatible_brands: qt    
    creation_time   : 2013-06-11 15:57:03  
  Duration: 00:02:41.56, start: 0.000000, bitrate: 48439 kb/s  
    Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], 45873 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc  
    Metadata:  
      creation_time   : 2013-06-11 15:57:03  
      handler_name    : Apple Alias Data Handler  
      timecode        : 01:00:00:00  
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s  
    Metadata:  
      creation_time   : 2013-06-11 15:57:03  
      handler_name    : Apple Alias Data Handler  
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74)  
    Metadata:  
      creation_time   : 2013-06-11 15:58:45  
      handler_name    : Apple Alias Data Handler  
      timecode        : 01:00:00:00  
Output #0, mov, to 'testout.mov':  
  Metadata:  
    major_brand     : qt    
    minor_version   : 537199360  
    compatible_brands: qt    
    encoder         : Lavf55.12.100  
    Stream #0:0(eng): Video: mpeg2video (xd5c / 0x63356478), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 45873 kb/s, 25 fps, 12800 tbn, 25 tbc   
    Metadata:  
      creation_time   : 2013-06-11 15:57:03  
      handler_name    : Apple Alias Data Handler  
      timecode        : 01:00:00:00  
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, 2304 kb/s
    Metadata:  
      creation_time   : 2013-06-11 15:57:03  
      handler_name    : Apple Alias Data Handler
Stream mapping:  
  Stream #0:0 -> #0:0 (copy)  
  Stream #0:1 -> #0:1 (copy)  
Press [q] to stop, [?] for help  
frame=   45 fps=0.0 q=-1.0 size=   11470kB time=00:00:02.00 bitrate=46982.6kbitsframe=   99 fps= 99 q=-1.0 size=   25263kB time=00:00:04.00 bitrate=51738.5kbitsframe=  154 fps=101 q=-1.0 size=   38805kB time=00:00:06.12 bitrate=51942.3kbitsframe=  178 fps= 88 q=-1.0 size=   45189kB time=00:00:07.08 bitrate=52286.0kbitsframe=  211 fps= 82 q=-1.0 size=   53860kB time=00:00:09.00 bitrate=49024.2kbitsframe=  239 fps= 78 q=-1.0 size=   61190kB time=00:00:10.00 bitrate=50126.7kbitsframe=  269 fps= 73 q=-1.0 size=   68671kB time=00:00:11.00 bitrate=51140.9kbitsframe=  299 fps= 71 q=-1.0 size=   76513kB time=00:00:12.00 bitrate=52232.9kbitsframe=  332 fps= 69 q=-1.0 size=   83237kB time=00:00:13.24 bitrate=51501.1kbitsframe=  360 fps= 66 q=-1.0 size=   91908kB time=00:00:15.00 bitrate=50193.9kbits  ...and so on till  
frame= 4041 fps= 51 q=-1.0 size=  950203kB time=00:02:42.00 bitrate=48049.8kbitsframe= 4060 fps= 51 q=-1.0 Lsize=  955158kB time=00:02:42.40 bitrate=48181.4kbits/s    
video:909397kB audio:45675kB subtitle:0 global headers:0kB muxing overhead 0.008987%

Então, novamente eu uso o ffprobe:

ffprobe testout.mov   
ffprobe version 2.0.1 Copyright (c) 2007-2013 the FFmpeg developers  
  built on Aug 27 2013 20:17:24 with gcc 4.5 (SUSE Linux)  
  configuration: --enable-gpl --enable-shared --enable-libmp3lame --enable-libxvid   --enable-libx264 --enable-nonfree --enable-postproc --enable-version3  
  libavutil      52. 38.100 / 52. 38.100  
  libavcodec     55. 18.102 / 55. 18.102  
  libavformat    55. 12.100 / 55. 12.100  
  libavdevice    55.  3.100 / 55.  3.100  
  libavfilter     3. 79.101 /  3. 79.101  
  libswscale      2.  3.100 /  2.  3.100  
  libswresample   0. 17.102 /  0. 17.102  
  libpostproc    52.  3.100 / 52.  3.100  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testout.mov':  
  Metadata:  
    major_brand     : qt    
    minor_version   : 512  
    compatible_brands: qt    
    encoder         : Lavf55.12.100  
  Duration: 00:02:42.40, start: 0.000000, bitrate: 48181 kb/s  
    Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], 45873 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc  
    Metadata:  
      handler_name    : DataHandler  
      timecode        : 01:00:00:00  
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s  
    Metadata:  
      handler_name    : DataHandler  
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74)  
    Metadata:  
      handler_name    : DataHandler  
      timecode        : 01:00:00:00  
Unsupported codec with id 0 for input stream 2 

Por que não está removendo o fluxo 2? O que estou perdendo?

    
por Rajib 09.12.2013 / 07:10

2 respostas

8

Geralmente, não faço ideia do motivo de não estar mapeado como deveria. Mas eu encontrei uma solução para isso:

ffmpeg -i 01300.mov -filter_complex "[0:v]null[video_out];[0:a]anull[audio_out]" -map [video_out] -map [audio_out] out.mov

Parece que o ffmpeg não pode mapear este terceiro fluxo corretamente.

    
por 09.12.2013 / 14:48
2

Respondendo a isso, uma vez que aparece na pesquisa do Google (para ajudar outras pessoas à procura de soluções).

Isso foi corrigido a partir deste ticket, link , e você pode se livrar da faixa adicionando -write_tmcd 0 para o comando ffmpeg.

Isso é especificamente para uma faixa Data (tmcd) . Para outros (legendas, dados em geral, etc.), uma combinação de -dn , -map -0:d e comandos semelhantes deve ajudar.

    
por 24.08.2017 / 16:27