[Ffmpeg-devel-irc] ffmpeg.log.20130808
burek
burek021 at gmail.com
Fri Aug 9 02:05:01 CEST 2013
[00:09] <hellrazor> hi there
[00:11] <vad_> The hi is totally on my side.
[01:46] <Azelphur> Hi folks, trying to use ffmpeg to broadcast from my ip camera to ustream, It's sort of working, I'm getting high speed bursts of playback followed by gaps of buffering. Any ideas on how I could fix it?
[01:46] <Azelphur> Here's the command I'm using: ffmpeg -i "http://admin:1234@192.168.1.120/mjpg/video.mjpg" -f flv "${RTMP_URL}/${KEY} flashver=FME/2.5\20(compatible;\20FMSc\201.0)"
[01:46] <Azelphur> and the stream from my camera, so you can see the effect, http://www.ustream.tv/channel/Azelphur
[01:52] <Azelphur> llogan: http://pastebin.com/d254C7M9 here you go :)
[01:53] <Azelphur> hehe pasted the API key anyway, will have to change that ;)
[02:01] <llogan> Azelphur: is there a reason you're using old, outdated flv1 instead of libx264?
[02:01] <Azelphur> llogan: I wouldn't think so, I pretty much followed a guide to get where I'm at.
[02:01] <Azelphur> change -f flv to -f libx264?
[02:02] <llogan> not quite...
[02:02] <llogan> 1. get a more recent ffmpeg
[02:03] <Azelphur> llogan: more recent? this is a build from the ppa o.O
[02:03] <llogan> or compile
[02:03] <llogan> the PPA provides old stuff
[02:03] <Azelphur> tis only 3 weeks old :<
[02:03] <llogan> http://trac.ffmpeg.org/wiki/UbuntuCompilationGuide
[02:03] <Azelphur> grabbing the latest, anyhow :)
[02:04] <llogan> ah, so he updated, but that branch is considered "old" anyway.
[02:04] <llogan> you want to be a neckbeard like us, don't you?
[02:04] <Azelphur> sure
[02:04] <Azelphur> working on the beard ;)
[02:05] <llogan> don't forget to put foil on the windows so neighbors don't see you using the computer at 3am with no clothes on
[02:05] <Azelphur> haha, no foil on the windows here ;)
[02:06] <llogan> your output shows bitrate=1185.0kbits/s
[02:06] <llogan> so i assume that's too high
[02:06] <Azelphur> I'm now using ffmpeg version N-55249-ga7bb12a Copyright (c) 2000-2013 the FFmpeg developers built on Aug 6 2013 05:43:01 with gcc 4.6 (Debian 4.6.3-1) from the static link you gave me :)
[02:06] <llogan> so you can try a more efficient encoder, libx264
[02:06] <llogan> ok, that will work
[02:07] <Azelphur> not sure how I use libx264, I assume it's something with -f, I tried libx264 and x264, neither seemed to work
[02:07] <llogan> now add -c:v libx264 as an output option. see if the default settings work fine for you for this input.
[02:08] <llogan> or -codec:v libx264
[02:08] <llogan> either is fine
[02:09] <Azelphur> llogan: hehe, I think it's still fast playback, it's also beating the hell outta my bandwidth ;)
[02:09] <Azelphur> 12.6mbit/sec up :)
[02:10] <Azelphur> this is ./ffmpeg -i "http://admin:1234@192.168.1.120/mjpg/video.mjpg" -f flv -codec:v libx264 "${RTMP_URL}/${KEY} flashver=FME/2.5\20(compatible;\20FMSc\201.0)"
[02:12] <Azelphur> llogan: I just had a thought, it's grabbing all these mjpgs off the camera, they are just a series of images, it has no frame rate information
[02:13] <Azelphur> perhaps that's the problem, I need to set the output frame rate?
[02:16] <Azelphur> this does sort of seem to stand up too, I notice the input is stream is capturing at 25 fps
[02:16] <Azelphur> but I know the camera is set up to output 10
[02:18] <llogan> ffmpeg is assuming your input is 25 fps
[02:18] <Azelphur> yea, it's wrong about that :)
[02:18] <llogan> i have no experience with http input protocol
[02:19] <Azelphur> hey look at that, I got it vaguely working
[02:19] <Azelphur> slightly bad frame rate, but it's looking like the timing is about right now
[02:20] <Azelphur> this is with -r 5 on both the input and the output
[02:20] <llogan> but you said the camera was 10 fps
[02:22] <Azelphur> I turned it up to 15 now, just for the hell of it, but -r 15 on both sides still gets me strange hyperspeed behaviour
[02:22] <Azelphur> 5 seems too slow, I end up with a neverending backlog ;)
[03:06] <Azelphur> llogan: managed to get an "ok" solution, I set the fps to 8, it gets about 1 second ahead every 20, and stops to catch up
[03:06] <Azelphur> not perfect, but it'll do :)
[03:14] <llogan> Azelphur: i forgot about the -re input option
[03:14] <llogan> try that isntead of any -r options
[03:16] <Azelphur> ./ffmpeg -re -i "http://admin:1234@192.168.1.120/mjpg/video.mjpg" -vf "hflip" -f flv "${RTMP_URL}/${KEY} flashver=FME/2.5\20(compatible;\20FMSc\201.0)"
[03:16] <Azelphur> llogan: ^ gets me hyperspeed as usual :)
[03:29] <relaxed> pastie.org the output
[03:31] <Azelphur> relaxed: http://pastebin.com/EtPLjPQr
[03:32] <Azelphur> relaxed: just to give you the highlights of the conversation, camera is outputting at 15fps, ffmpeg seems to be capturing at 25, if I -r 8 on both sides I get a somewhat usable output, -r 15 results in the hyperspeed playback, less than -r 8 results in a neverending backlog
[03:32] <Azelphur> and you can see the live playback at http://www.ustream.tv/channel/Azelphur, the timer is counting seconds in a uniform manner :P
[03:33] <llogan> unrelated, but what's with the flashver? do you really need that for ustream?
[03:33] <Azelphur> llogan: no idea, as I say, I just pulled that from a guide
[03:33] <Azelphur> had to modify the command a bit, the guide was using a webcam, I'm using an ipcam.
[03:33] <llogan> i doubt you need it
[03:34] <relaxed> Azelphur: you probably want -c:v libx264
[03:36] <Azelphur> relaxed: llogan mentioned that earlier, I tried it, the result was same hyperspeed playback while using 10x the bitrate ;)
[03:36] <relaxed> capture the stream locally using different frame rates and pick the closest one.
[03:37] <relaxed> actually, if you have mplayer- mplayer -dumpstream -dumpfile output http://admin:1234@192.168.1.120/mjpg/video.mjpg
[03:37] <relaxed> then pastebin the output of `ffmpeg -i output`
[03:37] <Azelphur> mplayer is just an apt-get away :)
[03:39] <relaxed> The problem is most likely ffmpeg getting the input frame rate wrong.
[03:39] <Azelphur> that was my assessment, the camera is outputting at 15 and ffmpeg says 25
[03:39] <relaxed> and you really want -c:v libx264, by the way
[03:40] <relaxed> Do you plan to stream 1280x1024 video?
[03:41] <Azelphur> relaxed: http://pastebin.com/WctrvYFv
[03:41] <Azelphur> relaxed: yea, ustream seems happy enough with it.
[03:41] <llogan> you must have a pro account. basic is limited 480
[03:42] <Azelphur> oh
[03:42] <llogan> if not then they will probably scale it. probably better for ffmpeg to scale it.
[03:42] <Azelphur> I'll set my camera to 640x480 then
[03:42] <relaxed> That's not very helpful. Can mplayer play it?
[03:42] <Azelphur> my camera can just do it natively, seems faster :)
[03:44] <llogan> maybe a ffmpeg ustream/twitch/justin guide would be useful. i've never done much streaming myself though
[03:45] <llogan> Azelphur: you beat me. my upload is ~0.5 Mbps
[03:45] <Azelphur> relaxed: vlc opened it sort of
[03:45] <Azelphur> it played every single frame in a split second
[03:46] <Azelphur> mplayer says "failed to recognise file format"
[03:47] <relaxed> try ffmpeg -r 15 -i $input -c:v libx264 -f flv output.flv
[03:48] Action: relaxed will brb
[03:48] <Azelphur> ffmpeg -r 15 -i "http://admin:1234@192.168.1.120/mjpg/video.mjpg" -c:v libx264 -f flv output.flv
[03:48] <Azelphur> just to make sure I'm doing whats expected :)
[03:53] <Azelphur> hey, changing the camera to 640x480...seems to have fixed it
[03:54] <Azelphur> ffmpeg -r 15 -i "http://admin:1234@192.168.1.120/mjpg/video.mjpg" -r 15 -f flv "${RTMP_URL}/${KEY} flashver=FME/2.5\20(compatible;\20FMSc\201.0)"
[03:54] <Azelphur> now getting sane results on http://www.ustream.tv/channel/Azelphur woo \o/
[03:55] <Azelphur> well, it's a tad on the fast side, seems to buffer occasionally
[03:55] <relaxed> try -r 12
[03:56] <Azelphur> on both sides I assume?
[03:57] <llogan> the output will inherit the input frame rate, so no
[03:57] <Azelphur> ok, just before the input then :)
[03:58] <Azelphur> looks pretty decent now, I don't see it buffering at all :)
[04:01] <Azelphur> I'd say that's working, thanks all :)
[04:02] <llogan> also consider -bufsize and -maxrate
[04:03] <Azelphur> what would they be good for? :)
[04:06] <llogan> i'll just paste some quotes for you: http://pastebin.com/ndN59MmE
[04:07] <Azelphur> fun
[04:11] <Azelphur> there we go, got it pointing out the window and ready to go, give it 2-ish hours and a nice beach will appear on that ustream page :)
[04:11] <llogan> 2-ish hours because of sunrise?
[04:11] <Azelphur> yup
[04:11] <llogan> you are now a certified neckbeard
[04:11] <Azelphur> woo \o/
[04:12] <Azelphur> llogan: https://www.dropbox.com/s/lcl7chbyoq1kfsb/2013-07-28%2020.59.52.jpg camera is stationed in the bottom corner of that left window (under the desk)
[04:13] <Azelphur> so it should get quite a nice view come sunrise :)
[04:13] <llogan> damn. nice setup.
[04:13] <Azelphur> ty :)
[04:13] <llogan> which country is this beach in?
[04:13] <relaxed> *jealous*
[04:13] <Azelphur> UK
[04:13] <Azelphur> so it'll probably rain :P
[04:13] <llogan> man, my desk looks shabby and small now
[04:14] <llogan> scotland?
[04:14] <Azelphur> nah, england, margate specifically
[04:14] <llogan> i'll try to remember to take a look
[04:14] <Azelphur> hehe :)
[04:15] <llogan> also...windows would be nice.
[04:15] Action: llogan needs a new location
[04:19] <Azelphur> xD
[04:19] <Azelphur> llogan: my place annoys the hell out of people, because it's awesome and I pay far less than anyone would think
[04:20] <Azelphur> I pay like, £720/mo (~$1100) for it :)
[04:20] <llogan> nice. i pay about the same for my dumpartment (but it has 4 rooms).
[04:21] <Azelphur> ah, this is a 2 bedroom
[04:21] <llogan> but it was built in 1905.
[04:21] <Azelphur> haha, this was built in the 1700's
[04:21] <llogan> and the bars are noisy so there are tradeoffs
[04:22] <Azelphur> llogan: ah, no bars here :)
[04:23] <Azelphur> this is pretty much a really nice place, I think the area is just underrated really
[04:46] <jcath> hi, does ffmpeg support bdmv dir as input? thanks. I try, seem failed
[04:50] <llogan> oh, a directory? maybe i should read first before summoning fflogger
[04:54] <jcath> i wonder if ffmpeg support something like ffmpeg -i "blahblah\bdmv" ? eac3to support this
[05:01] <relaxed> jcath: what does the dir contain?
[05:02] <jcath> the bluray movie disc bdmv directory structure
[05:02] <relaxed> you will need to find the correct m2ts file
[05:02] <jcath> there are stream, mpls , blah,blah under bdmv, and there are m2ts files under stream dir
[05:03] <jcath> some discs, the movie is build up with some m2ts files, not only one
[05:04] <relaxed> use ffmpeg -i concat:1.m2ts\|2.m2ts\|3.m2ts ....
[05:05] <jcath> ok, that's a solution
[05:05] <relaxed> tsmuxer can do it too
[05:08] <jcath> yeah, i c. i just want to see if it is possible to do the transcode only one command line with ffmpeg, save the disk storage, speed up the transcode time
[11:02] <vl4kn0> Hi, is there a way to capture screenshot of a movie every second in ffmpeg?
[11:04] <Fjorgynn> maybe
[11:04] <Fjorgynn> you want to make a gif?
[11:05] <Fjorgynn> http://blog.room208.org/post/48793543478
[11:05] <Fjorgynn> http://stackoverflow.com/questions/6079150/how-to-generate-gif-from-avi-using-ffmpeg
[11:07] <vl4kn0> no, not gif, .png every second of the movie
[11:08] <viric> vl4kn0: I think there is a page in the wiki for that. About taking thumbnails every second.
[11:08] <viric> ah no, wait. It's in the ffmpeg manpage.
[11:08] <viric> Look for "For extracting images from a video" in ffmpeg(1)
[11:09] <Fischy> hi
[11:09] <Fischy> i have a question about joining 2 audio streams to 1 stream with 2 channels (L/R)
[11:11] <Fischy> i use the following commandline option:
[11:11] <Fischy> -filter_complex "join=inputs=8:channel_layout=stereo:map=0.0-FL\,1.0-FR"
[11:11] <vl4kn0> viric: thanks
[11:12] <Fischy> that does nearly what i want
[11:12] <Fischy> the problem is that the streams are discrete and balanced to center
[11:13] <viric> you are welcome
[11:13] <Fischy> after joining them they are still balanced to center, so that i hear both channels from left AND right
[11:14] <Fischy> any suggestions how to re balance them?
[11:14] <Fischy> or join them in a different way
[11:14] <Fischy> ?
[11:31] <relaxed> vl4kn0: man ffmpeg-filters | less +/^' select'
[13:32] <Fischy> no ideas?
[13:32] <Fischy> :(
[13:41] <xlinkz0> I issued this command ffmpeg -y -i "..url.." -t 60 -c:v libx264 -preset superfast test.mp4
[13:41] <xlinkz0> and i get errors like these: http://codepad.org/XOJ1Y1Be
[13:41] <xlinkz0> why is there an h264 prefix sometimes and libx264 prefix othertimes?
[13:42] <xlinkz0> am i understanding wrong that these errors are from ffmpegs internal h264 decoder?
[13:42] <vad_> 'h264 @' is the decoder.. 'libx264 @' should be the encoder, from what I remember
[13:42] <xlinkz0> doesn't lix264 decode?
[13:43] <vad_> There are multiple 264 decoders available
[13:43] <vad_> (If only currently "h264" and "h264_vdpau")
[13:44] <vad_> See `ffmpeg -codecs`
[13:44] <xlinkz0> do you think another decoder would work?
[13:44] <xlinkz0> or is the stream just bad?
[13:45] <vad_> Tell me your URL and I show you secrets..
[13:45] <Mavrik> xlinkz0, those are either buffer overruns
[13:45] <vad_> 6 [h264 @ 0x1a269a0] RTP: missed 9 packets
[13:45] <vad_> 7 [h264 @ 0x1a269a0] RTP: missed 77 packets
[13:45] <Mavrik> or your stream is broken
[13:45] <vad_> more like underruns
[13:45] <xlinkz0> so can i fix it from the software or not?
[13:46] <vad_> ffmpeg cannot really fix a broken stream. Ensure that the stream properly gets downloaded and no drops occur, if that is what happens.
[13:51] <xlinkz0> sorry, got disconnected
[13:51] <xlinkz0> did anyone answer by any chance?
[13:52] <vad_> Fix your internet, then your stream issues may go away.
[14:04] <xlinkz0> not really an option, the cameras are connected on LAN
[14:04] <xlinkz0> stream copy always works flawlessly
[14:04] <xlinkz0> transcoding live is an issue..
[14:53] <klaxa> i never really had rtsp or rtp streams without package loss
[14:54] <viric> udp always has packet loss
[14:54] <viric> also tcp. Otherwise we wouldn't have bandwidth limits :)
[14:56] <klaxa> i was about to say that you are wrong regarding the bandwidth limits, but then i realized you are right :o
[15:31] <xlinkz0> turns out the cisco camera just encodes badly
[15:31] <xlinkz0> stream copied without packet loss errors and transcoded the resulted video with errors
[16:22] <elkng> I have video file 3 minutes and two audio files 1 minutes and 2 minutes can I put that two audios on that video in one command or should I first merger those two audios in one file and then do things regular way ?
[16:25] <badcompiler_> hi, I'm trying to create a 1080i file but I keep getting a progressive output, does anyone know whta the options for interlaced upscaling are ?
[16:25] <badcompiler_> usr/local/bin/ffmpeg -threads 4 -i 20SEC_VOX-POP_MASTER___.mov -s 1920x1080 -aspect 16:9 -pix_fmt yuv420p -c:v libx264 -preset superfast -tune fastdecode -crf 22 -c:a libfaac -b:a 128k TEST.x264.mov
[16:34] <klaxa> badcompiler_: have a look at https://www.ffmpeg.org/ffmpeg-filters.html#interlace and https://www.ffmpeg.org/ffmpeg-filters.html#telecine
[16:44] <saste> elkng, several options are available, check the join/merge entry in the FAQ
[16:52] <Azelphur> ./ffmpeg -r 12 -i "http://admin:1234@192.168.1.120/mjpg/video.mjpg" -filter:v "crop=640:360:60:0" -f flv "${RTMP_URL}/${KEY} flashver=FME/2.5\20(compatible;\20FMSc\201.0)"
[16:52] <Azelphur> can anyone tell me what's up with my output filter?
[16:52] <Azelphur> the output isn't getting cropped, it's still going out at 640x480
[17:09] <Azelphur> oops, that was a pebcak, it does work :)
[17:11] <badcompiler_> how tdo i use the advanced video option -ilme ? to preserve interlace -filter:v ilme ?
[18:05] <badcompiler_> dad gummit]
[18:39] <rurtle> Hi All
[18:40] <rurtle> I did a fresh install of FFMpeg on my Fedora box and it went alright
[18:40] <rurtle> however, I can't find ffplay in there
[18:41] <rurtle> any suggestions as to where should I look for it or do I need to build with some added options?
[18:41] <relaxed> rurtle: if you don't have the sdl-dev packages installed it won't be built.
[18:42] <rurtle> I was checking some blog post on ffplay, they mentioned the same thing - but for a different platform. Thanks for the tip. Lemme try that.
[18:57] <membrane> Hi. I've created an blend filter which allows me to remove transparent logos based on a mask. It is simple but it works very well. Is it ok to submit this as an blend filter or should it be in an own module? Is it too trivial?
[18:59] <rurtle> relaxed: After installing SDL-dev, it worked like a charm. Thanks a lot!
[19:01] <membrane> Whoops, wrong window. I will post this in #ffmpeg-devel
[19:23] <Joske> is there a way to control the packet size when reading from av_read_frame?
[19:36] <eggyknap> when ffprobe tells me "Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s", what does the "(und)" mean?
[19:36] <vad_> undefined.
[19:37] <eggyknap> I guess I figured that, but what aspect of the stream is undefined?
[19:37] <eggyknap> In other words, what does that field represent
[19:37] <vad_> The language of the audio has not been specified
[19:37] <vad_> You will see "eng", "ger", etc. in carefully authored files
[19:37] <eggyknap> OIC... thx
[19:39] <eggyknap> I guess that doesn't explain my larger problem, which is that I can't avoid "No channel layout for input 2" errors. I have a MP4 file, containing several video and audio streams I've just captured from a set of cameras and microphones, and now I'm trying to post-process it. Mix some audio streams together, create one 5.1 audio, change the order of the various streams, and eventually postprocess the video a bit.
[19:40] <eggyknap> specifically, this: http://pastie.org/8219262
[19:41] <eggyknap> The ffprobe output at the beginning of that paste is redundant, I guess, but ... oh well.
[19:56] <Datalink-Studio> http://pastebin.com/cr4rDgSU OK, I'm attempting to use a Raspberry Pi to connect to one of the streams for the PEG station I volunteer with, I have been trying for a couple weeks, and I've been banging my head against this input/output error for a while without an idea what's causing it.
[20:11] <Datalink-Studio> I'm starting to wonder if I'm doing the impossible at this point
[21:01] <Azelphur> can ffmpeg generate a video from a bunch of dated files, or do they have to be incrementally named?
[21:06] <llogan> Azelphur: are the still in sequential order (but not specifically numerically)?
[21:07] <Azelphur> think so, the naming convention I went with is 2013-08-08 16:38:01.jpg
[21:07] <Azelphur> llogan: dunno if you saw btw, the fruits of yesterdays neckbearding, http://www.ustream.tv/channel/Azelphur ;)
[21:08] <llogan> you can use the glob pattern: ffmpeg -pattern_type glob -i '*.jpg' ...
[21:08] <Azelphur> cool, I'll give that a go
[21:09] <llogan> i just checked it out a few minutes ago. is it almost sunset time now?
[21:09] <Azelphur> yup
[21:09] <Azelphur> llogan: sweet, it works :)
[21:10] <vad_> Azelphur: you got some low tide
[21:10] <llogan> note that by default the images will be 25 frame rate unless you add -r <value> as and input option
[21:10] <Azelphur> vad_: yea, it's pretty much flat out there, complete millpond :)
[21:10] <Azelphur> yea, the default seems ok :)
[21:10] <vad_> llogan: It's sunset time anytime, for some place on Earth
[21:11] <Azelphur> llogan: https://www.dropbox.com/s/l901jp1es6trtwf/out.mp4 :)
[21:13] <axorb> hey guys, I'm wondering if it's possible to analyze a video, extract the byte position of each keyframe, and construct a segment of the video on demand using this information
[21:13] <axorb> something like
[21:13] <llogan> i like the part with the tide going out, but is the camera out of focus?
[21:13] <vad_> axorb: that's what the seek indexes in videos are there for, already
[21:14] <axorb> vad_ how can I extract those?
[21:14] <axorb> show_frames seems to decode the entire file
[21:14] <vad_> axorb: you don't really extract those; you simply let them be used when seeking
[21:14] <axorb> vad_: I need them :P
[21:14] <vad_> no?
[21:15] <axorb> I'm constructing a HLS playlist prior to generating the parts
[21:15] <vad_> wtf is hls
[21:15] <axorb> it's a streaming format
[21:15] <axorb> basically, you segment the file into parts
[21:15] <axorb> and I want to segment on keyframe boundries
[21:15] <axorb> except I don't have the entire file at my disposal, I want to download as little of it as possible to reduce latency
[21:15] <Azelphur> llogan: I'm not sure in all honesty, I think it might be, it's auto focus
[21:16] <axorb> so yeah, reading the seek indexes would be fantastic
[21:17] <llogan> Azelphur: what frame size are you giving to ustream?
[21:17] <vad_> in mpeg4, they should be in the moov atom
[21:17] <Azelphur> llogan: 640x360
[21:17] <Azelphur> I'm downscaling from 720p then cropping
[21:17] <axorb> vad_: I'm going to be supporting all sorts of videos, do you know of a uniform way of doing it?
[21:18] <axorb> like some output from ffprobe or something
[22:18] <l_r> hello
[22:19] <l_r> how would you stream continuosly raw data from a device?
[22:20] <l_r> ./ffmpeg -f rawvideo -i /dev/video0 -vcodec copy -f rawvideo http://localhost:8080/data.ffm
[22:20] <l_r> basically i need to copy raw data from a device and feed a .ffm
[22:21] <l_r> the prblem is that it seems ffmpeg does not keep reading from the device, it exits immediatly (with no errors)
[00:00] --- Fri Aug 9 2013
More information about the Ffmpeg-devel-irc
mailing list