In twitter studio to stream they specify
RTMP URL rtmp://va.pscp.tv:80/x
RTMPS URL rtmps://va.pscp.tv:443/x
but when I do
ffmpeg -re -i file.webm -c:v libx264 -preset ultrafast -vf "scale=-2:1080" -g 60 -pix_fmt yuv420p -c:a aac -b:a 128k -ac 2 -r 30 -vb 900k -minrate 900k -maxrate 900k -bufsize 900k -ar 44100 rtmps://va.pscp.tv:443/x/
I get this error
Unable to find a suitable output format for rtmps://va.pscp.tv:443/x/key: Invalid argument
I tried with and without the x but nothing goes, still same error
how to fix this
Turns out it was only missing -f flv
ffmpeg -re -i str_CAM_HGgs_con_XZQOm4Zem0.webm -c:v libx264 -preset ultrafast -vf "scale=-2:1080" -g 60 -pix_fmt yuv420p -c:a aac -b:a 128k -ac 2 -r 30 -vb 900k -minrate 900k -maxrate 900k -bufsize 900k -ar 44100 -f flv rtmps://va.pscp.tv:443/x/{KEY}
Related
I'm new to FFMPEG. I'd used:
ffmpeg -re -y -f rawvideo -vcodec rawvideo -s 1920x1080 -pix_fmt bgr24 -i - -an -preset ultrafast -pix_fmt yuv420p -vcodec libx264 -f flv rtmp://rtmp_url/app/instance
this command. I'd got the successful streaming but the frames are distorted and moving upside down.
Below is the link to the snapshot of the frame.
Image of the upside down frame
Please help me out with this one.
How to create an image using images with FFMPEG? Something like below?
-f lavfi -i color=c=white:s=1080x1920 -loop 1 -i 1.png -loop 1 -i 2.png -filter_complex [0:v][1:v]overlay=shortest=1:x=0:y=0[v1];[v1][2:v]overlay=shortest=1:x=10:y=10 -vframes 1 -q:v 5
Found out by myself
-f lavfi -i color=c=white:s=1080x1920 -loop 1 -i 1.png -loop 1 -i 2.png -filter_complex [0:v][1:v]overlay=shortest=1:x=0:y=0[v1];[v1][2:v]overlay=shortest=1:x=10:y=10 -r 1 -vframes 1 -pix_fmt yuv420p -c:v libx264 export.jpg
I have the following ffmpeg-cli command which does not produce the described effect in documentation. Could this be a bug, or I have something wrong with the command.
ffmpeg \
-y \
-i small.mp4 \
-i monkey/monkey_%04d.png \
-filter_complex "[0:v][1:v]overlay=enable='between(t,1,5)'[out1]" \
-map '[out1]' \
output.mp4
I expect it to overlay the #1 stream on top of #0 between seconds 1 and 5.
You may download the test tarball from this link:
https://drive.google.com/file/d/0BxIQVP1zErDPYXRveG9hN0c0Qjg/view?usp=sharing
It includes assets for the test case.
The build I tried with:
ffmpeg-3.0.2-64bit-static (available online)
FFmpeg is a time-based processor i.e. it aligns packets by timestamps, so you have to align the start of the image sequence to the start of the overlay.
ffmpeg \
-y \
-i small.mp4 \
-i monkey/monkey_%04d.png \
-filter_complex "[1:v]setpts=PTS-STARTPTS+(1/TB)[1v]; \
[0:v][1v]overlay=enable='between(t,1,5)'[out1]" \
-map '[out1]' \
output.mp4
I have this command
ffmpeg -i "D:\Neuer Ordner\Test.mkv" -c copy -ss 00:00:00 -t 00:08:00 -sn "D:\Neuer Ordner\Test1.mkv" -c copy -ss 00:08:00 -t 00:08:00 -sn "D:\Neuer Ordner\Test2.mkv" -c copy -ss 00:16:00 -t 00:08:00 -sn "D:\Neuer Ordner\Test3.mkv" -c copy -ss 00:24:00 -sn "D:\Neuer Ordner\Test4.mkv"
My goal is to upload them to youtube. Yet I need to swap each pair before converting it, so left becomes right and right becomes left.
I found the complex filter and tried
ffmpeg -i "D:\Neuer Ordner\Test.mkv" -filter:v "crop=1280:720:0:0" -i "D:\Neuer Ordner\Test.mkv" -filter:v "crop=1280:720:1280:0" -filter_complex "pad=in_w*2:in_h, overlay=main_w/2:0, scale=in_w/2:in_h, scale=-1:720" -c:a copy "D:\Neuer Ordner\output.mkv"
Which led to
Option filter:v (set stream filtergraph) cannot be applied to input file D:\Neuer Ordner\Test.mkv -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for input file D:\Neuer Ordner\Test.mkv.
Error opening input files: Invalid argument
Which command solves this?
Try this instead:
ffmpeg -i "D:\Neuer Ordner\Test.mkv" \
-c copy -ss 00:00:00 -t 00:08:00
-metadata stereo_mode=right_left -sn "D:\Neuer Ordner\Test1.mkv" \
-c copy -ss 00:08:00 -t 00:08:00 \
-metadata stereo_mode=right_left -sn "D:\Neuer Ordner\Test2.mkv" \
-c copy -ss 00:16:00 -t 00:08:00 \
-metadata stereo_mode=right_left -sn "D:\Neuer Ordner\Test3.mkv" \
-c copy -ss 00:24:00 -metadata stereo_mode=right_left -sn "D:\Neuer Ordner\Test4.mkv"
I did this steps for transcoding my rtmp live streaming to hls on ubuntu 12.04:
apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libvorbis-dev pkg-config texi2html yasm zlib1g-dev apache2
cd /usr/src/
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar -xzf yasm-1.2.0.tar.gz
cd /usr/src/yasm-1.2.0
./configure
make
sudo checkinstall --pkgname=yasm --pkgversion="1.2.0" --backup=no --deldoc=yes --fstrans=no --default
cd /usr/src/
git clone --depth 1 git://git.videolan.org/x264
cd /usr/src/x264
./configure --enable-shared
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default
cd /usr/src/
wget http://downloads.sourceforge.net/opencore-amr/fdk-aac-0.1.0.tar.gz
tar -xzf fdk-aac-0.1.0.tar.gz
cd /usr/src/fdk-aac-0.1.0
./configure
make
sudo checkinstall --pkgname=fdk-aac --pkgversion="0.1.0" --backup=no --deldoc=yes --fstrans=no --default
cd /usr/src/
git clone --depth 1 http://git.chromium.org/webm/libvpx.git
cd /usr/src/libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default
echo "/usr/local/lib/" >> /etc/ld.so.conf
ldconfig
cd /usr/src/
wget http://libav.org/releases/libav-snapshot.tar.bz2
tar -xjf libav-snapshot.tar.bz2
cd /usr/src/liba*
./configure --disable-debug --enable-librtmp --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-shared
make -j4
sudo checkinstall --pkgname=libav --pkgversion="9-887-g25a80a9" --backup=no --deldoc=yes --fstrans=no --default
ldconfig
How to do Apple HLS using Avconv
mkdir /var/www/hls
ln -s /run/shm /var/www/hls
RUN This command
avconv -re -i 'rtmp://RED_5_IP/live/stream_name' -bsf h264_mp4toannexb -vcodec libx264 -acodec libfaac -b:v 448k -b:a 40k -ar 22050 -s 640x360 -hls_time 10 -hls_list_size 4 /var/www/hls/output_a_.m3u8
but when i ran last part, my streaming didn't start and I've get this error:
avconv: relocation error: /usr/local/lib/libavfilter.so.3: symbol sws_isSupportedEndiannessConversion, version LIBSWSCALE_2 not defined in file libswscale.so.2 with link time reference
what i should to do?
Thanks.
The problem is that avconv is unable to load the correct libav libraries. Probably the issue is that /usr/local/lib is not in your linker path. You can add it to the /etc/ld.so.conf file and then run ldconfig.
Another solution is to compile libav statically.
That can be done by changing this
./configure --disable-debug --enable-librtmp --enable-libmp3lame
--enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-shared
to this
./configure --disable-debug --enable-librtmp --enable-libmp3lame
--enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-static