[FFmpeg-user] icy/shoutcast title metadata options usage (-icy)

DopeLabs dopelabs at dubstep.fm
Fri Jan 31 00:01:06 CET 2014


orig posted on forum.. http://ffmpeg.gusari.org/viewtopic.php?f=11&t=1258

pasting from there...


goal: shoutcast stream name / song tile meta mapping 

trying to find out what the proper command line usage for -icy is. from my understanding when '-icy 1' is set, ffmpeg requests the metadata from the server. where should this be specified within the command? 

my instinct would tell me it would be something like [code]ffmpeg -icy 1 -i ip:port[/code] which, as it seems, is the only place i have been able to insert that command and have a 'working' ffmpeg

from ffmpeg org / ffmpeg-protocols.html#http
[code]2.10 http
HTTP (Hyper Text Transfer Protocol).
This protocol accepts the following options.
‘icy’
If set to 1 request ICY (SHOUTcast) metadata from the server. If the server supports this, the metadata has to be retrieved by the application by reading the ‘icy_metadata_headers’ and ‘icy_metadata_packet’ options. The default is 0.
‘icy_metadata_headers’
If the server supports ICY metadata, this contains the ICY specific HTTP reply headers, separated with newline characters.
‘icy_metadata_packet’
If the server supports ICY metadata, and ‘icy’ was set to 1, this contains the last non-empty metadata packet sent by the server.[/code]

ok…. so is icy_metadata_headers and _packet something that we have to set manually? 

i just dont quite understand fully as there isnt much on it anywhere =]

ffmpeg output with and without the -icy 1 option where i 'think' it should go… and then below that i will describe exactly what the scenario is.


with -icy 1
[code]$ ffmpeg -icy 1 -i ip:port -re -loop 1 -pattern_type glob -i 'live/*.jpg' -c:v libx264 -b:v 3000k -pix_fmt yuvj420p -bsf h264_mp4toannexb -profile:v main -level 41 -g 20 -c:a libfdk_aac -b:a 192k -f mpegts udp : // IP:10000?pkt_size=1316
ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 21 2014 17:05:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/usr/local --extra-ldflags=-L/usr/local/lib --enable-openssl --enable-openal --enable-libxvid --enable-libx264 --enable-libwavpack --enable-libvorbis --enable-libvo-aacenc --enable-libtheora --enable-libssh --enable-librtmp --enable-libopenjpeg --enable-libopencv --enable-libmp3lame --enable-avisynth --enable-libaacplus --enable-libbluray --enable-libfaac --enable-libfdk-aac --enable-avresample --enable-gray --enable-nonfree --enable-version3 --enable-gpl
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mp3, from 'ip:port':
  Duration: N/A, start: 0.000000, bitrate: 192 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
Input #1, image2, from 'live/*.jpg':
  Duration: 00:00:24.00, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0xabeef80] using SAR=1/1
[libx264 @ 0xabeef80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0xabeef80] profile Main, level 4.1
Output #0, mpegts, to 'udp : // IP:10000?pkt_size=1316':
  Metadata:
    encoder         : Lavf55.19.104
    Stream #0:0: Video: h264 (libx264), yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 3000 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #1:0 -> #0:0 (mjpeg -> libx264)
  Stream #0:0 -> #0:1 (mp3 -> libfdk_aac)
Press [q] to stop, [?] for help
frame= 8734 fps= 25 q=-1.0 Lsize=  149296kB time=00:06:00.69 bitrate=3390.7kbits/s    
video:128629kB audio:8455kB subtitle:0 global headers:0kB muxing overhead 8.908672%
[libx264 @ 0xabeef80] frame I:437   Avg QP: 0.59  size: 59345
[libx264 @ 0xabeef80] frame P:2184  Avg QP: 3.64  size: 22702
[libx264 @ 0xabeef80] frame B:6113  Avg QP: 6.82  size:  9194
[libx264 @ 0xabeef80] consecutive B-frames:  5.0%  0.0% 15.0% 80.0%
[libx264 @ 0xabeef80] mb I  I16..4: 85.1%  0.0% 14.9%
[libx264 @ 0xabeef80] mb P  I16..4:  0.7%  0.0%  1.4%  P16..4:  8.5%  2.6%  2.6%  0.0%  0.0%    skip:84.1%
[libx264 @ 0xabeef80] mb B  I16..4:  0.3%  0.0%  0.6%  B16..8:  5.8%  2.0%  1.2%  direct: 4.0%  skip:86.0%  L0:46.2% L1:39.8% BI:14.0%
[libx264 @ 0xabeef80] final ratefactor: 6.27
[libx264 @ 0xabeef80] coded y,uvDC,uvAC intra: 29.4% 32.0% 30.1% inter: 7.5% 9.7% 7.4%
[libx264 @ 0xabeef80] i16 v,h,dc,p: 88%  1%  6%  5%
[libx264 @ 0xabeef80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 15% 28%  7%  5%  6%  4%  5%  4%
[libx264 @ 0xabeef80] i8c dc,h,v,p: 82%  5% 11%  2%
[libx264 @ 0xabeef80] Weighted P-Frames: Y:4.0% UV:0.7%
[libx264 @ 0xabeef80] ref P L0: 57.0% 16.2% 15.7% 10.6%  0.5%
[libx264 @ 0xabeef80] ref B L0: 73.9% 21.1%  5.1%
[libx264 @ 0xabeef80] ref B L1: 86.4% 13.6%
[libx264 @ 0xabeef80] kb/s:3016.17[/code]

without -icy 1
[code]$ ffmpeg -i ip:port -re -loop 1 -pattern_type glob -i 'live/*.jpg' -c:v libx264 -b:v 3000k -pix_fmt yuvj420p -bsf h264_mp4toannexb -profile:v main -level 41 -g 20 -c:a libfdk_aac -b:a 192k -f mpegts udp : // IP:10000?pkt_size=1316
ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 21 2014 17:05:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/usr/local --extra-ldflags=-L/usr/local/lib --enable-openssl --enable-openal --enable-libxvid --enable-libx264 --enable-libwavpack --enable-libvorbis --enable-libvo-aacenc --enable-libtheora --enable-libssh --enable-librtmp --enable-libopenjpeg --enable-libopencv --enable-libmp3lame --enable-avisynth --enable-libaacplus --enable-libbluray --enable-libfaac --enable-libfdk-aac --enable-avresample --enable-gray --enable-nonfree --enable-version3 --enable-gpl
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mp3, from 'ip:port':
  Duration: N/A, start: 0.000000, bitrate: 192 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
Input #1, image2, from 'live/*.jpg':
  Duration: 00:00:24.00, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0xa0b2960] using SAR=1/1
[libx264 @ 0xa0b2960] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0xa0b2960] profile Main, level 4.1
Output #0, mpegts, to 'udp : // IP:10000?pkt_size=1316':
  Metadata:
    encoder         : Lavf55.19.104
    Stream #0:0: Video: h264 (libx264), yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 3000 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #1:0 -> #0:0 (mjpeg -> libx264)
  Stream #0:0 -> #0:1 (mp3 -> libfdk_aac)
Press [q] to stop, [?] for help
frame= 7482 fps= 25 q=12.0 size=  127133kB time=00:05:10.12 bitrate=3358.2kbits/s[/code]

but sometimes when i run i get a few errors 
[code]$ ffmpeg -icy 1 -i ip:port -re -loop 1 -pattern_type glob -i 'live/*.jpg' -c:v libx264 -b:v 3000k -pix_fmt yuvj420p -bsf h264_mp4toannexb -profile:v main -level 41 -g 20 -c:a libfdk_aac -b:a 192k -f mpegts udp : // IP:10000?pkt_size=1316
ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 21 2014 17:05:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/usr/local --extra-ldflags=-L/usr/local/lib --enable-openssl --enable-openal --enable-libxvid --enable-libx264 --enable-libwavpack --enable-libvorbis --enable-libvo-aacenc --enable-libtheora --enable-libssh --enable-librtmp --enable-libopenjpeg --enable-libopencv --enable-libmp3lame --enable-avisynth --enable-libaacplus --enable-libbluray --enable-libfaac --enable-libfdk-aac --enable-avresample --enable-gray --enable-nonfree --enable-version3 --enable-gpl
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[b][mp3 @ 0x9e0a420] Header missing[/b]
    Last message repeated 1 times
Input #0, mp3, from 'ip:port':
  Duration: N/A, start: 0.000000, bitrate: 192 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
Input #1, image2, from 'live/*.jpg':
  Duration: 00:00:24.00, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x9e17ea0] using SAR=1/1
[libx264 @ 0x9e17ea0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x9e17ea0] profile Main, level 4.1
Output #0, mpegts, to 'udp : // IP:10000?pkt_size=1316':
  Metadata:
    encoder         : Lavf55.19.104
    Stream #0:0: Video: h264 (libx264), yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 3000 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #1:0 -> #0:0 (mjpeg -> libx264)
  Stream #0:0 -> #0:1 (mp3 -> libfdk_aac)
Press [q] to stop, [?] for help
[b][mp3 @ 0x9e0a420] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3 @ 0x9e0a420] Header missing
Error while decoding stream #0:0: Invalid data found when processing input[/b]
frame= 2003 fps= 25 q=-1.0 Lsize=   34632kB time=00:01:31.30 bitrate=3107.2kbits/s    
video:29650kB audio:2140kB subtitle:0 global headers:0kB muxing overhead 8.941065%
[libx264 @ 0x9e17ea0] frame I:101   Avg QP: 0.66  size: 58851
[libx264 @ 0x9e17ea0] frame P:501   Avg QP: 3.67  size: 22784
[libx264 @ 0x9e17ea0] frame B:1401  Avg QP: 6.84  size:  9281
[libx264 @ 0x9e17ea0] consecutive B-frames:  5.0%  0.1% 15.0% 79.9%
[libx264 @ 0x9e17ea0] mb I  I16..4: 85.1%  0.0% 14.9%
[libx264 @ 0x9e17ea0] mb P  I16..4:  0.7%  0.0%  1.4%  P16..4:  8.6%  2.6%  2.6%  0.0%  0.0%    skip:84.1%
[libx264 @ 0x9e17ea0] mb B  I16..4:  0.3%  0.0%  0.6%  B16..8:  5.8%  2.0%  1.2%  direct: 4.0%  skip:86.0%  L0:46.0% L1:40.0% BI:14.0%
[libx264 @ 0x9e17ea0] final ratefactor: 6.29
[libx264 @ 0x9e17ea0] coded y,uvDC,uvAC intra: 29.2% 31.8% 29.9% inter: 7.5% 9.7% 7.4%
[libx264 @ 0x9e17ea0] i16 v,h,dc,p: 88%  1%  6%  5%
[libx264 @ 0x9e17ea0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 15% 28%  7%  5%  6%  4%  5%  4%
[libx264 @ 0x9e17ea0] i8c dc,h,v,p: 82%  5% 11%  2%
[libx264 @ 0x9e17ea0] Weighted P-Frames: Y:4.4% UV:0.8%
[libx264 @ 0x9e17ea0] ref P L0: 57.0% 16.2% 15.6% 10.6%  0.6%
[libx264 @ 0x9e17ea0] ref B L0: 73.9% 21.0%  5.1%
[libx264 @ 0x9e17ea0] ref B L1: 86.4% 13.6%
[libx264 @ 0x9e17ea0] kb/s:3031.59[/code]

well im pretty sure the headers are there as mplayer -v ip:port returns
[code]MPlayer SVN-r36764-4.6 (C) 2000-2014 MPlayer Team
CPU vendor name: GenuineIntel  max cpuid level: 13
CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (Family: 6, Model: 42, Stepping: 7)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSE3: 1 SSSE3: 1 SSE4: 1 SSE4.2: 1 AVX: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX CMOV
get_path('codecs.conf') -> '/home/dopelabs/.mplayer/codecs.conf'
Reading optional codecs config file /home/dopelabs/.mplayer/codecs.conf: No such file or directory
Reading optional codecs config file /usr/local/etc/mplayer/codecs.conf: No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/dopelabs/.mplayer/fonts'
Configuration: 
CommandLine: '-v' 'ip:port'
Using nanosleep() timing
get_path('input.conf') -> '/home/dopelabs/.mplayer/input.conf'
Reading optional input config file /home/dopelabs/.mplayer/input.conf: No such file or directory
Reading optional input config file /usr/local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('relay1.dubstep.fm:80.conf') -> '/home/dopelabs/.mplayer/relay1.dubstep.fm:80.conf'

Playing ip:port.
get_path('sub/') -> '/home/dopelabs/.mplayer/sub/'
Filename for url is now ip:port
Filename for url is now ip:port
STREAM_HTTP(1), URL: ip:port
Resolving ip for AF_INET6...
Resolving ip for AF_INET...
Connecting to server ip: port...

--- HTTP DEBUG HEADER --- START ---
protocol:           [ICY]
http minor version: [0]
uri:                [(null)]
method:             [(null)]
status code:        [200]
reason phrase:      [OK]
body size:          [0]
Fields:
 0 - icy-notice1:<BR>This stream requires Winamp<BR>
 1 - icy-notice2:SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR>
 2 - icy-name:Dubstep.fm
 3 - icy-genre:Dubstep Electronic
 4 - icy-url:url
 5 - content-type:audio/mpeg
 6 - icy-pub:1
 7 - icy-metaint:8192
 8 - icy-br:192
--- HTTP DEBUG HEADER --- END ---
Name   : Dubstep.fm
Genre  : Dubstep Electronic
Website: url
Public : yes
Bitrate: 192kbit/s
Cache size set to 320 KBytes
STREAM: [null] ip:port
STREAM: Description: http streaming
STREAM: Author: Bertrand, Albeau, Reimar Doeffinger, Arpi?
STREAM: Comment: plain http
CACHE_PRE_INIT: 0 [0] 0  pre:65536  eof:0  

Cache fill:  0.00% (0 bytes)   
ICY Info: StreamTitle='ARCHIVE - 2010-05-15 - Dank Dealz CHRONISSIMO';StreamUrl='url';

Cache fill: 12.50% (40960 bytes)   

==> Found audio stream: 0
demux_audio: seeking from 0x1D3D to start pos 0x249
demux_audio: audio data 0x249 - 0x0  
Audio only file format detected.
get_path('sub/') -> '/home/dopelabs/.mplayer/sub/'
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
libavcodec version 55.49.101 (internal)
Configuration: --enable-gpl --enable-postproc
INFO: libavcodec "mp3float" init OK!
AUDIO: 44100 Hz, 2 ch, floatle, 192.0 kbit/6.80% (ratio: 24000->352800)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
Building audio filter chain for 44100Hz/2ch/floatle -> 0Hz/0ch/??...
[libaf] Adding filter dummy 
[dummy] Was reinitialized: 44100Hz/2ch/floatle
[dummy] Was reinitialized: 44100Hz/2ch/floatle
Trying every known audio driver...
ao2: 44100 Hz  2 chans  floatle
audio_setup: using '/dev/dsp' dsp device
audio_setup: using '/dev/mixer' mixer device
audio_setup: using 'pcm' mixer device
alsa-init: requested format: 44100 Hz, 2 channels, 1d
alsa-init: using ALSA 1.0.25
alsa-init: setup for 1/2 channel(s)
alsa-init: using device default
alsa-init: opening device in blocking mode
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format floatle
AO: [null] 44100Hz 2ch floatle (4 bytes per sample)
AO: Description: Null audio output
AO: Author: Tobias Diedrich <ranma+mplayer at tdiedrich.de>
Building audio filter chain for 44100Hz/2ch/floatle -> 44100Hz/2ch/floatle...
[dummy] Was reinitialized: 44100Hz/2ch/floatle
[dummy] Was reinitialized: 44100Hz/2ch/floatle
Video: no video
Freeing 0 unused video chunks.
Starting playback...
Increasing filtered audio buffer size from 0 to 75776
A:   0.0 (00.0) of -0.0 (unknown) ??,?% 25% 
[/code]

shoutcasts MetaInterval=8192

should i be seeing this metadata in the ffmpeg output at all?

im just a bit stuck here and any light on this would be awesome =]

and here is what ive been up to… 

[quote]the goal:

use ffmpeg to stream audio from shoutcast and a video loop to ustream.tv, justin.tv, twitch.tv, youtube, wowza, flash media server, etc

because ffmpeg -loop 1 seems to only support images, export your loop video file as an image sequence (jpeg,png,etc)

so lets get started. in this example lets output to wowza (mpegts)

[code]ffmpeg -i ip:port -re -loop 1 -pattern_type glob -i 'live/*.jpg' -c:v libx264 -b:v 3000k -pix_fmt yuvj420p -bsf h264_mp4toannexb -profile:v main -level 41 -g 20 -c:a libfdk_aac -b:a 192k -f mpegts udp://IP:10000?pkt_size=1316[/code]

breakdown

[code]-r re[/code]
will read at native framerate

[code]-loop 1[/code]
loops a single image or image sequence

[code]-pattern_type glob[/code]
allows usage of *

[code]-i '/path/to/loop00*.jpg'[/code]
path to your image(s) sequence

[code]-i ip:port[/code]
host and port of shoutcast server

[code]-f mpegts[/code]
use encapsulation mpegts for output

console output

[code]ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 21 2014 17:05:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/usr/local --extra-ldflags=-L/usr/local/lib --enable-openssl --enable-openal --enable-libxvid --enable-libx264 --enable-libwavpack --enable-libvorbis --enable-libvo-aacenc --enable-libtheora --enable-libssh --enable-librtmp --enable-libopenjpeg --enable-libopencv --enable-libmp3lame --enable-avisynth --enable-libaacplus --enable-libbluray --enable-libfaac --enable-libfdk-aac --enable-avresample --enable-gray --enable-nonfree --enable-version3 --enable-gpl
libavutil 52. 48.101 / 52. 48.101
libavcodec 55. 39.101 / 55. 39.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, mp3, from 'ip:port':
Duration: N/A, start: 0.000000, bitrate: 192 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
Input #1, image2, from 'live/*.jpg':
Duration: 00:00:24.00, start: 0.000000, bitrate: N/A
Stream #1:0: Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0xa0b2960] using SAR=1/1
[libx264 @ 0xa0b2960] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0xa0b2960] profile Main, level 4.1
Output #0, mpegts, to 'udp://IP:10000?pkt_size=1316':
Metadata:
encoder : Lavf55.19.104
Stream #0:0: Video: h264 (libx264), yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 3000 kb/s, 90k tbn, 25 tbc
Stream #0:1: Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 192 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (mjpeg -> libx264)
Stream #0:0 -> #0:1 (mp3 -> libfdk_aac)
Press [q] to stop, [?] for help
frame= 7482 fps= 25 q=12.0 size= 127133kB time=00:05:10.12 bitrate=3358.2kbits/s[/code]

to stream to ustream.tv just change to
[code]-f flv rtmp:// ustream.tv / url / key[/code]

and so on for the other services.

you may use any encoder you like as long as its supported by ustream.tv, justin.tv, twitch.tv, youtube, wowza, flash media server, etc

and for a little fun

when
[code]-loop 1[/code]

is set ffmpeg seems to read the file on every loop cycle, which means once ffmpeg is running and looping your image sequence, you can edit any of the individual image files and ffmpeg will stream the updated frames/images on the next loop cycle. this means you can edit/change individual frames in real time.

if you want to use a single image file, for example
[code]-loop 1 -i image.png[/code]

you can then open with photoshop and make changes to layers, opacity, etc. just save the file and ffmpeg will stream it out!

note that if your using glob *.jpg for an image sequence, you can only make changes to files that were present at the time ffmpeg was executed. so just dropping another 100 images in the same directory and hoping that *.jpg will pick them up wont work, sorry :/

from what i can tell ffmpeg really hasnt been utilized in this particular way, but is good for radio station owners that want to take advantage of all available delivery methods.

working example (note: as you can see im still working with this stream so if you try the following link it might be down due to me fussin with it…)

dsfm dot tv / watch

cheers =]

DL[/quote]


More information about the ffmpeg-user mailing list