简体   繁体   中英

ffmpeg error when I try to stream on trovo

When I try to start a stream on the trovo, the error av_interleaved_write_frame(): Unknown error appears.

comand:

ffmpeg -i D:\voi.mp4 -c copy -f flv rtmp://livepush.trovo.live/live/<key>

output:

ffmpeg version n4.4.2-2-g7ffb7d4b04-20220630 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --disable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --disable-vulkan --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220630
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\voi.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:03:59.70, start: 0.000000, bitrate: 2683 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 2511 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Output #0, flv, to 'rtmp://livepush.trovo.live/live/73846_112160385_112160385?bizid=73846':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Stream #0:0(und): Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2511 kb/s, 30 fps, 30 tbr, 1k tbn, 30k tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Unknown errortime=00:00:02.19 bitrate=2955.2kbits/s speed=4.21x
[flv @ 0000020eada7ecc0] Failed to update header with correct duration.
[flv @ 0000020eada7ecc0] Failed to update header with correct filesize.
Error writing trailer of rtmp://livepush.trovo.live/live/73846_112160385_112160385?bizid=73846: Error number -10053 occurred
frame=   86 fps=0.0 q=-1.0 Lsize=     962kB time=00:00:02.77 bitrate=2842.1kbits/s speed=4.22x
video:922kB audio:55kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
'txSecret' is not recognized as an internal or external command,
operable program or batch file.
'txTime' is not recognized as an internal or external command,
operable program or batch file.
'cert' is not recognized as an internal or external command,
operable program or batch file.
'certTime' is not recognized as an internal or external command,
operable program or batch file.
'flag' is not recognized as an internal or external command,
operable program or batch file.
'timeshift_bps' is not recognized as an internal or external command,
operable program or batch file.
'timeshift_dur' is not recognized as an internal or external command,
operable program or batch file.
'txAddTimestamp' is not recognized as an internal or external command,
operable program or batch file.
'tp_code' is not recognized as an internal or external command,
operable program or batch file.
'tp_sign' is not recognized as an internal or external command,
operable program or batch file.
'dm_sign' is not recognized as an internal or external command,
operable program or batch file.
'pq_sn' is not recognized as an internal or external command,
operable program or batch file.
'txHost' is not recognized as an internal or external command,
operable program or batch file.

I guess this is a problem on the part of trovo. I mean, it is possible that certain restrictions must be observed for streaming on this site, but I do not know which ones specifically. So how can I fix this?

PS on other platforms the stream works for example twitch.

I have tried many commands and different video formats, the result is the same.

I found a solution. You need to specify the video codec -vcodec libx264 .

this git helped me:Trovo live streaming

The minimum command to run looks like this: ffmpeg -i "D:\voi.mp4" -vcodec libx264 -f flv "rtmp://livepush.trovo.live/live/<key>"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM