wyodrębnianie surowego strumienia wideo h264 z mp4 lub flv za pomocą ffmpeg generuje niepoprawny strumień

Próbuję wyodrębnić strumień wideo z wideo mp4 lub flv h264 (wideo youtube) za pomocą ffmpeg. Oryginalny film (test.flv) gra bez problemów z ffplay, ffprobe wyświetla następujący błąd:

ffprobe version N-55515-gbbbd959 Copyright (c) 2007-2013 the FFmpeg developers
built on Aug 13 2013 18:06:32 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 27.100 / 55. 27.100
  libavformat    55. 13.102 / 55. 13.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  4.100 /  2.  4.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
[flv @ 000000000031ea80] Stream discovered after head already parsed
Input #0, flv, from 'test.flv':
  Metadata:
    starttime       : 0
    totalduration   : 142
    totaldatarate   : 692
    bytelength      : 12286492
    canseekontime   : true
    sourcedata      : B42B95507HH1381414522145462
    purl            :
    pmsg            :
  Duration: 00:02:22.02, start: 0.000000, bitrate: 692 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x268, 568 kb/s, 23.98 tbr, 1k t
bn, 47.95 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s
    Stream #0:2: Data: none
Unsupported codec with id 0 for input stream 2

aby pozbyć się dodatkowych strumieni (potrzebuję tylko wideo) użyłem następującej linii poleceń ffmpeg:

ffmpeg -i test.flv -map 0:0 -vcodec copy -an -f h264 test.h264

Nowy strumień jest nieczytelny dla żadnego odtwarzacza, w tym dla ffplay i powoduje błąd w ffprobe: test.h264: Znaleziono nieprawidłowe dane podczas przetwarzania inputq = 0B f = 0/0

Każde ciało ma pojęcie o tym, co robię źle?

Próbowałem też prostszej linii poleceń youtube:

ffmpeg -i test.flv -vcodec copy -an test.h264

jeśli używam innego formatu (na przykład avi):

ffmpeg -i test.flv -vcodec copy -an test.avi

wideo wyjściowe jest prawidłowe.

Jeśli transkoduję wideo

ffmpeg -i test.flv -an test.h264

wyjście jest również poprawne

Jakieś sugestie?

questionAnswers(1)

yourAnswerToTheQuestion