I am trying to extract a video stream from mp4 or flv h264 video (youtube video) using ffmpeg. The original video (test.flv) plays without problems with ffplay, ffprobe produces the following error:
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
to get rid of extra streams (I only need video) I used the following ffmpeg command line:
ffmpeg -i test.flv -map 0:0 -vcodec copy -an -f h264 test.h264
The new stream is not read by any player, including ffplay, and gives an error with ffprobe: test.h264: Invalid data found during processing inputq = 0B f = 0/0
Does any body have an idea of what I'm doing wrong?
I also tried the simplified youtube command line:
ffmpeg -i test.flv -vcodec copy -an test.h264
if I use another format (e.g. avi):
ffmpeg -i test.flv -vcodec copy -an test.avi
the output video is valid.
If I recode a video
ffmpeg -i test.flv -an test.h264
the conclusion is also valid
Any suggestions?
dhia
source share