[Ffmpeg-devel-irc] ffmpeg.log.20160413

burek burek021 at gmail.com
Thu Apr 14 02:05:01 CEST 2016


[00:30:56 CEST] <pfelt> afternon all. i'm playing around with send_command and had a question.  is there any way to send a command from an external program?
[00:31:59 CEST] <pfelt> also, if i have two instances of a given filter, is there a way to specify which of the instances should process the command?
[00:39:15 CEST] <explodes> Why does a 1080x720 image with BGR24 pixel format give me 3 * 1280 * 720? (av_image_get_buffer_size)
[00:45:50 CEST] <kepstin> it might have just rounded it up for alignment, and I think parts of ffmpeg require a little extra space after the buffer for various reasons
[00:46:33 CEST] <kepstin> if you used the crop filter on a larger image, it just adjusts some pointers and width/height/stride numbers, it doesn't actually change the buffer size
[01:01:53 CEST] <petecouture> Problem: Your input is RTP live and output is HLS live. Occasionally the RTP feed drops but doesn't disconnect. When the feed comes back ffmpeg doesn't encode any new frames.
[01:02:19 CEST] <petecouture> Question: Is there a flag or procol to set to overcome that or do you have to shut down ffmpeg and start the encoder.
[01:02:30 CEST] <Prelude2004c> hey guys.. good day
[01:02:37 CEST] <petecouture> good day Relude
[01:02:41 CEST] <petecouture> Prelude rather
[01:02:43 CEST] <Prelude2004c> i am sooo really stuck... can i get some help .. Non-monotonous DTS in output stream . over time this happens and id ont know what to do about it
[01:03:11 CEST] <Prelude2004c> its random, comes and goes.. and i would like to say i tried everything likely not since its still broken
[01:03:11 CEST] <Prelude2004c> :)
[01:05:05 CEST] <petecouture> Whats the input output?
[01:05:41 CEST] <Prelude2004c> http://pastebin.com/Q97V3a3J
[01:05:57 CEST] <Prelude2004c> see that code.. the output works well for a while and then randomly.. bahm.. !! it dies off.
[01:06:03 CEST] <Prelude2004c> have to restart stream again
[01:06:35 CEST] <Prelude2004c> tried to add " itsoffset 0 -vsync passthrough -fflags +genpts -ss 0  " .. i also tried vsync 1 async 1.. everything.
[01:06:44 CEST] <Prelude2004c> nothing fixes it :( ..
[01:09:32 CEST] <petecouture> Hmmm first glance this is taking from a hardware transcoder and outputing to a live m3u8 stream?
[01:10:48 CEST] <Prelude2004c> yes its a UDP source.. i am transcoding with NVIDIA hardware and then segmenting it back with m3u8
[02:24:37 CEST] <blue_misfit> Prelude2004c, tried any other formats? Maybe your encoder can make RTMP or something?
[02:36:45 CEST] <TAFB> how can I loop a playlist with ffmpeg? Using 3.0.1 :)
[02:38:29 CEST] <TAFB> my command right now, only loops one file: ffmpeg -re -stream_loop -1 -i video.mp4 -c copy -vbsf h264_mp4toannexb -flags -global_header -hls_time 60 -hls_list_size 600 -hls_wrap 600 -start_number 1 /HLS/live/mystream/index.m3u8
[03:18:32 CEST] <krompus> hey guys
[03:19:11 CEST] <krompus> My friend asked me an interesting question. Is there any way of converting 360 degree video to 2D? basically raise the FOV?
[04:27:59 CEST] <TAFB> where do I put "safe 0" for concat??
[04:33:06 CEST] <c_14> TAFB: before -i on the concat input
[04:33:32 CEST] <TAFB> ok, thanks! I tried it but I'm getting "Packet header is not contained in global extradata, corrupted stream or invalid MP4/AVCC bitstream"
[04:33:39 CEST] <TAFB> Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument
[04:34:12 CEST] <TAFB> full command line: ffmpeg -re -stream_loop -1 -f concat -safe 0 -i list.txt -c copy -vbsf h264_mp4toannexb -flags -global_header -hls_time 60 -hls_list_size 600 -hls_wrap 600 -start_number 1 /dev/shm/mystream/index.m3u8
[04:36:07 CEST] <c_14> It looks like it doesn't like (one of) your input videos
[04:36:18 CEST] <c_14> Have you tried getting rid of the vbsf?
[04:36:29 CEST] <TAFB> i'll try :)
[04:37:03 CEST] <TAFB> works, I'll see if the HLS is corrupted though, that's why I had to put that filter in :) 1 sec.
[04:42:45 CEST] <TAFB> looks like it's working but when it gets to the end of the playlist, it doesn't loop.
[04:42:54 CEST] <TAFB> stream_loop 1 was making it loop before :)(
[04:55:51 CEST] <c_14> I don't think I've ever had stream_loop loop the concat demuxer, let me test
[04:58:41 CEST] <c_14> nope, wont loop
[05:02:08 CEST] <TAFB> bummer
[05:02:25 CEST] <TAFB> any way to make it loop without breaking the stream you think? :(
[05:04:14 CEST] <c_14> for i in `seq 9001`; do cat concat >> concat; done
[05:05:29 CEST] <TAFB> that might work, lol
[05:06:17 CEST] <c_14> I don't care how short your videos are, you won't reach the end of that list.
[05:07:07 CEST] <TAFB> i'm running it now :)
[05:07:26 CEST] <c_14> eeeh, I do hope you didn't copy that exactly
[05:07:31 CEST] <c_14> your hdd probably isn't big enough
[05:08:24 CEST] <TAFB> i just copied the file around 100 times over
[05:08:37 CEST] <c_14> Ok, that should be enough
[05:09:02 CEST] <c_14> 2^9000 copies would be a _tad_ bit overkill
[05:13:38 CEST] <TAFB> looks like it messes up when it gets to the third file in the list, speed 3.75x?!? :(
[05:14:04 CEST] <c_14> Are the files all the same format? codec, pixel format, etc?
[05:14:31 CEST] <TAFB> they should be but it's spitting out "[mov,mp4,m4a,3gp,3g2,mj2 @ 0x362c560] Auto-inserting h264_mp4toannexb bitstream filter" as it's playing
[05:14:37 CEST] <TAFB> I needed that filter before to fix the same problem
[05:15:07 CEST] <c_14> Does it do that once or every time it switches files?
[05:15:23 CEST] <TAFB> i think so
[05:15:35 CEST] <c_14> Which?
[05:16:08 CEST] <TAFB> which what?
[05:16:21 CEST] <c_14> 03:15 <c_14> Does it do that once or every time it switches files?
[05:16:31 CEST] <TAFB> every time it switches files
[05:16:39 CEST] <c_14> hmm
[05:16:59 CEST] <c_14> And it messes up at the third file?
[05:17:03 CEST] <TAFB> and after it messed up on the 3rd file, it stops writing to index.m3u8
[05:17:16 CEST] <c_14> Is the output video grey or black?
[05:17:28 CEST] <c_14> after it messes up?
[05:17:34 CEST] <TAFB> the live stream player says "error loading media, next segment not found"
[05:18:17 CEST] <TAFB> to rule it out being a video problem I've repeated video 1 twenty times in the playlist, same issue
[05:19:05 CEST] <c_14> What you could do is remuix each of the input videos to mpegts individually and then run concat on those
[05:21:07 CEST] <TAFB> I think the best option would be to run a ffpeg with the stream_loop 1 and send the stream to ffpeg to make the HLS stuff. Should be possible right?
[05:22:23 CEST] <c_14> if you can get it working, sure
[05:22:50 CEST] <TAFB> i think that'll be the best option :(
[05:28:52 CEST] <TAFB> hls_playlist_type event
[05:29:18 CEST] <TAFB> looks like I can just append the index.m3u8 instead of it overwriting it each loop.
[05:29:34 CEST] <TAFB> but the longer I run it the more segment video files it'll dump on the server, lol :(
[05:45:50 CEST] <TAFB> lol! My ISP throttles videos (youtube, etc.) and it was throttle my stream really bad
[05:46:08 CEST] <TAFB> I changed the filenames from .ts to .html and no more throttling, SUPER fast now! lol
[05:48:31 CEST] <TAFB> ahhh, fix it. :)
[05:48:57 CEST] <TAFB> i transcoded all the videos into one video file, and just used the stream_loop on that one large video, works flawless.
[05:52:02 CEST] <petecouture> Peoples opinions on ffserver?
[05:54:00 CEST] <furq> it's bad
[05:54:02 CEST] <furq> don't use it
[06:15:38 CEST] <Xen0> right now to go from a mkv with .ass subtitles i have been using the -vf ass=sub.ass whith h264 but my end goal is webm with libvpx so im basically encoding twice am i wasteing time doing this or will video filter flag work with libvpx?
[06:15:53 CEST] <furq> of course it will
[06:16:31 CEST] <Xen0> oh
[06:16:39 CEST] <furq> what gave you the impression it wouldn't
[06:16:58 CEST] <Xen0> nothing jus i couldnt find anything saying implicitly that it would
[06:20:49 CEST] <thebombzen> is there a way to get FFmpeg to render ASS subs with libass in one shot? currently I have to dump the font attachments, install them, extract the subs with -c copy, and then run -vf ass. is there an easier way to do it, like how mpv or mplayer can render the subs directly from the original container?
[06:22:37 CEST] <relaxed> thebombzen: to hardsub, ffmpeg -i video.mkv -vf subtitle=video.mkv ...
[06:23:53 CEST] <relaxed> er, -vf subtitles=   https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
[06:27:09 CEST] <Xen0> if you use subtitles=foo.mkv you dont have to map the stream?
[06:28:03 CEST] <Xen0> or no so long as its the default language?
[06:28:21 CEST] <thebombzen> no apparently that worked, huh
[06:28:46 CEST] <thebombzen> I had tried that before, but there were []s in my filename so I didn't realize I had to escape it
[06:28:59 CEST] <thebombzen> is there any easy way to escape a filename for use in an FFmpeg filter?
[06:29:57 CEST] <relaxed> Xen0: it picks the default, but you can change it with the filter
[06:31:23 CEST] <thebombzen> relaxed: is there a way to render ASS subs with -filter_complex?
[06:31:42 CEST] <thebombzen> specifying the filename twice just seems bad to me
[06:31:55 CEST] <Xen0> ok that makes sense thank for your guys help
[06:32:22 CEST] <Xen0> iv been makeing extra work for myself out of ignorance
[07:21:25 CEST] <relaxed> thebombzen: pretty sure you have to use the filename with subtitles filter
[07:21:38 CEST] <thebombzen> darn
[07:21:56 CEST] <thebombzen> escaping filenames in the ASS filter is annoying
[07:22:00 CEST] <thebombzen> or the subtitles filter
[07:23:28 CEST] <relaxed> for i in *.mkv; do ffmpeg -i "$i" -vf subtitles="$i" output; done
[07:27:42 CEST] <petecouture> can multiple ffmpeg connections attach to a single rtp broadcast? I'm trying to spawn two ffmpeg commands with the same sdp file connecting to a rtp broadcast
[07:27:59 CEST] <petecouture> Not sure if I'm doing that right. Some examples I see show ffmpeg with a single input and multiple outputs
[08:07:19 CEST] <petecouture> Sweet, ok I figured out to do multibit rate from the same command line.
[08:08:36 CEST] <petecouture> So question. I'm transcoding a single live stream to a multiple HLS outputs. For those with experience, if/how would I align an audio only track to a video track? Or do I not need to?
[08:14:06 CEST] <petecouture> Never mind. The segments are created at the same time so it's aligned
[09:53:28 CEST] <pikaro> hi! I can't find the documentation for the hotkeys in ffmpeg command line. when I press the left arrow key, it apparently increases a parameter called debug, right opens a command prompt, and there appear to be more. I have no idea how to stop some of the behaviors they produce, for instance one turns on some kind of debug mode that fills the terminal with massive amounts of spew. any help?
[10:20:36 CEST] <Guest85077> I am trying to encode a m3u8 url using ffmpeg and i get alot of
[10:20:37 CEST] <Guest85077>  skipping 1 segments ahead, expired from playlists
[10:21:11 CEST] <Guest85077> So wondered if someone could help me encode/transcode a m3u8 url to rtmp
[10:24:38 CEST] <Guest85077> i have a strong feeling that its due to connectivity of origin m3u8 url (buffering/stuttering etc) but can anything be done to make the rtmp not halt. like inforce a delay in the stream
[13:30:11 CEST] <StyXman_> do video files have an equivalent of exif? if so, how can I access them with libav or similar?
[14:34:56 CEST] <DHE> are the doxygen docs for ffmpeg available for download? building them is... annoying.
[15:11:41 CEST] <sasha> I'm struggling with doing a double pass with ffmpeg, I keep getting [NULL @ 0x7fbd01804800] Unable to find a suitable output format for '1'
[15:12:14 CEST] <sasha> the command I'm using:   ffmpeg -b:v $bitrate -pass 2 -v warning -i $input -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $output
[15:12:44 CEST] <sasha> filters are filters="fps=10,scale=$scale:-1:flags=lanczos"
[15:12:50 CEST] <sasha> any ideas where I'm going wrong?
[15:13:04 CEST] <sasha> I'm trying to generate a gif that fits within out issue trackers' file size limit
[15:17:43 CEST] <sasha> nevermind, my input bitrate was a number and not appended with anything (k)
[15:49:19 CEST] <Prelude2004c> hey guys.. good day
[15:49:26 CEST] <Prelude2004c> having some serious issues wiht " Non-monotonous DTS in output stream " can anyone help?
[15:49:35 CEST] <Prelude2004c> not sure but randomly i keep getting errors with : Non-monotonous DTS in output stream
[15:50:06 CEST] <Prelude2004c> i am capturing the stream in UDP > Transcoding with NVidia Hardware > and merging audio/video back with ffmpeg.. somehow Non-monotonous DTS in output stream pops up on channels once in a while and the only solution is to restart the stream
[15:50:08 CEST] <Prelude2004c> any ideas ?
[15:53:37 CEST] <jkqxz> Prelude2004c:  What is actually wrong?  Is the output invalid somehow?
[15:53:53 CEST] <Prelude2004c> no its valid.. somehow DTS starts to drift over time
[15:54:07 CEST] <Prelude2004c> when i restart its ok. someimtes for a day ... sometimes for two.. the source is satelite so ..
[15:54:21 CEST] <Prelude2004c> its very unpredicatable but using another encoder i have no issues.. but they don't use ffmpeg
[15:54:44 CEST] <Prelude2004c> the errors may exist but the encoder handles it .. i tried to vsync and async but nothing.. in fact soon as i run async it overloads the cpu's
[15:54:53 CEST] <Prelude2004c> i guess due to the -af having to look at al the packets
[15:58:35 CEST] <Prelude2004c> i don't know what to do so the system continues or tries to keep the audio/video in sync
[15:58:40 CEST] <Prelude2004c> and not exit with errors
[15:58:43 CEST] <jkqxz> If the output is valid, what is the problem?
[16:02:02 CEST] <Prelude2004c> its not.. the ffmpeg starts to crash and doesn't write the output
[16:02:28 CEST] <Prelude2004c> i get the " Non-monotonous DTS in output stream " .. and then the segments stop writing
[16:02:38 CEST] <yzT> hi! a question not directly about ffmpeg, but guess you may know the answer. Is CENC applicable to HLS? Or just to MPEG-DASH?
[16:02:59 CEST] <yzT> is there any other channel about streaming in Freenod?
[16:04:13 CEST] <JEEB> yzT: CENC is MPEG-DASH specific
[16:04:27 CEST] <JEEB> HLS standard encryption also uses AES-128, but IIRC in another mode
[16:04:35 CEST] <yzT> ok, that's why I thought
[16:04:45 CEST] <JEEB> but the "Common Encryption" specification is an addition to MPEG-DASH
[16:04:52 CEST] <JEEB> since it talks about the manifest etc
[16:05:31 CEST] <yzT> so, for HLS there is no standard for different DRM, right?
[16:06:02 CEST] <JEEB> there is no standard DRM for HLS, only the standard AES-128 where you have a link towards the key in the playlist
[16:06:42 CEST] <andrey_utkin> is there some filter just to change opacity of frame? i need it to overlay bigger frame afterwards. So "blend" doesn't work. Maybe "geq" would do the work, but "geq=alpha_expr=0.5" gives error "A luminance or RGB expression is mandatory" which I'm not sure how to overcome.
[16:07:03 CEST] <yzT> ok cool
[16:07:36 CEST] <colde> yzT: well, there is to different AES encryptions that are standard for HLS
[16:08:03 CEST] <colde> But there is no DRM component in the format itself
[16:08:24 CEST] <colde> There is however DRM versions that work for HLS, and usually it is just a matter of adding an extra line tot he manifest
[16:08:37 CEST] <durandal_1707> andrey_utkin use blend with expression
[16:10:05 CEST] <yzT> colde: but in this case, I'd need to integrate each DRM system, right?
[16:10:29 CEST] <yzT> Is there any free solution of a keyserver for testing purposes?
[16:10:33 CEST] <colde> yzT: yeah, but you sort of need to do that with CENC as well
[16:11:04 CEST] <colde> yzT: you can use a HTTP server as a keyserver if you are worried about testing the encryption implementation
[16:11:09 CEST] <yzT> I thought CENC's purpose was precisely to be transparent ><
[16:11:27 CEST] <colde> yzT: it is transparent, and the way it is encrypted is the same
[16:11:37 CEST] <colde> yzT: but the specific headers for each DRM system is still present
[16:12:03 CEST] <yzT> ok
[16:13:11 CEST] <colde> yzT: just out of curiosity, what are you trying to build?
[16:13:39 CEST] <yzT> anything at all. Just trying to understand the security behind the HLS and DASH ecosystem
[16:14:29 CEST] <colde> yzT: CableLabs have a very good overview for DASH here: https://html5.cablelabs.com/mse-eme/doc/overview.html
[16:14:53 CEST] <colde> With two of the very common DRM vendors as well as the completely open ClearKey implementation
[16:15:04 CEST] <yzT> cool, ty
[16:16:25 CEST] <colde> yzT: oh, and MS is fairly open about their standards for the DRM ecosystem: https://www.microsoft.com/playready/documents/
[16:16:29 CEST] <colde> you are welcome :)
[16:20:46 CEST] <Prelude2004c> just had the new error again : ] Non-monotonous DTS in output stream 0:1; previous: 10212962684, current: 1656568443; changing to 10212962685. This may result in incorrect timestamps in the output file.
[16:20:50 CEST] <yzT> so, let me clarify the scenario.. xD two companies (the content maker) A and B have a different DRM system. Then another company (the streaming provider) C uses CENC to integrate the DRM of A and B. And finally the user sees the video by using either HLS or DASH
[16:21:07 CEST] <Prelude2004c> anyone know how i can prevent ffmpeg from exiting out or correcting this error
[16:22:03 CEST] <jkqxz> Prelude2004c:  Does "-vsync 0" change the behaviour at all?
[16:25:39 CEST] <BtbN> that's not an error, it does not cause ffmpeg to exit.
[16:25:55 CEST] <BtbN> And it usually means your input data is broken.
[16:26:16 CEST] <Prelude2004c> no tried that
[16:26:30 CEST] <Prelude2004c> let me show you the code i am working with
[16:27:29 CEST] <Prelude2004c> http://pastebin.com/GTZU33ae
[16:28:42 CEST] <Prelude2004c> i am working with an over the air and satelite feed... i can't change the source .. but i have to somehow adjust for the error and stuff...  So i am taking an over the air satelite source.. > UDP MULTICAST > ffmpeg input > transcode with nvidia hardware > output to ffmpeg and encode audio ... then segment out
[16:29:26 CEST] <learner123woo> Hello. I wrote my first little python app that records entire screen+audio using avconv and I'm pretty happy with that
[16:29:27 CEST] <Prelude2004c> -vsync 1 -fflags +genpts i added this to play with it but..
[16:30:14 CEST] <learner123woo> Now I would like to go one step forward and make the app capture only one browser tab and its audio. Can someone more experienced tell me if it is possible?
[16:33:55 CEST] <Prelude2004c> should i try to use -frame_drop_threshold ?
[16:35:41 CEST] <Prelude2004c> or even -start_at_zero ?
[16:35:42 CEST] <andrey_utkin> durandal_1707, but with blend i need to pad my overlay image and I don't see how do make it not to break the padded zone. This command kind of succeeds, but all other background picture is affected by blending. https://gist.githubusercontent.com/andrey-utkin/7d9e335765b23913ff7fd1e11b9135b3/raw/c14a1e0f988ec222dc0c8d7e5a4c34049a6c87b1/gistfile1.txt
[16:40:03 CEST] <Prelude2004c> BtbN ? your usually very good at this sort of stuff
[16:40:03 CEST] <colde> yzT: What you are describing is certainly possible. But it would mean sharing the keys tot he content. And would for anything but DASH most likely require several renditions
[16:40:14 CEST] <colde> yzT: or using something like unified streaming to formatshift on the fly
[16:45:28 CEST] <jkqxz> Prelude2004c:  Does NvTranscoder (I'm assuming that's the nvenc example program) actually take an MPEG-TS stream as input?  (It looks like it takes an elementary stream, which might kindof work with MPEG-TS because it still has the start codes and can ignore the headers as random garbage, but I wouldn't want to rely on that being sensible at all.)
[16:50:17 CEST] <Zevv> Hi #ffmpeg. I'm porting a desktop app to raspberry; I've built libavcodec with mmal acceleration, which works fine when running with ffmpeg with the cmdline "-vcodec h264_mmal"
[16:50:54 CEST] <Zevv> my app uses probing to find the codec, and does not use the mmal_h264 if a h264 stream is found
[16:51:14 CEST] <Zevv> is there some way to tell libavcodec to use a 'preferred code', or should I just configure the codec manually when the probing detected a h264 stream?
[17:03:12 CEST] <Prelude2004c> jkqxz i wish i knew what it does.. we are pipping the data to it have it transcode and spit the result back out
[17:03:21 CEST] <Prelude2004c> then ffmpeg joins that with the audio and makes it work
[17:03:32 CEST] <Prelude2004c> i take it that it's meant to do that but...
[17:11:24 CEST] <andrey_utkin> this also doesn't result in semi-transparent overlay :( ffplay -f lavfi -i "testsrc=size=1920x1080,format=pix_fmts=yuva420p[bg]; testsrc,format=pix_fmts=yuva420p, geq=lum_expr=lum(X\,Y):cb_expr=cb(X\,Y):cr_expr=cr(X\,Y):alpha_expr=0.5 [overlay]; [bg][overlay]overlay=shortest=1:eval=init"
[17:15:55 CEST] <jkqxz> Prelude2004c:  Well, why are you transcoding the video at all there?
[17:22:31 CEST] <andrey_utkin> oh, but this works: ffplay -f lavfi -i "testsrc=size=1920x1080,format=pix_fmts=yuva420p[bg]; testsrc,format=pix_fmts=yuva420p, geq=lum_expr=lum(X\,Y):cb_expr=cb(X\,Y):cr_expr=cr(X\,Y):alpha_expr=0.5*alpha(X\,Y) [overlay]; [bg][overlay]overlay=shortest=1:eval=init" (alpha_expr now includes alpha(), so bare numeric value doesn't work)
[17:31:01 CEST] <Prelude2004c> jkqxz > the video is h264 running at like 8 - 10 Mbit/s.. and i am transcoding back to 720p at 1.8Mbit/s
[17:34:22 CEST] <jkqxz> And you are highly resource-constrained such that using x264 to encode there is not possible?  (It would avoid all the multiple processes and nasty piping.)
[17:35:25 CEST] <Prelude2004c> but nvtranscoder only does video right
[17:35:38 CEST] <Prelude2004c> yes i have to use hardware encoding
[17:40:54 CEST] <jkqxz> Reducing the number of variables seems like a sensible move.  Can you at least test with x264 in one process (possibly with lower resolution or something if you're on a slow platform) and eliminate the pipes?
[17:41:30 CEST] <TAFB> i need some help with HLS :( I'm using it to stream an 8 hour live stream. I want a 1 hour playlist (so deletes video segments older than one hour and removes them from the playlist). I can't seem to get hls_wrap and hls_list_size set properly. I set them both to 60 but after 1 hour something weird happens were it just keep playing the last video segment, and if I skip back 1 hour, it's playing
[17:41:30 CEST] <TAFB> the new segments?!? lol :(
[17:41:42 CEST] <t4nk978> Hey ;) , is it possible to run FFserver on centos?
[17:41:53 CEST] <t4nk978> it always say "aborted"
[17:43:47 CEST] <TAFB> ahhhhhh hls_flags delete_segments
[17:43:52 CEST] <TAFB> i think that's what I need :)
[19:04:49 CEST] <Justus> hi, I'm looking into screenrecording with ffmpeg, sadly I can't seem to find a way to only record a specific window, all google searches I have managed to come up with just yielded different variations on capturing a screen area. Is it possible to record really only one specific window no matter what is on top of it?
[19:09:26 CEST] <jkqxz> Recording individual windows is possible, but isn't implemented directly in ffmpeg (hacking the xcbgrab input to do it would be straightforward, for example, because it is actually taking part of a window area which currently always happens to be the root window).
[19:10:09 CEST] <jkqxz> The "no matter what is on top of it" part is much harder because areas which are no visible need not be drawn, so the information may just not be there.
[19:10:45 CEST] <zZap-X> Tonights mission: Get my webcam to stream video to nginx-rtmp module using ffmpeg, and making sure video works on IOS and Android
[19:11:23 CEST] <Justus> jkqxz: If I understand it correctly it needs to be supported by the OS, windows actually does so
[19:11:42 CEST] <Justus> jkqxz: but if I understand you correctly there is no way to utilize this currently in ffmpeg?
[19:16:18 CEST] <jkqxz> Screen capture in Windows is all over the place - there are many different ways to do it, all with different deficiencies.
[19:16:52 CEST] <jkqxz> ffmpeg does not attempt to solve any of this problem - there is a simple capture driver which mostly works, and noone has put in the required effort to do better.
[19:18:34 CEST] <zamba> furq: hi again.. are you available to debug my audio sync issues?
[19:20:43 CEST] <furkan> i'm streaming mp3 audio over RTP from a sound system connected to the network, but don't have an SDP file, but FFMPEG seems to be able to correctly "guess" the parameters like the bit rate etc., so is there any way that I can make it generate the SDP file which I can then use with other applications?
[19:22:10 CEST] <zamba> why is a/v sync so incredible hard to get right?
[19:25:54 CEST] <zZap-X> I produced a .mp4 from my webcam using the following: ffmpeg -s 640x480 -f video4linux2 -i /dev/video0 -vcodec h264 test.mp4   It plays on Chrome but does not play in Safari?
[19:48:29 CEST] <pfelt> afternoon all.  i'm trying to generate a video of nothing but black using the movie filter.  i can't seem to find the right settings when i set filename=/dev/zero for it to actually generate the sequence.  anyone know if this is possible?
[19:50:38 CEST] <BtbN> testsrc or something is probably the better choice for that
[19:53:07 CEST] <pfelt> BtbN: there are several other options that work fine. i'm using movie and exposing process_command() in it so that i can change the filename on the fly
[19:53:26 CEST] <pfelt> basically i need movie to just pause reading from a stream without hanging the entire process
[19:54:07 CEST] <BtbN> reading all zeros will most likely be unexpected and cause an error
[19:54:08 CEST] <pfelt> -i would be ideal, but i don't see anywhere that i can actually do what i'm looking for
[19:54:29 CEST] <pfelt> yeah.  it does.  just wondering if there is some clever way to do it
[19:55:50 CEST] <DHE> API question. I'm trying to encode to x264. It's working, but unless I set tune=zerolatency I get bad frames back. Like only 1/3 to 1/2 the frame is rendered and everything under it is a smudge. playback of the encoded stream shows no decoder errors but it's unwatchable
[19:58:30 CEST] <DHE> setting zerolatency x264 mode renders perfectly
[20:01:49 CEST] <kepstin> could be a frame ordering issue, setting zerolatency tune disables bidirectional predicted frames
[20:04:11 CEST] <zZap-X> wow got it working :D a cross platform mp4
[20:04:35 CEST] <zZap-X> ffmpeg -s 640x480 -f video4linux2 -i /dev/video0 -vcodec h264 -profile:v baseline -level 3.0 -pix_fmt yuv420p test.mp4
[20:04:39 CEST] <zZap-X> works on safari and chrme
[20:05:09 CEST] <kepstin> zZap-X: you don't need the profile or level options, the pix_fmt should be sufficient
[20:05:24 CEST] <zZap-X> aye ok
[20:06:11 CEST] <kepstin> by default if you use screengrab, it's converted to a 4:4:4 yuv mode rather than 4:2:0, and not all decoders can handle that. It should have printed a warning on the console if you're using a recentish ffmpeg
[20:06:55 CEST] <kepstin> hmm, that's not screengrab, that's a webcam, odd.
[20:08:24 CEST] <furq> you need baseline if you want to support really old phones
[20:08:48 CEST] <zZap-X> wow this works too
[20:08:49 CEST] <zZap-X> ffmpeg -s 640x480 -f video4linux2 -i /dev/video0 -vcodec h264 -profile:v baseline -level 3.0 -pix_fmt yuv420p -map 0:0 -f flv -rtmp_buffer 100 -rtmp_live live rtmp://example.org:1935/hls/movie
[20:09:02 CEST] <zZap-X> the rtmp stream works in safari and chrome!
[20:09:07 CEST] <zZap-X> that means it might work on a iphone
[20:09:10 CEST] <furkan> does anybody know how to deal with this error? "Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead."
[20:09:15 CEST] <furkan> i'm googling it and can't find anything
[20:09:55 CEST] <furkan> i'm just running "ffmpeg -f mp3 -i test.mp3 -f rtp rtp://IP:port"
[20:14:05 CEST] <BtbN> by ignoring it
[20:14:10 CEST] <BtbN> unless you are using the api yourself
[20:14:10 CEST] <kepstin> furkan: that's not an error, just a warning, and its target audience is ffmpeg developers not users.
[20:15:59 CEST] <furkan> oh i see, thanks
[20:16:19 CEST] <furkan> ah i get it... i thought it wasn't streaming because i was just getting kicked back to the prompt
[20:16:35 CEST] <furkan> but the file was just so small that it sends the whole thing in an instant
[20:17:02 CEST] <kepstin> if you want to stream a file at 'realtime playback' speeds, you'll want to use the '-re' input option :)
[20:17:18 CEST] <furkan> kepstin: thanks :) any way i can loop it too?
[20:17:47 CEST] <kepstin> furkan: sure. I suggest opening your nearest web browser to the ffmpeg tool docs and giving the old ctrl-f 'loop' a try ;)
[20:18:45 CEST] <zZap-X> the video works on Android!! time to test on Iphone
[20:20:35 CEST] <furq> Justus: https://www.ffmpeg.org/ffmpeg-devices.html#gdigrab
[20:20:44 CEST] <furq> that might do what you want for video, but not for audio
[20:21:40 CEST] Action: kepstin makes no promises that the window selection in gdigrab will actually pick the right window :/
[20:22:07 CEST] <furq> yeah, that's why i said "might"
[20:22:21 CEST] <furq> i seem to recall it's not particularly reliable
[20:22:33 CEST] <furkan> kepstin: haha well i had tried "ffmpeg --help | grep loop" but it looks like not all the options are listed there
[20:22:45 CEST] <furq> furkan: ffmpeg -h full
[20:23:10 CEST] <furkan> furq: wow! thanks haha
[20:24:27 CEST] <pfelt> is it possible to sendcmd to a specific instance of a filter?
[20:25:47 CEST] <furkan> i think there might be a mistake in the documentation? https://ffmpeg.org/ffmpeg.html
[20:25:53 CEST] <furkan> -loop_input
[20:25:55 CEST] <furkan>     Loop over the input stream. Currently it works only for image streams. This option is used for automatic FFserver testing. This option is deprecated, use -loop 1.
[20:26:13 CEST] <furkan> but when i try -loop 1 it says "Option loop not found"
[20:26:27 CEST] <furq> i think it was replaced with -stream_loop
[20:26:35 CEST] <furkan> further down there's "stream_loop" yeah
[20:26:42 CEST] <furkan> -stream_loop number (input)
[20:26:44 CEST] <furkan>     Set number of times input stream shall be looped. Loop 0 means no loop, loop -1 means infinite loop.
[20:26:54 CEST] <furkan> so i guess that "loop -1" must be wrong
[20:27:12 CEST] <furq> speaking of mistakes in the docs
[20:27:14 CEST] <furq> https://www.ffmpeg.org/ffmpeg-formats.html#mov_002fmp4_002f3gp_002fQuicktme
[20:28:49 CEST] <furkan> i get a "Resource temporarily unavailable" when it tries to loop
[20:28:59 CEST] <furkan> like the file plays the first time, but then when it tries to loop around it fails
[20:29:13 CEST] <furkan> using -stream_loop -1
[20:31:28 CEST] <kepstin> hmm, oh, right, I forgot that the '-loop 1' option is only available on the image2 demuxer :/
[20:31:42 CEST] <kepstin> I'm not sure there is actually a good way to loop arbitrary inputs
[20:32:28 CEST] <kepstin> you can use the 'loop' filter, but that actually buffers all the input frames in ram, iirc :/
[20:36:00 CEST] <furkan> in my case it's just an mp3 file though
[20:36:02 CEST] <furkan> no video
[20:36:52 CEST] <llogan> furq: what's the mistake in that link?
[20:36:59 CEST] <furq> in the title
[20:37:11 CEST] <llogan> ah.
[20:43:23 CEST] <DHE> <kepstin> could be a frame ordering issue, setting zerolatency tune disables bidirectional predicted frames  # if I set the GOP setting to 1 (all key frames) I still get this graphical anomaly. that should defeat that, right?
[20:45:42 CEST] <llogan> furq: fixed. thanks.
[20:45:56 CEST] <kepstin> the only other thing i can think of is that maybe some of the buffer memory management isn't write, and you're getting incompletely encoded frames from the multithreaded encoding? That shouldn't happen if you're using the avcodec stuff correctly tho.
[20:45:58 CEST] <llogan> it may take a day for docs to regen
[20:46:40 CEST] <DHE> kepstin: yeah I'm at a loss what's causing this...
[20:58:57 CEST] <explodes> using the library to decode video - i'm using 30% cpu, and a ton of memory
[21:01:01 CEST] <durandal_1707> what video?
[21:22:43 CEST] <DHE> I don't think it's out of order encoding. If I set zerolatency but then enabled bframes it works out
[21:22:53 CEST] <DHE> more experimentation needed
[21:24:18 CEST] <BtbN> did you verify the output actualy has b frames?
[21:26:44 CEST] <DHE> BtbN: yes, ffprobe -show_frames
[21:33:15 CEST] <DHE> I traced it down to a single parameter that affects it: force-cbr. Now I need to figure out what I'm doing wrong that angers x264 in this way
[21:41:19 CEST] <DHE> I think I got it...
[21:45:23 CEST] <Magmatic> Hi everyone.  I'm trying to stream from rtp to an icecast server, and I've got it working.  Yay!  But when I run a second command, listening for rtp on a different port, I get an error.
[21:45:35 CEST] <Magmatic> The error is: bind failed: Address already in use.
[21:46:27 CEST] <Magmatic> The full command I'm running is something like this: ~/bin/ffmpeg -v error -i rtp://192.168.10.16:5801  -legacy_icecast 1 -content_type audio/mpeg -ice_name "Channel1" -f mp3 icecast://source:hackme@example.com:8000/channel1 > /dev/null 2>&1 < /dev/null &
[21:46:35 CEST] <Magmatic> Any ideas?
[21:47:27 CEST] <Magmatic> The second command would look like this: ~/bin/ffmpeg -v error -i rtp://192.168.10.16:5802  -legacy_icecast 1 -content_type audio/mpeg -ice_name "Channel2" -f mp3 icecast://source:hackme@example.com:8000/channel2 > /dev/null 2>&1 < /dev/null &
[21:48:35 CEST] <Magmatic> (I compiled ffmpeg from source a week ago)
[21:51:48 CEST] <furq> Magmatic: try setting -local_rtpport or -local_rtcpport
[21:59:08 CEST] <DHE> thanks for being my rubber duckie
[22:08:16 CEST] <Magmatic> Thanks, furq, for the localrtpport idea, but it's still not working for me.
[22:08:22 CEST] <Magmatic> This is the command I'm running now:
[22:08:53 CEST] <Magmatic> ~/bin/ffmpeg -v error -i rtp://192.168.10.16:5801?localrtpport=5801 -legacy_icecast 1 -content_type audio/mpeg -ice_name "Channel1" -f mp3 icecast://source:hackme@example.com:8000/channel1 > /dev/null 2>&1 < /dev/null &
[22:11:06 CEST] <Magmatic> I still get  "bind failed: Address already in use"
[22:24:00 CEST] <explodes> Any reason why "some of the time" the source format in my YUV420p videos would NOT be discovered as YUV420p?
[22:24:38 CEST] <explodes> It's resulting in a SIGABRT in swscale_internal.h: isYUV
[22:29:55 CEST] <furkan> does anybody know how i can tell ffmpeg to only record X number of seconds from an audio stream? over here there's the "aframes" option to set the number of frames, but i'd like to go by duration: http://ffmpeg.org/ffmpeg.html#Audio-Options
[22:32:05 CEST] <kepstin> furkan: you probably want to use the -t option (you can use it as an input option on a specific stream, or as an output option)
[22:33:16 CEST] <furkan> kepstin: thanks i'll give that a try!
[23:17:52 CEST] <Magmatic> I'll answer my own question here.
[23:19:15 CEST] <Magmatic> The reason I was getting a "address already in use" error is because RTP uses two consecutive ports, and I was trying to use bind to the second port as if it were it's own other stream.
[23:33:30 CEST] <zZap-X> how can i stream my webcam from a web gui directly into ffmpeg what is running on the same server?
[23:34:32 CEST] <llogan> what's a web gui?
[23:34:53 CEST] <zZap-X> llogan: like using html5 to access webcam, then send the output to ffmpeg
[23:36:31 CEST] <zZap-X> i guess that would depend on a javascript library what is capable of doing that, i doubt if there is
[23:37:07 CEST] <zZap-X> maybe there is a ffmpeg.hs
[23:37:09 CEST] <zZap-X> maybe there is a ffmpeg.js
[23:43:09 CEST] <fearnothing> hi, having some issues with getting subtitles out, was told you folks might be able to help me
[23:43:29 CEST] <fearnothing> I have some .m4v files ripped with handbrake, and some of them have subtitle tracks
[23:43:51 CEST] <fearnothing> however my media server can't handle the subtitles like that and I've been told to output them to .srt files instead which should work
[23:43:58 CEST] <fearnothing> but when I try to do that, I get an error
[23:44:32 CEST] <fearnothing> "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height"
[23:44:44 CEST] <furq> paste the command line
[23:44:44 CEST] <fearnothing> command is "sudo ffmpeg -i Rashomon.m4v -scodec srt Rashomon.srt"
[23:44:58 CEST] <furq> pastebin the full output as well then
[23:45:08 CEST] <furq> also why are you running that as root
[23:45:36 CEST] <fearnothing> because standard user doesn't have write perms on that directory
[23:47:09 CEST] <fearnothing> https://bpaste.net/show/e45d953dae47
[23:47:48 CEST] <fearnothing> if I try it on a file with no embedded subtitles, it just says the output file is empty
[23:47:53 CEST] <furq> somehow that mp4 file has got dvd subtitles in there
[23:48:07 CEST] <furq> which i didn't even know was possible
[23:48:22 CEST] <furq> -i src.m4v -map 0:3 out.srt
[23:48:24 CEST] <furq> should work
[23:49:09 CEST] <fearnothing> well, I did rip it from a DVD with handbrake
[23:49:26 CEST] <fearnothing> perhaps I used the wrong settings
[23:49:36 CEST] <furq> it has dvd subtitles and text subtitles
[23:49:47 CEST] <furq> so you can just use the text subtitle stream, but you need to select it manually
[23:49:57 CEST] <furq> i just didn't know mp4 could contain picture subtitles
[23:50:07 CEST] <fearnothing> using your command, I got the message that the output file is empty
[23:51:09 CEST] <furq> paste the full output again?
[23:52:01 CEST] <fearnothing> https://bpaste.net/show/4c4f6aa37718
[23:52:17 CEST] <furq> Stream mapping:
[23:52:18 CEST] <furq>   Stream #0:3 -> #0:0 (mov_text (native) -> subrip (srt))
[23:52:22 CEST] <furq> that looks correct to me
[23:52:36 CEST] <furq> are you sure the text subtitle stream isn't empty
[23:52:44 CEST] <JEEB> furq: officially it can't but people have hacked them into it
[23:52:51 CEST] <JEEB> aka it's not specified anywhere
[23:52:53 CEST] <furq> i suspected as much when i saw "handbrake"
[23:53:03 CEST] <JEEB> I'm pretty sure it's not the only thing that lets you do that
[23:53:20 CEST] <JEEB> and handbrake is probably one of the less retarded encoding GUIs out there
[23:53:35 CEST] <furq> handbrake is all right but i know it does some weird shit sometimes
[23:54:12 CEST] <fearnothing> if I play the m4v in VLC, I have 3 subtitles options: 'Track 1 [English]', 'Track 3' and 'Track 3 [English]'
[23:54:15 CEST] <JEEB> GPAC also I think supports the vobsub-in-mp4 thing, not sure if it was originally brought out by nero in their ripping software
[23:54:38 CEST] <JEEB> nero is also the place to thank for the non-MOV style chapters in mp4
[23:54:43 CEST] <furq> fearnothing: can you actually see the text subtitles
[23:55:02 CEST] <fearnothing> Track 1 [English] shows the subtitles correctly
[23:55:12 CEST] <fearnothing> the other two show nothing, and the chapter number, respectively
[23:55:58 CEST] <furq> sounds like the text track is empty then
[23:56:23 CEST] <fearnothing> makes sense... where do I find the actual subtitles then?
[23:56:46 CEST] <furq> track 1 is the actual subtitles but you'll need to convert them with some OCR tool
[23:57:01 CEST] <fearnothing> @_o
[23:57:04 CEST] <furq> i've not done that in years so someone else can probably recommend a decent tool
[23:57:09 CEST] <llogan> or maybe find them online if the timing fits
[23:57:16 CEST] <furq> yeah that can be easier
[23:57:21 CEST] <fearnothing> can't I just rip the DVD again with some other options?
[23:57:27 CEST] <furq> dvd subtitles are images
[23:57:39 CEST] <furq> any method of ripping them to text involves OCR
[23:57:52 CEST] <fearnothing> d'oh
[23:58:11 CEST] <furq> that's why they look blocky and horrible
[23:58:31 CEST] <fearnothing> ok, so I think this is something that will affect more than one of my movies
[23:58:40 CEST] <furq> does your media player play mkv
[23:58:47 CEST] <fearnothing> yes
[23:58:47 CEST] <furq> it might have better luck with dvd subtitles in mkv
[23:58:55 CEST] <furq> since it's not officially supported in mp4
[23:59:06 CEST] <fearnothing> it's plex media server
[23:59:09 CEST] <fearnothing> if that helps
[23:59:14 CEST] <furq> try ffmpeg -i src.m4v -c copy out.mkv
[00:00:00 CEST] --- Thu Apr 14 2016



More information about the Ffmpeg-devel-irc mailing list