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

burek burek021 at gmail.com
Thu Aug 21 02:05:01 CEST 2014


[00:30] <A__> Um...
[01:54] <lockylucy> I want to live broadcoast my current desktop screen and than play that stream in a html file that is on the same machine. I then want to publish that html site to the internet so everybody can see that stream. in other words; broadcoast my desktop to my desktop and then make it viewable through a site that runs locally. I searched for good ways to do this and the best way I THINK is with ffmpeg (libav now).
[01:54] <lockylucy> but the sample's i've seen stream it to a udp://192.x.x.x. is it possible for me to play that udp://192.x.x.x stream embedded in a locally hosted website?
[01:59] <llogan> lockylucy: what do you mean by "libav now"?
[01:59] <lockylucy> llogan: sorry, should mention that I use ubuntu server and that it's deprecated there now
[02:01] <llogan> we can only support ffmpeg from FFmpeg here
[04:59] <amish_ninja> join
[04:59] <amish_ninja> interesting
[04:59] <amish_ninja> Anyone familiar with receiving errors on a direct show capture device after setting a framerate of any type? I get the following regardlesss "No such file or directory"
[10:10] <KU0N> Hello
[10:13] <KU0N> I'd like to cut a video with -vcodec copy, but I'd like it to be frame precise. How can I re-encode the video from the first frame up to the first keyframe, then use vcodec copy between keyframes then again reencode up to the final frame. For example, I have a 20 sec video with keyframe at 0, 5, 10, 15, 20 . If I cut from sec 2 to 17, I'd like sec 2->5 to be rencoded, sec 5->15 to be vcodec copy and 15->17 to be rencodec.
[10:43] <Mavrik> KU0N, ugh
[10:43] <Mavrik> that sounds like a horrible thing to do
[10:43] <Mavrik> just reencode everything -_-
[10:44] <KU0N> I need it to be done very quickly
[10:45] <KU0N> if I cut 10 minutes in a 2h video, I need it to be done in less than 500ms
[10:48] <KU0N> with vcodec copy it takes about 400ms to cut 10minutes in an hours long 1080p vid, but the output file is not frame perfect
[11:21] <Mavrik> KU0N, cut a slightly larger piece
[11:21] <Mavrik> and reencode that one
[11:22] <KU0N> http://stackoverflow.com/questions/25400649/precise-cut-of-remote-video-file
[11:42] <Mavrik> you can't just blindly splice together frames encoded with different settings
[11:42] <Mavrik> in best case it'll look wierd, in worst case you'll choke decoders
[11:50] <KU0N> mavrik mmh, can ffmpeg give me the timing info and extract keyframe->keyframe segment? For example, let's say I have my 20 sec vid with keyframes every 5 sec, I do ffmpeg -ss 7 -i .. -t 6 to get from sec 7 to 13, ffmpeg sees keyframes at sec 5 and 15 and, extract a 10 sec long vid and report "start: 2, end : -2" which means play from sec 2 to sec -2.
[11:51] <Mavrik> ffprobe (and ffmpeg with info filter) can give you information on per-frame basis
[11:51] <KU0N> This way I can add a header to the HTTP response and have a custom HTML5 player seeking to sec 2 and stoping at sec -2
[11:54] <KU0N> I'll dig this route, thanks.
[14:36] <polylux> good afternoon
[14:37] <polylux> quick one about looping a video, what's the best way? just seek to frame zero?
[16:34] <tmkt> Hey Hey..trying to create a thumbnail from a video if i go 70x70 it works fine for the size, but 50x50 and i get sws: filterSize 273 is too large, try less extreme scaling or set --sws-max-filter-size and recompile
[17:24] <Technicus> Hi, I'm trying to convert a file with: "ffmpeg -i in_file.MP4 -ab 128 -b 7772632 -vcodec out_file.mov".  The output I get is: "[aac @ 0x147c7e0] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.", when I include '-strict -2' it produces the same result.  How do I get this file to convert?
[17:38] <Technicus> https://gist.github.com/Technicus/a7ac5cdcf3e4b805b908
[17:39] <c_14> -strict -2 is an output option, not an input option
[17:39] <c_14> place it before 04_test.mov
[19:16] <llogan> polylux: i know of no simple ways unless your player can do it. a lame method: https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join%2C%20merge%29%20media%20files#demuxer
[19:17] <llogan> "loop a video"
[19:24] <Wulf> Hi
[19:25] <Wulf> I encoded a video with ffmpeg, it works for me but other people claim that they can't play it. How would I convert it to a "more compatible" video format?
[19:27] <Wulf> llogan: http://codepad.org/kxjYxLec
[19:27] <llogan> can you show the console output too?
[19:27] <Wulf> llogan: no, don't have it anymore
[19:27] <llogan> then i can only guess.
[19:28] <llogan> how are they playing the output? which players?
[19:28] <Wulf> llogan: no idea. One person is presumely using a macbook
[19:28] <Wulf> *presumably
[19:29] <llogan> 1. get a recent ffmpeg version 2. add "-pix_fmt yuv420p" as an output option. 3. change the input "-r 10" to "-framerate 10" and remove the output "-r 10"
[19:29] <llogan> add "-movflags +faststart" as an output option if viewers are watching via progressive download (like from a web browser)
[19:30] <Wulf> height not divisible by 2
[19:32] <llogan> libx264 with 4:2:0 chroma subsampling requires height and width divisible by 2 meaning you may have to crop, pad, or scale.
[19:32] <Wulf> llogan: http://codepad.org/6gw6Mi2d
[19:34] <llogan> ffmpeg -i input.mp4 -c:v libx264 -vf crop=iw=ih-1,format=yuv420p -movflags +faststart output.mp4
[19:34] <llogan> wait, why are you re-encoding the mp4 file?
[19:35] <Wulf> llogan: don't have the other files anymore
[19:35] <llogan> your console output shows the input is yuv444p which is not decodeable be quicktime, etc
[19:36] <llogan> anyway, the example i provided may work for you
[19:36] <llogan> and them
[19:36] <Wulf> llogan: thanks, I reencoded it. I'll have them check if it plays now :)
[19:37] <llogan> there's a typo. should be crop=iw:ih-1
[19:47] <Azelphur> Hi folks, I've been using VLC to live stream my screen, which works reasonably well but the latency is far too high. Does anyone know if ffmpeg can stream my screen over the network, with minimal latency/buffering?
[19:49] <Mavrik> latency is dependent on your infrastructure, configuration and pipeline
[19:49] <Mavrik> not so much on software... so you'll have to learn what you're doing I'm afraid
[19:50] <Azelphur> Mavrik: the trick I'm trying to pull off here is using an Android tablet as a second monitor, so the stream would be over WIFI on LAN, so the bandwidth and infrastructure is of little concern (802.11n should be fast enough and very low latency)
[19:50] <Azelphur> my approach with VLC worked, but it has 4+ seconds of latency on it sadly
[19:51] <Mavrik> yes because your pipeline buffers video aggresively
[19:51] <Azelphur> indeed, I'd need it to...not do that :)
[19:51] <Mavrik> and no, infrastructure is NEVER of little concern when you want low latency video ;)
[19:52] <Mavrik> yeah, you'll have to tweak VLC encoding parameters to minimize buffers and encode for minimal latency
[19:52] <Mavrik> and make sure your player doesn't buffers too much and that your network equipment doesn't buffer too much ;)
[19:52] <Azelphur> Mavrik: well as much as any advice is appreciated, I was wondering about trying ffmpeg since I spent about 6 hours last night trying to get VLC to lower the buffer size without any luck ;)
[19:53] <Azelphur> although I imagine VLC (for Android) would still need to be the video client
[20:23] <DarkIT1> hi
[20:23] <DarkIT1> is it possible ffmpeg to use mp4 and stdout?
[20:23] <DarkIT1> my command: ffmpeg -i sample.mp4 -filter_complex "drawtext='text=\"Sample Text\"':x=(w-text_w)/2:y=(h-text_h-line_h)/2:fontsize=40:fontcolor=white:fontfile=TimesNewRoman.ttf:enable='between(t,1,5)'"  -f mp4 -
[20:24] <DarkIT1> but I received error:
[20:24] <DarkIT1> ...
[20:24] <DarkIT1> [mp4 @ 0x10400d200] muxer does not support non seekable output
[20:24] <DarkIT1> &
[20:24] <DarkIT1> Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[20:24] <DarkIT1> Conversion failed!
[20:52] <llogan> DarkIT1: the mp4 muxer does not support non seekable output. why do you want mp4?
[20:53] <DarkIT1> because input file is mp4
[20:54] <DarkIT1> I have to return the same file but with added text
[20:54] <llogan> why not output a file instead of -?
[20:57] <DarkIT1> becuase I want to real time render - not wait untill all big  video file is ready and then return to client. But render and return as any data is ready
[21:02] <llogan> DarkIT1: use a different muxer
[21:04] <DarkIT1> do you mean don't use mp4 ?
[21:04] <Mavrik> yes
[21:04] <Mavrik> mp4 isn't a streamable format and cannot be written to a stream.
[21:04] <Mavrik> (target has to be seekable)
[21:05] <DarkIT1> which streamable format is the best for web video?
[21:06] <Chaz6> Best is subjective
[21:06] <DarkIT1> :)
[21:07] <DarkIT1> most non-problematic for web browsers
[21:07] <Mavrik> Hah.
[21:07] <Mavrik> No such thing.
[21:07] <Mavrik> Sorry :)
[21:07] <Mavrik> Restructure your infrastructure or invest into a streaming server.
[21:08] <llogan> it's hard to provide information without knowing what you are doing. you are piping output, but then ask about "web video".
[21:08] <DarkIT1> I have service which should add text and images to existed video and return them ASAP
[21:09] <DarkIT1> clients are web browsers
[21:09] <DarkIT1> that why I dont want to write to file and then return this file because it's too long to wait
[21:09] <Mavrik> You'll have to use RTMP or HLS in Flash then.
[21:10] <Mavrik> or just bear with the delay
[21:11] <DarkIT1> I see
[21:11] <DarkIT1> thanks a lot
[21:12] <Mavrik> DarkIT1, basically the issue is that MP4 has a file index as part of structure
[21:12] <Mavrik> which cannot be written (because it has direct byte offsets in there) before the actual content is written
[21:12] <DarkIT1> I understand
[21:12] <Mavrik> of course, if you want to play it in the browser, that index has to be at the start of the file (or the users will have to download it in full)
[21:12] <Mavrik> hence ffmpeg reserves space, writes file, then returns to write the index in the MOOV atom
[21:13] <DarkIT1> as for streaming is mp4 OK as source file or it's better to prepare in another format?
[21:13] <Mavrik> MP4 is the most widely supported format and it's "ok" for HTML5 video if it's quickstarted
[21:13] <DarkIT1> Mavrick: but it can be fixed by -movflags faststart, right?
[21:13] <Mavrik> it's not the most efficient one (it'll burn alot of bandwidth, especially for seeking) but it's okish
[21:14] <Mavrik> faststart moves MOOV from end to start yes, but that can only be done in a file and after the video is fully encoded
[21:14] <Mavrik> (you can have segmented MP4 but that doesn't help your use-case)
[21:14] <Mavrik> that's why MPEG has a MPEG2-TS standard for streaming, but sadly no browser (except for Safari and mobile devices) supports TS muxed video
[21:17] <DarkIT1> :(
[21:18] <Mavrik> so, use HLS
[21:18] <Mavrik> and use Flash-based player on your site for browsers that don't support it if that's so important for you
[21:18] <Mavrik> do whine to Chrome and Firefox to support HLS on desktop.
[21:29] <DarkIT1> do you mean that flash supports MPEG2-TS
[21:40] <ArunC> Hi, I have a 10 hour long video file and a 8 core box. Using libavcodec, will I be able to decode the frames from the video file using all the cores?
[21:43] <sacarasc> Depends on the codec.
[21:46] <ArunC> sacarasc: Thanks. If that's not possible, I am thinking of a data parallel architecture where a master thread will send the video filename to all the workers (bound to their respective CPU core) and their start time and end time OR start frame number and end frame number.
[21:47] <ArunC> sacarasc: Is it possible to achieve this accurately without missing any frames in the video?
[21:47] <Mavrik> what is your goal really?
[21:48] <Mavrik> what inputs do you have?
[21:48] <Mavrik> what is the desired output?
[21:48] <Mavrik> what is the desired use-case of video output?
[21:48] <Mavrik> you're asking specific questions without providing specific information :)
[21:48] <ArunC> My goal is to decode long videos and perform face detection on them.
[21:49] <ArunC> Input: video file, probably from NFS. I can copy that to local.
[21:49] <Mavrik> in that case decoding the vieo will not be nearly your bottle-neck
[21:49] <Mavrik> so in your place I really wouldn't worry about that until you can optimize your face detection libraries to the point where video decode is the bottle-neck
[21:49] <ArunC> Desired output: RAW or JPEG images
[21:49] <Mavrik> just make sure you're processing frames in parallel
[21:50] <Mavrik> ArunC, btw, when we're talking about video encoding
[21:50] <Mavrik> usually "video file" isn't a specific enough answer :P
[21:50] <ArunC> Mavrik: ah, OK.
[21:50] <Mavrik> because whether the decoder supports multi-threaded decoding is dependant on what kind of video format you have inside your container :)
[21:50] <Mavrik> some decoders support multithreaded decoding, some don't
[21:51] <ArunC> The video file could be of any type (MPEG4, x264, etc)
[21:51] <ArunC> OK..
[21:52] <Mavrik> but as I said, all CV and face detection work I did was heavily bottlenecked by CPU use of the main detection algorithm
[21:52] <Mavrik> video decoding wasn't an issue
[21:52] <ArunC> When the number of cores are less, say, 8 the video decoding is not a bottleneck. But it will become a a bottleneck on my 32 core box.
[21:53] <ArunC> Yeah, my face detection is not a bottleneck on a 32 core box.
[21:53] <Mavrik> did you test that?
[21:53] <ArunC> Just an emperical calculation. Let me explain that.
[21:53] <Mavrik> did you test that the decoder won't keep up with processing algorithms?
[21:56] <ArunC> The video decoding using ffpmeg took around 800 fps. My face detection takes less than 20 ms, which is roughly 50 fps. On a 32 core box, I could parallelize it to 1600 detections per second.
[21:57] <Mavrik> point
[21:57] <Mavrik> yeah, you could slice up the video
[21:57] <Mavrik> I'm just not sure if frame-accurate seeking is in ffmpeg yet
[21:58] <vlatkozelka> hi .. can anyone help me ?
[21:58] <Mavrik> I doubt it.
[21:58] <ArunC> Oh OK. Generally is the seeking done using frame number or the time in the video?
[21:58] <iive> vlatkozelka: nobody can help you,
[21:58] <iive> vlatkozelka: until you say what the problem is...
[21:58] <Mavrik> ArunC, last I checked the API had only time based seeking
[21:58] <vlatkozelka> ok
[21:59] <Mavrik> but that might have changed.
[22:01] <vlatkozelka> Im trying to save a udp stream containing TV channels onto segments ... the recording is fine but , the timestamp is being reset so start is 00:00:00 , everything else is good . I tried -copyts but didnt work and made things worse , now it records like 30 1 second long ts files then  the rest the time i need but still timestamps are reset .
[22:02] <ArunC> Mavrik: thanks, should I check in #ffmpeg-devel?
[22:02] <Mavrik> check what?
[22:02] <Mavrik> check the documentation first :P
[22:02] <ArunC> :) sure, thanks.
[22:05] <vlatkozelka> here are code and logs
[22:05] <vlatkozelka> http://pastebin.com/pRWBaSad
[22:47] <vlatkozelka> Im trying to save a udp stream containing TV channels onto segments ... the recording is fine but , the timestamp is being reset so start is 00:00:00 , everything else is good . I tried -copyts but didnt work and made things worse , now it records like 30 1 second long ts files then  the rest the time i need but still timestamps are reset .
[22:47] <vlatkozelka>  http://pastebin.com/pRWBaSad
[23:41] <RaZoR37> hello! Excuse me, anyone can explain me how to install ffmpeg ? thanks you =)
[23:45] <llogan> RaZoR37: what OS?
[23:46] <RaZoR37> window vista
[23:46] <RaZoR37> 32bitq
[23:48] <llogan> no need to install in a traditional sense. just download, extract, then run it in cmd or whatever Windows users use
[23:48] <RaZoR37> okay thanks! but i don't know how to run it in cmd
[23:49] <llogan> press shift, then right click the "folder" containing the ffmpeg binary, then click "open in cmd" or whatever it says. then in cmd just type "ffmpeg -i input output"
[23:49] <llogan> Actual Windows users here may have a better clue than me.
[23:50] <llogan> you may need 7-zip or equivalent to extract the archive containing ffmpeg
[23:50] <RaZoR37> hmmmm ok, yep i already extracted
[23:51] <RaZoR37> so i lunched in cmd, now if i want to stream a rtmp link in vlc, what's the cmd ? thanks again!
[23:52] <llogan> sorry, but i don't quite understand what you're trying to do
[23:53] <RaZoR37> i need to open a rtmp video in vlc
[23:54] <vlatkozelka> do u need to do that from CLI ?
[23:54] <vlatkozelka> or np using the vlc GUI ?
[23:54] <vlatkozelka> cuz u dont need ffmpeg for i think
[23:54] <RaZoR37> i tried whith rtmpGUI but this is not working
[23:55] <vlatkozelka> hmm
[23:55] <vlatkozelka> do u have link for that rtmp ... or maybe its private
[23:55] <RaZoR37> unfortunelly it's private
[23:55] <vlatkozelka> well
[23:55] <RaZoR37> i found a fail into a website
[23:56] <llogan> you should ask the videolan guys for help if you're using vlc. i'm not sure how ffmpeg is involved here
[23:56] <vlatkozelka> u can do it with ffmpeg w/o vlc
[23:56] <RaZoR37> maybe ffmpeg is not what i need, maybe i need rtmpdump ?
[23:56] <vlatkozelka> for example u could save the stream onto a ts file
[23:56] <vlatkozelka> if that suits u
[23:57] <RaZoR37> the question is : how ? ^^
[23:57] <vlatkozelka> u built ffmpeg ?
[23:57] <RaZoR37> built ? you mean run in cmd ?
[23:57] <RaZoR37> sorry my english is not perfect haha
[23:57] <vlatkozelka> no i mean do u have a working ffmpeg build ?
[23:58] <RaZoR37> i don't think so
[23:58] <RaZoR37> i have ffmpeg 2.3.3
[23:59] <vlatkozelka> ok
[23:59] <vlatkozelka> open cmd
[23:59] <vlatkozelka> and type ffmpeg.exe just to make sure everything is working
[00:00] --- Thu Aug 21 2014


More information about the Ffmpeg-devel-irc mailing list