TCP 5454 and 554 connection refused ffmpeg - ffmpeg

i am convert my rtmp streaming to rtsp streaming using ffmpeg. the following code is doing the convert
ffmpeg -i rtmp://xxxxx.com/live/live1 -f rtsp rtsp://xxxxx.com:5454/test1-rtsp.mpg
After running above command it's return the following console. and i am getting connection refused for rtsp 5454 and aslo 554. how can i solve this ?
ffmpeg version N-60489-g03911c4 Copyright (c) 2000-2014 the FFmpeg developers
built on Feb 10 2014 05:44:38 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. 63.101 / 52. 63.101
libavcodec 55. 50.100 / 55. 50.100
libavformat 55. 31.100 / 55. 31.100
libavdevice 55. 8.100 / 55. 8.100
libavfilter 4. 1.102 / 4. 1.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
[flv # 0x40d1440] Stream discovered after head already parsed
Input #0, flv, from 'rtmp://xxxxx.com/jiljillive/live1':
Metadata:
videokeyframe_frequency: 5
avclevel : 31
videodevice : Broadcast SC Video Filter
keywords :
audiochannels : 2
presetname : Custom
copyright :
audioinputvolume: 100
creationdate : Tue Feb 11 08:47:50 2014
:
author :
audiodevice : Microphone (SplitCam Virtual Au
avcprofile : 66
title :
description :
rating :
Duration: N/A, start: 0.000000, bitrate: 438 kb/s
Stream #0:0: Video: h264 (Baseline), yuv420p(tv), 320x240 [SAR 1:1 DAR 4:3], 307 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 131 kb/s
Stream #0:2: Data: none
[tcp # 0x40f9c60] Connection to tcp://emedias.com:5454?timeout=0 failed: Connection refused
Output #0, rtsp, to 'rtsp://xxxxxx.com:5454/test1-rtsp.mpg':
Metadata:
videokeyframe_frequency: 5
avclevel : 31
videodevice : Broadcast SC Video Filter
keywords :
audiochannels : 2
presetname : Custom
copyright :
audioinputvolume: 100
creationdate : Tue Feb 11 08:47:50 2014
:
author :
audiodevice : Microphone (SplitCam Virtual Au
avcprofile : 66
title :
description :
rating :
encoder : Lavf55.31.100
Stream #0:0: Video: mpeg4, yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream #0:1: Audio: aac (libvo_aacenc), 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
Stream #0:1 -> #0:1 (mp3 -> libvo_aacenc)
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error

Related

FFMPEG [mp3float # 0x7fd42f813200] Header missing

I have a problem with some mp3 files. When transcoding the file with FFMPEG I get the following error:
[mp3float # 0x7fd42f813200] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
Is this a problem of the file itself, and how it is produced?
Or is it a problem of FFMPEG?
Here full decoding message:
ffmpeg version git-2020-07-28-dfd12ee Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.16)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-dfd12ee_2 --enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --disable-libjack --disable-indev=jack --enable-opencl --enable-videotoolbox --disable-htmlpages --enable-libfdk-aac --enable-nonfree
libavutil 56. 57.100 / 56. 57.100
libavcodec 58. 97.102 / 58. 97.102
libavformat 58. 49.100 / 58. 49.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[mp3 # 0x7fd42f808200] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'Ice Mc - Think About The Way.mp3':
Metadata:
title : Think About The Way
TBPM : 133
artist : Ice MC
date : 1994
track : 4/15
disc : 0
album_artist : ICE MC
Duration: 00:04:16.39, start: 0.000000, bitrate: 323 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 600x592 [SAR 72:72 DAR 75:74], 90k tbr, 90k tbn, 90k tbc (attached pic)
Metadata:
comment : Other
Stream mapping:
Stream #0:1 -> #0:0 (mjpeg (native) -> wrapped_avframe (native))
Stream #0:0 -> #0:1 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
title : Think About The Way
TBPM : 133
artist : Ice MC
date : 1994
track : 4/15
disc : 0
album_artist : ICE MC
encoder : Lavf58.49.100
Stream #0:0: Video: wrapped_avframe, yuvj420p(progressive), 600x592 [SAR 72:72 DAR 75:74], q=2-31, 200 kb/s, 90k fps, 90k tbn, 90k tbc (attached pic)
Metadata:
comment : Other
encoder : Lavc58.97.102 wrapped_avframe
Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Metadata:
encoder : Lavc58.97.102 pcm_s16le
[mp3float # 0x7fd42f813200] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:04:16.60 bitrate=N/A speed= 725x
video:1kB audio:44204kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
What is also noticed is that this mp3 has the cover embedded as a video stream. And there is also this weird cross mapping. Not sure if that is normal?
Are you sure, that you use only the stream you need? If no, you can check it by printing all the stream number of packets, returned by av_read_frame.
To select a specific stream, you should discard others. Check this thread to find out how: How to change stream index in libavformat

Error while opening encoder for output stream #0:0

I can't play a video using clipbucket after installation, getting conversion status as completed but while playing the video I get an message as "not available"
Conversion file
Checking File ....
File : /var/www/html/files/conversion_queue/14958856828d300.mp4
File Exists : Yes
Preparing file...
format : mov,mp4,m4a,3gp,3g2,mj2
duration : 62.09
size : 4480694
bitrate : 577316
video_width : 640
video_height : 360
video_wh_ratio : 1.7777777777778
video_codec : h264
video_rate : 23.976023976024
video_bitrate : 479302
video_color : N/A
audio_codec : aac
audio_bitrate : 95999
audio_rate : 44100
audio_channels : 2
path : /var/www/html/files/conversion_queue/14958856828d300.mp4
rotation : 0
======Converting Video=========
Starting : Thumbs Generation
=======Low Resolution Conversion=======
Sarting : Generating Low resolution video # 2017-05-27 17:18:11
Converting Video SD File
Command : /usr/local/bin/ffmpeg -i /var/www/html/files/conversion_queue/14958856828d300.mp4 -vcodec flv -acodec libmp3lame -s 640x360 -preset medium -f mp4 -b:v 512000 -minrate 512000 -maxrate 512000 -b:a 128000 -minrate 128000 -maxrate 128000 -r 25 -ar 22050 /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4
ffmpeg output : ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libdc1394 --enable-libfaac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/html/files/conversion_queue/14958856828d300.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-03-17 10:27:42
Duration: 00:01:02.09, start: 0.000000, bitrate: 577 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 479 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:27:42
handler_name : IsoMedia File Produced by Google, 5-11-2011
Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 (/var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[flv # 0x2506080] Either both buffer size and max rate or neither must be specified
Output #0, mp4, to '/var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
Stream #0:0(und): Video: flv1, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25 fps (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc56.26.100 flv
Stream #0:1(eng): Audio: mp3, 0 channels, 128 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:27:42
handler_name : IsoMedia File Produced by Google, 5-11-2011
encoder : Lavc56.26.100 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> flv1 (flv))
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Sarting : MP4Box Conversion for SD
MP4Box Command : /usr/local/bin/MP4Box -inter 0.5 /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4 -tmp /var/www/html/files/temp
output : Error opening file /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4: IsoMedia File is truncated
Conversion Status : Successful # 2017-05-27 17:18:11
output_format : mov,mp4,m4a,3gp,3g2,mj2
output_duration : 62.09
output_size : 4480694
output_bitrate : 577316
output_video_width : 640
output_video_height : 360
output_video_wh_ratio : 1.7777777777778
output_video_codec : h264
output_video_rate : 23.976023976024
output_video_bitrate : 479302
output_video_color : N/A
output_audio_codec : aac
output_audio_bitrate : 95999
output_audio_rate : 44100
output_audio_channels : 2
output_path : /var/www/html/files/conversion_queue/14958856828d300.mp4
output_rotation : 0
Time Took : 9.2965 seconds
conversion_status : completed
**Error Messages**
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
output : Error opening file /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4: IsoMedia File is truncated

FFmpeg freezes during conversion

I am trying to run a merge between a mp4 video and a m4a audio files. Several other were generated properly, but this one starts and freezes at time 00:02:54.08. If I stop it (ctrl+c) several minutes afterwards, the output.mp4 file have 0 bytes. I do not have a lot of clues why it happens. Anybody experienced something similar?
[]# ffmpeg -i 91dff482-213e-45f7-84ea-a176f255c118.mp4 -i 91dff482-213e-45f7-84ea-a176f255c118.m4a -c:v copy -strict -2 -c:a aac -b:a 160k output.mp4
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '91dff482-213e-45f7-84ea-a176f255c118.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1iso6mp41
encoder : Lavf56.25.101
Duration: 00:05:00.00, start: 0.133333, bitrate: 30 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 29 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
Metadata:
rotate : 90
handler_name : VideoHandler
Side data:
displaymatrix: rotation of -90.00 degrees
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '91dff482-213e-45f7-84ea-a176f255c118.m4a':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2iso6mp41
encoder : Lavf56.25.101
Duration: 00:05:00.15, start: 0.000000, bitrate: 14 kb/s
Stream #1:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 13 kb/s (default)
Metadata:
handler_name : SoundHandler
[aac # 0x1b761a0] Too many bits per frame requested, clamping to max
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1iso6mp41
encoder : Lavf56.25.101
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 29 kb/s, 15 fps, 15 tbr, 15360 tbn, 15360 tbc (default)
Metadata:
rotate : 90
handler_name : VideoHandler
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, fltp, 48 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc56.26.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 2612 fps= 33 q=-1.0 size= 1568kB time=00:02:54.08 bitrate= 73.8kbits/s
Run
ffmpeg -ss 02:50 -i video -ss 02:50 -i audio -c:v copy -strict -2 -c:a aac -b:a 160k test.mp4.
If this stops after few seconds, there's some anomaly in one of the bitstreams and you'll have to remux one or both of the input files and try again i.e.
ffmpeg -i video -c copy -an newvideo.mp4
ffmpeg -i audio -c copy -vn newaudio.mp4

Parsed_concat_1 # 02ad98e0 Failed to configure output pad on Parsed_concat_1 ffmpeg

I am concatenating three videos using ffmpeg. However, for some reasons I am getting error.
I am using NReco Video Converter which is a FFMpeg C# wrapper .
Any help would be highly appreciated.
Below is my complete console output :
C:\ffmpeg-20151130-git-7b11eea-win64-static\ffmpeg-20151130`enter code here`
-git-7b11eea-win64-static\bin
>ffmpeg -i I.mp4 -i V.mp4 -i O.mp4 -t 500 -f mp4 -s 1080*720 -filter_complex "co
ncat=n=3:v=1 [v]" -map "[v]" output.mp4
ffmpeg version N-76957-g7b11eea Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (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-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --
enable-lzma --enable-decklink --enable-zlib
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 17.100 / 6. 17.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'I.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.12.100
Duration: 00:00:03.52, start: 0.036281, bitrate: 2041 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x720
[SAR 40:33 DAR 20:11], 1926 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp,
128 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'V.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.12.100
Duration: 00:00:31.29, start: 0.036281, bitrate: 1560 kb/s
Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x720,
1428 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp,
128 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'O.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.12.100
Duration: 00:00:03.52, start: 0.036281, bitrate: 2041 kb/s
Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x720
[SAR 40:33 DAR 20:11], 1926 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp,
128 kb/s (default)
Metadata:
handler_name : SoundHandler
[Parsed_concat_0 # 000000d2ed8bee80] Input link in1:v0 parameters (size 1080x720
, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1080x72
0, SAR 40:33)
[Parsed_concat_0 # 000000d2ed8bee80] Failed to configure output pad on Parsed_concat_0
Error configuring complex filters.
Invalid argument
As you can see from the console output the issue is that the three inputs have different SAR values: 0:1 for the second input vs 40:33 for the first and third inputs.
You can set the corect SAR value using the setsar filter, eg:
[1:v:0]setsar=sar=40/33[1v0sar]
then pass [1v0sar] to the concat filter along with the other video streams.

ffmpeg how to stream video file in windows on http protocol

I'm trying to stream avideo file to localhost http stream.
my ffmpeg version details:
ffmpeg version N-64307-g8657612 Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 29 2014 22:09:38 with gcc 4.8.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-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
r --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. 90.101 / 52. 90.101
libavcodec 55. 68.100 / 55. 68.100
libavformat 55. 44.100 / 55. 44.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 9.100 / 4. 9.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfi
le}...
when I use:
C:\Users\USER>ffmpeg -re -i myfile.mp4 -f flv udp://localhost:1234
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myfile.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.44.100
compilation : 0
Duration: 00:00:04.17, start: 0.036281, bitrate: 268 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480 [
SAR 1:1 DAR 4:3], 132 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 12
8 kb/s (default)
Metadata:
handler_name : SoundHandler
[flv # 00000000003fc780] Using AVStream.codec.time_base as a timebase hint to th
e muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
Output #0, flv, to 'udp://localhost:1234':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
compilation : 0
encoder : Lavf55.44.100
Stream #0:0(und): Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 640x48
0 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc55.68.100 flv
Stream #0:1(und): Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz,
stereo, fltp (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc55.68.100 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> flv1 (flv))
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
frame= 5 fps=0.0 q=2.0 size= 32kB time=00:00:00.44 bitrate= 591.6kbits/s
frame= 18 fps= 18 q=3.6 size= 77kB time=00:00:00.94 bitrate= 668.8kbits/s
frame= 30 fps= 20 q=8.4 size= 115kB time=00:00:01.46 bitrate= 642.5kbits/s
its working.
but when I use http:
C:\Users\USER>ffmpeg -re -i myfile.mp4 -f flv http://localhost:1234
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myfile.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.44.100
compilation : 0
Duration: 00:00:04.17, start: 0.036281, bitrate: 268 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480 [
SAR 1:1 DAR 4:3], 132 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 12
8 kb/s (default)
Metadata:
handler_name : SoundHandler
http://localhost:1234: Input/output error
I get Input/output error.
in linux its working with ffserver.
but in windows I get this exception.
You are using two different protocols (udp and http) so the outcome of the command is different.
Like Ross said in the comments : "UDP doesn't know or care if there is anything to receive the packets. If there's nothing there ffmpeg won't know and so won't complain".
FFserver is a different command to FFmpeg hence the different outputs.
Linux will behave differently according to distribution. Windows will also behave differently.
It would be easier for us to answer the question if you added a question mark to your question with a phrase summarising what you want to know.

Resources