I have a working setup for streaming a video to youtube with my raspberry pi 3.
It was work until yesterday. Nothing changed but I have an error when I try to start the stream.
Running the following command:
raspivid -o - -t 0 -w 1280 -h 720 -p -hf -fps 25 -b 2560000 | avconv -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/my_key
And get this error:
ffmpeg version 3.2.10-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg
developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1'
--toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 /
57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 /
54. 1.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, s16le, from '/dev/zero': Duration: N/A, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s Input #1, h264, from 'pipe:': Duration: N/A, bitrate: N/A
Stream #1:0: Video: h264 (High), yuv420p(progressive), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
rtmp://a.rtmp.youtube.com/live2/my_key: Input/output error
It worked more over a month, but now (I don't know why) stopped working.
Can anyone help me?
Cheers,
Greg
I figured it out!
If you have the same problem just go to youtube stream now / encoder setup / stream name/key, push the reveal button and then the reset button to get a new stream name/key string.
Use the new key!
Related
I am new to ffmpeg and trying to figure out how to convert .MOD files to any generally readable format.
So far I was trying to
ffmpeg -i MOV00A.MOD -vcodec libx264 -acodec aac out.mp4
Result video is readable and has correct ratio aspect is correct but with artefacts like those horizontal lines:
My guess is that I might be using wrong codec but I do not understand which one to choose ?
Running ffmprobe on .MOD results:
ffprobe version 5.1.2 Copyright (c) 2007-2022 the FFmpeg developers
built with Apple clang version 14.0.0 (clang-1400.0.29.202)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, mpeg, from 'MOV00A.MOD':
Duration: 00:00:41.28, start: 0.262222, bitrate: 5285 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 9286000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
The command I used was :
C:\cmd\ffmpeg\bin\ffmpeg.exe -i "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\out\out%d.png" -c:v libvpx -b:v 1M "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\video.webm" -y
The output was:
ffmpeg version N-82889-g54931fd Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 43.100 / 55. 43.100
libavcodec 57. 68.100 / 57. 68.100
libavformat 57. 61.100 / 57. 61.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, image2, from 'C:\Users\yb5243yv\Dropbox\Workspace - C#\SnowflakeGenerator\out\out%d.png':
Duration: 00:00:21.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 1000x1000 [SAR 3779:3779 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libvpx # 0000000000be89c0] v1.6.0
[libvpx # 0000000000be89c0] Transparency encoding with auto_alt_ref does not work
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> vp8 (libvpx))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
The error is:
[libvpx # 0000000000be89c0] Transparency encoding with auto_alt_ref does not work
and
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
I'm not sure exactly what is causing the issue, I followed this tutorial, however they did not mention the error. I should mention that I am not using audio, so I left the audio encoder out (I did try it with the audio encoder to make sure, and that was not the problem)
Like the error msg says, Transparency encoding with auto_alt_ref does not work, so
ffmpeg.exe -i "out%d.png" -c:v libvpx -b:v 1M -auto-alt-ref 0 "video.webm" -y
Here is the error I am getting, I took a 7.1 AAC file, and remixed one of the tracks, and now I am trying to export back to the original format.
ffmpeg -i - -strict experimental -c:a aac -ac 8 -b:a 240k "F:\Something.aac"
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on May 22 2014 19:56:44 with gcc 4.8.2 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-
libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Guessed Channel Layout for Input Stream #0.0 : 7.1
Input #0, wav, from 'pipe:':
Duration: N/A, bitrate: 5644 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 7.1, s16, 5644 kb/s
[aac # 02567320] Unsupported number of channels: 8
Output #0, adts, to 'F:\Something.aac':
Stream #0:0: Audio: aac, 44100 Hz, 7.1, fltp, 240 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le -> aac)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Your ffmpeg is too old.
You can get a new build for Windows at Zeranoe. Users of other OSs can find links to builds at the FFmpeg Download page.
I have written cygwin based shell script to concate 2 .mkv files as below,
#!/bin/sh
ffmpeg -f concat -i concat.txt -codec copy out.mkv
concat.txt contains path to 2 mkv files to be concatenated
file '../temp/1'
file '../temp/2'
when I run script from cygwin terminal I get following error
Rishi#Rishikesh /cygdrive/i/video/Interface_code/Testing_function/bin
$ . script.sh
ffmpeg version 2.5.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 30 2014 17:13:24 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable- avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp -- enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, concat, from 'concat.txt':
Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
Stream #0:0: Video: h264 (High), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 25 fps, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
'NULL # 04780280] Unable to find a suitable output format for 'out.mkv
: Invalid argument
another thing to add, if I run this command from cygwin terminal directly(instead of calling it through script) it runs correctly and creates concatenated output .mkv file
Applying dos2unix command on shell script file solved my problem. Hope it helps someone.
I'm trying to convert a .tak file to .flac, but ffmpeg stops converting before the end (with no error message).
>ffmpeg -i CDImage.tak CDImage.flac
ffmpeg version N-69659-gc0367f7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (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-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
le-zlib
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 21.102 / 56. 21.102
libavformat 56. 19.100 / 56. 19.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 9.104 / 5. 9.104
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, tak, from 'CDImage.tak':
Duration: 00:17:35.95, start: 0.000000, bitrate: 1013 kb/s
Stream #0:0: Audio: tak, 44100 Hz, 2 channels, s16p
Output #0, flac, to 'CDImage.flac':
Metadata:
encoder : Lavf56.19.100
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc56.21.102 flac
Stream mapping:
Stream #0:0 -> #0:0 (tak (native) -> flac (native))
Press [q] to stop, [?] for help
size= 83540kB time=00:10:54.19 bitrate=1046.1kbits/s
video:0kB audio:83532kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.009689%
As you can see, the input file is 17:35.95, but ffmpeg is only converting 10:54.19 of it. Does anyone know what's going on here?
edit: I tried it with a different tak file and got the same result. Only 27 minutes of a 50 minute tak was converted to flac. I get the exact same output file times when converting to wav, so I'm guessing it must either be something with the tak files I have, or with ffmpeg's tak decoder.