ffmpeg: AVI to FLV conversion doubles file size - ffmpeg

I convert AVI to FLV with ffmpeg using -sameq parameter (same quality):
ffmpeg -i test.avi -sameq -f flv sameq.flv
The resulting file has the same video and audio quality as the original, but it's more than twice the original file size:
84M sameq.flv
41M test.avi
Why does it happen?
Transcoder output:
ffmpeg version N-34750-g070d2d7, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 12 2011 11:23:07 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 51. 24. 1 / 51. 24. 1
libavcodec 53. 33. 0 / 53. 33. 0
libavformat 53. 20. 0 / 53. 20. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 48. 0 / 2. 48. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'test.avi':
Duration: 00:06:30.00, start: 0.000000, bitrate: 866 kb/s
Stream #0:0: Video: mpeg4 (Advanced Real Time Simple Profile) (DIVX / 0x58564944), yuv420p, 400x300 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16, 64 kb/s
[buffer # 0xa247ae0] w:400 h:300 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
Output #0, flv, to 'sameq.flv':
Metadata:
encoder : Lavf53.20.0
Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 400x300 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 25 tbc
Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 44100 Hz, mono, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> flv)
Stream #0:1 -> #0:1 (mp3 -> libmp3lame)
Press [q] to stop, [?] for help
frame= 9742 fps=255 q=0.0 Lsize= 85074kB time=00:06:30.00 bitrate=1787.0kbits/s
video:79163kB audio:5525kB global headers:0kB muxing overhead 0.455568%

Two thing comes to mind:
Compress a video without audio stream to eliminate the audio portion of this issue. BTW, the audio source is HALF the bitrate of the output, that increases the size a little. Use -ar and -ab switches to control the output.
Check out this article on qscale vs quality using -qscale option. Add in the -b (bitrate) and -s (size) and tweak it to your needs.
When all fails, there are a few switches you can try from the ffmpeg website or try using the new H.264 compression, the two pass option is recommended. Have fun compressing

its because of -sameq. It gives you a good quality but pay the price with a bigger file size.

Can you try adding:
-qcomp 1.0
video quantizer scale compression ( VBR ) (default 0.5). Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0

Related

ffmpeg demux into audio and video resets PTS

Demuxing
I am demuxing TS segments into audio and video as follows.
ffmpeg -y -i input.ts -vcodec copy -an output_video.ts
ffmpeg -y -i input.ts -acodec copy -vn output_audio.aac
Inspecting Input
The start_pts and start_time on input.ts are as shown below. I was able to inspect these values using ffprobe -show_streams -print_format json input.ts
"start_pts": 8306558438,
"start_time": "92295.093756",
Inspecting output video
The output .ts has some default start_pts and start_time values as shown below. These were also obtained using the same ffprobe command as indicated above.
"start_pts": 126000,
"start_time": "1.400000",
Inspecting output audio
The same ffprobe command on output_audio.aac shows that the output aac has invalid codec_tag and codec_tag_string as shown below. The start_pts and start_time are not present in the output_audio.aac.
"codec_tag_string": "[0][0][0][0]", (should have been [15][0][0][0])
"codec_tag": "0x0000", (should have been 0xf000)
Questions
Wondering if this difference in the start_pts, start_time, codec_tag is expected?
If it is expected, what can I do to ensure that the all of these parameters get retained on the output?
If it is not expected, is there some more information I can share to track this down?
Note
There were other outputs that I found inconsistent in the ffprobe command for the output_audio.aac like duration etc.. I shared what I thought are most valuable at this point. If required I can share complete outputs from all of the above executions.
[EDIT 07/30/2018 - 08:00 MST]
logs for ffmpeg -y -i input.ts -vcodec copy -an output_video.ts -acodec copy -vn output_audio.aacare as shown below.
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-frei0r --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mpegts # 0x7f88ed803000] start time for stream 0 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'i7h9456s_media_46185.ts':
Duration: 00:00:06.05, start: 86216.852667, bitrate: 2898 kb/s
Program 1
Stream #0:0[0x102]: Data: timed_id3 (ID3 / 0x20334449)
Stream #0:1[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m, progressive), 640x360 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 190 kb/s
Output #0, mpegts, to '../output_video.ts':
Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m, progressive), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
Output #1, adts, to '../output_audio.aac':
Metadata:
encoder : Lavf58.12.100
Stream #1:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 190 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #1:0 (copy)
Press [q] to stop, [?] for help
frame= 180 fps=0.0 q=-1.0 Lsize= 2088kB time=00:00:06.03 bitrate=2833.8kbits/s speed= 904x
video:1918kB audio:142kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.349750%
All the differences are expected. FFmpeg removes input timestamp offset unless set otherwise. The MPEG-TS muxer also adds a timestamp offset.
You can preserve source timestamps when remuxing TS, and also avoid the muxer's offset, like this,
ffmpeg -y -copyts -i input.ts -vcodec copy -an -muxdelay 0 -muxpreload 0 output_video.ts
As .aac is a raw ADTS stream, there is no codec tag string present. This is expected. Mux to .m4a or .mka or a similar container if tags are needed.

Buffer overrun Blackmagic Intensity 4K as input to FFmpeg

I am trying to take direct video output from a 4k Sony Handycam, via HDMI directly into a Blackmagic Intensity Pro 4K. I can verify that the camera, Hdmi and blackmagic card are working as I can capture and view video using the provided "Media Express" program. When use ffmpeg I do get video output but I also get a buffer overrun.
Here is the command:
time ffmpeg -f decklink -i "Intensity Pro 4K#20" -c:v nvenc -b:v 100M -vf yadif=0:-1:0" -pix_fmt yuv420p -crf 29.97 -strict -2 output.mp4
And I get the following output:
ffmpeg version N-76538-gb83c849 Copyright (c) 2000-2015 the FFmpeg
developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --enable-nonfree --enable-nvenc --enable-nvresize --extra-cflags=-I../cudautils --extra-ldflags=-L../cudautils --enable-gpl --enable-libx264 --enable-libx265 --enable-decklink --extra-cflags=-I/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include --extra-ldflags=-L/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[decklink # 0x1ccd6e0] Found Decklink mode 3840 x 2160 with rate 29.97
[decklink # 0x1ccd6e0] Stream #1: not enough frames to estimate rate; consider increasing probesize
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'Intensity Pro 4K#20':
Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422, 3840x2160, -5 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc
Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (output.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.
File 'output.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf57.14.100
Stream #0:0: Video: h264 (nvenc) ([33][0][0][0] / 0x0021), yuv420p, 3840x2160, q=-1--1, 100000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
Metadata:
encoder : Lavc57.15.100 nvenc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc57.15.100 aac
Stream mapping:
Stream #0:1 -> #0:0 (rawvideo (native) -> h264 (nvenc))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[decklink # 0x1ccd6e0] Decklink input buffer overrun!:03.15 bitrate=70411.7kbits/s
Last message repeated 1 times
[decklink # 0x1ccd6e0] Decklink input buffer overrun!:03.54 bitrate=73110.9kbits/s
Last message repeated 20 times
[decklink # 0x1ccd6e0] Decklink input buffer overrun!:03.92 bitrate=76270.2kbits/s
Last message repeated 15 times
[decklink # 0x1ccd6e0] Decklink input buffer overrun!:04.28 bitrate=78367.6kbits/s
Last message repeated 61 times
frame= 140 fps= 22 q=-0.0 Lsize= 57266kB time=00:00:04.67 bitrate=100425.2kbits/s
video:57187kB audio:72kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.009844%
[decklink # 0x1ccd6e0] Decklink input buffer overrun!
Last message repeated 7 times
[aac # 0x1cd7020] Qavg: 215.556
real 0m8.808s
user 0m5.785s
sys 0m1.749s
Some sort of insight into this, be that just some commands that may fix it the issue, or otherwise.

What is the best way to split a transport stream file?

I have a .ts file (Download files here: http://dropcanvas.com/2gmsg/1).
I want to split this video while I expect ALL other properties remain same including pts time.
Here is what I try to achieve this:
ffmpeg -ss 0.000 -i sample.ts -y -c copy -t 3 splitted.ts
Expected start time: 94678.950389
New start time: 1.402367
I expect the above command should only take first 3 seconds of the .ts file and all other stuff to stay same. I've seen copyts and copytb options from the documentation but I wasn't able to use them.
So how do I do this?
Thank you
Here are the logs for copyts. It creates a 0 byte splitted.ts file:
ffmpeg -ss 0:00:00 -i sample.ts -to 00:00:03 -y -c copy -copyts splitted.ts
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.0.0 (clang-700.0.72)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libx265 --enable-nonfree --enable-vda
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[NULL # 0x7fafac02fc00] start time for stream 2 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'sample.ts':
Duration: 00:00:10.07, start: 94678.950389, bitrate: 934 kb/s
Program 1
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 140 kb/s
Stream #0:2[0x102]: Data: timed_id3 (ID3 / 0x20334449)
Output #0, mpegts, to 'splitted.ts':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, 140 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
This works for me
ffmpeg -seek_timestamp 1 -ss 94678.950389 -i sample.ts -y -c copy -copyts -to 94681.950389 -muxdelay 0 splitted.ts
Your original command can work if you use the frames flag.
ffmpeg -ss 0.000 -i sample.ts -y -c copy -copyts -muxdelay 0 -vframes 90 splitted.ts
Where 90 represents amount of frames in t seconds.

FFMPEG Audio and Video Streams merging and restreaming

I have multiple streaming sources that need to combined and re-streamed as a single source.
My sources are:
A local low rate RTP audio stream
A camera
I need to redistribute the combined stream (via UDP multicast) across the local network.
The problem I am seeing is that periodically ffmpeg appears to lock up and stop processing the combination after an indeterminate amount of time (sometimes as little as 15 min sometimes almost an hour). However if I redirect the streams independently (audio or video only) there appears to be no problem and the run indefinitely.
Command
ffmpeg -f rtp -i rtp://127.0.0.1:6666 -f video4linux2 -standard NTSC -s 704x480 -i /dev/video1 -strict experimental -vcodec libx264 -acodec ac3 -preset ultrafast -r 3 -g 3 -keyint_min 6 -x264opts "keyint=6:min-keyint=6:no-scenecut" -b:v 200k -ac 1 -b:a 64k -f mpegts udp://225.1.1.15:30000
Output
ffmpeg version 2.5.1- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 18 2014 09:06:26 with gcc 4.8 (Debian 4.8.3-19)
configuration: --enable-gpl --enable-version3 --disable-shared --disable- debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable- libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx -- enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc -- enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus -- disable-ffserver --enable-libass --enable-gnutls --cc=gcc-4.8
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
[rtp # 0xb61abe0] Guessing on RTP content - if not received properly you need an SDP file describing it
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, rtp, from 'rtp://127.0.0.1:6666':
Duration: N/A, start: 0.000000, bitrate: 64 kb/s
Stream #0:0: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Input #1, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 1424887596.039777, bitrate: 162039 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559`enter code here`), yuyv422, 704x480, 162039 kb/s, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 # 0xb61f900] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 # 0xb61f900] profile High 4:2:2, level 2.2, 4:2:2 8-bit
Output #0, mpegts, to 'udp://225.1.1.15:30000':
Metadata:
encoder : Lavf56.15.102
Stream #0:0: Video: h264 (libx264), yuv422p, 704x480, q=-1--1, 200 kb/s, 3 fps, 90k tbn, 3 tbc
Metadata:
encoder : Lavc56.13.100 libx264
Stream #0:1: Audio: ac3, 8000 Hz, mono, fltp, 64 kb/s
Metadata:
encoder : Lavc56.13.100 ac3
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (pcm_mulaw (native) -> ac3 (native))
Press [q] to stop, [?] for help
frame= 5 fps=0.0 q=12.0 size= 0kB time=00:00:00.33 bitrate= 0.0kbits/s dup=0 drop=12
Turns out the only way I was able to get the streams to run for an extended period was to split them into two independent streams.

ffmpeg live rtmp stream does not start to process for long time

I have rtmp stream created by flash player in h264 but when i convert it to video or tumbnail using ffmpeg it some times works after very very long time and some time not work but if I create a stream with Flash Media live encoder on same FMS server the command below works fine. At the same time if I try the stream in player it works well and fine.
I am using IP so DNS resolving issue is not possible either I think.
ffmpeg -i rtmp://xxx.xxx.xx.xx/live/bdeef2c065509361e78fa8cac90aac741cc5ee29 -r 1 -an -updatefirst 1 -y thumbnail.jpg
Following is when it worked aftre 15 - 20 minutes
ffmpeg -i "rtmp://xxx.xxx.xx.xx/live/bdeef2c065509361e78fa8cac90aac741cc5ee29 live=1" -r 1 -an -updatefirst 1 -y thumb.jpg
[root#test ~]# ffmpeg -i rtmp://38.125.41.20/live/bdeef2c065509361e78fa8cac90aac741cc5ee29 -r 1 -an -updatefirst 1 -y thumbnail.jpg
ffmpeg version N-49953-g7d0e3b1-syslint Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 14 2013 15:29:40 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.103 / 54. 91.103
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[flv # 0x14c0100] Stream #1: not enough frames to estimate rate; consider increasing probesize
[flv # 0x14c0100] Could not find codec parameters for stream 1 (Audio: none, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[flv # 0x14c0100] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://xxx.xxx.xx.xx/bdeef2c065509361e78fa8cac90aac741cc5ee29':
Metadata:
keyFrameInterval: 15
quality : 90
level : 3.1
bandwith : 0
codec : H264Avc
fps : 15
profile : baseline
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 15 tbr, 1k tbn, 30 tbc
Stream #0:1: Audio: none, 0 channels
Output #0, image2, to 'thumbnail.jpg':
Metadata:
keyFrameInterval: 15
quality : 90
level : 3.1
bandwith : 0
codec : H264Avc
fps : 15
profile : baseline
encoder : Lavf54.63.100
Stream #0:0: Video: mjpeg, yuvj420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 1 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
frame= 2723 fps=1.3 q=1.6 size=N/A time=00:45:23.00 bitrate=N/A dup=8 drop=12044
and on stopping the stream by closing the browser running the flash player which is publishing the video I get the following
[flv # 0x23684e0] Could not find codec parameters for stream 1 (Audio: none, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[flv # 0x23684e0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://xxx.xxx.xx.xx/live/bdeef2c065509361e78fa8cac90aac741cc5ee29':
Metadata:
keyFrameInterval: 15
quality : 90
bandwith : 0
level : 3.1
codec : H264Avc
fps : 15
profile : baseline
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 15 tbr, 1k tbn, 30 tbc
Stream #0:1: Audio: none, 0 channels
when if i stop the stream it quickly creates a thumbnail file where as running stream is an issue.
I found the reason and cause of this, if a stream created by flash not no microphone selected the audio channel is 0 in rtmp published stream so for that reason the audio codec part of rtmp goes into some kind of loop and not returns and goes further . I have found the cause . but looking for a way to get rid if this loop incase there is no audio channel . may be might have to modify the source code of rtmp and compile again .

Resources