@OKNOZA

В чем ошибка выходного файла?

Есть входной поток HTTP, его нужно нарезать и перевести в M3u8 (HLS), но FFmpeg ругается.
ffmpeg version N-62014-g6537b89 Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr  1 2014 05:32:36 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
  libavutil      52. 70.100 / 52. 70.100
  libavcodec     55. 55.107 / 55. 55.107
  libavformat    55. 36.100 / 55. 36.100
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
[mpeg2video @ 0x2cb81a0] Invalid frame dimensions 0x0.
    Last message repeated 1 times
Input #0, mpegts, from 'http://127.0.0.1:1234':
  Duration: N/A, start: 58734.138356, bitrate: 155 kb/s
  Program 20708 
    Metadata:
      service_name    : ?8
      service_provider: ?HTB+
    Stream #0:0[0x152]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 5000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1c0](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 155 kb/s
[flv @ 0x2cb2e80] Tag [2][0][0][0]/0x00000002 incompatible with output codec id '2' ([0][0][0][0])
Output #0, flv, to 'rtmp://localhost/myapp/live':
    Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, max. 5000 kb/s, 25 fps, 90k tbn, 90k tbc
    Stream #0:1(rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, 155 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
ffmpeg version N-62014-g6537b89 Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr  1 2014 05:32:36 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
  libavutil      52. 70.100 / 52. 70.100
  libavcodec     55. 55.107 / 55. 55.107
  libavformat    55. 36.100 / 55. 36.100
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
[mpeg2video @ 0x3b7f1a0] Invalid frame dimensions 0x0.
    Last message repeated 3 times
[mpegts @ 0x3b71440] PES packet size mismatch
[mpeg2video @ 0x3b7f1a0] Invalid frame dimensions 0x0.
    Last message repeated 1 times
[mpegts @ 0x3b71440] DTS 5286170008 < 5286702808 out of order
[mpeg2video @ 0x3b7f1a0] Invalid frame dimensions 0x0.
    Last message repeated 3 times
[mpegts @ 0x3b71440] PES packet size mismatch
[mpeg2video @ 0x3b7f1a0] Invalid frame dimensions 0x0.
    Last message repeated 15 times
Input #0, mpegts, from 'http://127.0.0.1:1234':
  Duration: N/A, start: 58740.786367, bitrate: 160 kb/s
  Program 20708 
    Metadata:
      service_name    : ?8
      service_provider: ?HTB+
    Stream #0:0[0x152]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 5000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1c0](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 160 kb/s
[flv @ 0x3b82b00] Tag [2][0][0][0]/0x00000002 incompatible with output codec id '2' ([0][0][0][0])
Output #0, flv, to 'rtmp://localhost/myapp/live':
    Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, max. 5000 kb/s, 25 fps, 90k tbn, 90k tbc
    Stream #0:1(rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, 160 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input

Вот эта строчка меня смущает.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
  • Вопрос задан
  • 6152 просмотра
Пригласить эксперта
Ответы на вопрос 1
@OKNOZA Автор вопроса
Сам запрос.
exec_static /usr/local/bin/ffmpeg -i http://127.0.0.1:1234 -c:v libx264 -s 720x576 -b:v 500k -c:a libfaac -ar 44100 -ac 2  -f flv rtmp://localhost/myapp/live 2>>/var/log/nginx/ffmpeg.log;
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы