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

burek burek021 at gmail.com
Fri Apr 11 02:05:01 CEST 2014


[02:20] <vl4kn0> Hi, is there a way to process online video over the https protocol? ffmpeg says it's unsupported protocol
[02:32] <vl4kn0> here's the paste then: http://pastie.org/9069185
[02:34] <salohcin> I was wondering if anyone had any pointers to make a video stream faster, right now I am running the command: ffmpeg -y -f rawvideo -vcodec rawvideo -s 1280x720 -pix_fmt rgb24 -i - -an -c:v libx264 -pix_fmt yuv420p http://localhost:8090/feed1.ffm    which works well for streaming, but is a really slow framerate
[02:36] <salohcin> i have tried using the options -preset ultrafast -tune zerolatency, but I am getting an error "Option preset not found." or "Option tune not found.", any ideas?
[02:36] <salohcin> I am opening ffmpeg from within python and piping raw rgb frames to ffmpeg to encode and stream
[02:37] <klaxa> vl4kn0: that looks like a youtube video, i think those links are not valid for very long
[02:37] <klaxa> also you are missing the output completely
[02:49] <vl4kn0> klaxa: the youtube link's been valid while testing and I don't need to have output to see 'unsupported protocol'
[03:38] <Nomad145> Greetings.  I get the following error while running ffmpeg.  I'm trying to grab frames from an rtsp stream from an IP Based camera and the stream dies after about 30 frames with a sort of error.  All information is included in the paste.  Any help would be greatly appreciated.  http://pastebin.com/xnb4Nfgd
[03:39] <klaxa> you are using avconv, see #libav
[03:39] <klaxa> or get a static build or compile from source
[03:44] <Nomad145> Mmk.  I'll try that.
[04:04] <salohcin> I was wondering if anyone had any pointers to make a video stream faster, right now I am running the command: ffmpeg -y -f rawvideo -vcodec rawvideo -s 1280x720 -pix_fmt rgb24 -i - -an -c:v libx264 -pix_fmt yuv420p http://localhost:8090/feed1.ffm    which works well for streaming, but is a really slow framerate
[04:04] <salohcin> i have tried using the options -preset ultrafast -tune zerolatency, but I am getting an error "Option preset not found." or "Option tune not found.", any ideas?
[04:04] <salohcin> I am opening ffmpeg from within python and piping raw rgb frames to ffmpeg to encode and stream
[04:06] <relaxed> salohcin: I'm guessing your ffmpeg is too old. What's the output of "ffmpeg | sed q"
[04:07] <relaxed> er, ffmpeg 2>&1| sed q
[04:09] <salohcin> that's what my guess was too, I have 1.1.5, but I got the latest from ffmpeg.org, version N-41838-g754f846-
[04:10] <salohcin> that one gives the same error, I'd like to note that the error isn't thrown at startup, but after I send it a single rgb frame
[04:10] <relaxed> do you have multiple versions installed, maybe?
[04:10] <salohcin> I've been on google and I think it might be an error when x264 is invoked
[04:11] <salohcin> I have the latest executable in my home directory and I am running it with a full path, can I not do that?
[04:11] <relaxed> you can
[04:12] <salohcin> are there libraries that it depends on that need to be updated too?
[04:12] <relaxed> run it from the command line and pastebin your complete command and console output
[04:17] <salohcin> http://pastebin.com/6zzDGEEt
[04:26] <salohcin> do i need to specify a video container format like flv?
[04:26] <salohcin> I havn't done streaming before, so I'm still learning how it all works
[04:30] <relaxed> salohcin: ah, you're using my build :)
[04:33] <salohcin> relaxed: bleeding edge?
[04:33] <relaxed> hmm, -preset ultra work with my test
[04:33] <relaxed> ultrafast*
[04:34] <salohcin> I can get it to work too with other configurations, it seems to be this particular way of streaming or something
[04:36] <relaxed> salohcin: what happens if you don't pipe it?
[04:36] <salohcin> for instance if I specify an output container format like "-f flv" it works
[04:37] <salohcin> I just haven't been able to stream an flv properly, I can only get the .swf example from the ffserver website working
[04:37] <relaxed> have you seen https://trac.ffmpeg.org/wiki/StreamingGuide  ?
[04:40] <salohcin> if I don't pipe anything to it, it just hangs with no error, waiting for piped input.  Yeah I have seen the streaming guide, but I wasn't able to find an example of capturing an flv on the client side, I guess I should do more research...
[04:41] <salohcin> out of curiousity, what happens if you do not specify a container format?  Does ffmpeg pick a suitable one for you?
[05:02] <salohcin> relaxed: thank you for your help
[10:17] <tim-kos> hey all, is there a uniform way to preserve embedded audio artwork when converting audio files? I need to support conversions to mp3, flac and alac.
[10:24] <termos> How can I set the movflag in code using the C api?
[13:04] <anshul_> Hi my ffprobe output does not show PAR, is there some extra flag for knowing PAR of video stream
[13:05] <relaxed> anshul_: does it show SAR?
[13:05] <relaxed> they're the same thing
[13:06] <anshul_> no it does not show even SAR
[13:07] <relaxed> anshul_: I see "sample_aspect_ratio=1:1" with, ffpobe -show_streams input
[13:07] <relaxed> ffprobe*
[13:09] <anshul_> I also see that way, thanks
[13:17] <anshul_> my image show SAR as 0:1, is it possible for pixel having such a ratio 0 height to 1 width.
[13:17] <anshul_> even DAR = 0:1
[13:24] <luko28> Hi all, small question: I'm setting rtsp, and want to set multiple transport protocols by av_dict_set(), exactly 'tcp' and 'udp', in that order. How to achieve that?
[13:45] <anshul_> is there any way to dump dvb subtitle  in text format.
[13:46] <plaz> Hi, quick question. Is there a matrix library within ffmpeg that provides basic utility functions such as transposing? I can't seem to find anything in the docs.
[13:46] <anshul_> is there any way to dump dvb subtitle  in text format. using ffmpeg
[13:48] <anshul_> plaz, there is file libavfilter/vf_transpose.c in ffmpeg sr code so you can find some filter for doing same.
[13:55] <barnoux> Hello
[13:56] <barnoux> i would like to know if i can launch various ffmpeg conversion at the same time?
[13:56] <barnoux> on a server
[14:05] <plaz> anshul_: I don't need a filter, I have some internal data (that's really a matrix) represented by a flat array and I would like to transpose it. I wondered if ffmpeg already had the facility for doing commmon matrix operations.
[14:39] <anshul_> barnoux,yes you can
[14:42] <anshul_> plaz, nothing that I know out of that :)
[14:43] <barnoux> anshul, how many conversion process i can launch at the same time?
[14:43] <barnoux> processor is Intel Atom
[14:43] <barnoux> C2750 8 Threads
[14:48] <anshul_> barnoux, You might have to test it, There are lots of thing that matters, so easiest way would be to try manually
[14:49] <barnoux> ok
[15:36] <mintux1> i have two separated file audio .m4a and video .mp4 that i want put audio on video without any change to original quality . i test this command but doesn't work: $ ffmpeg -i 'video.mp4' -i 'sound.m4a' -vcodec copy -acodec copy TestVideoMux.mp4
[15:37] <mintux1> it creates but video file is 59MB while output is 3.6mb
[15:38] <jkli> hello, are green screens signs of low buffer or framerate drops?
[15:39] <mintux1> did you say to me?
[15:40] <mintux1> it's my output
[15:40] <mintux1> http://codepad.org/HZjLOlil
[15:42] <jkli> did you test if it reads m4a correctly?
[15:43] <mintux1> jkli: the output is only audio file
[15:43] <jkli> you might need to reencode the audio
[15:43] <jkli> also if the original already has audio
[15:43] <jkli> you might need to use the map directive
[15:44] <jkli> which is a bit hasslesome
[15:44] <relaxed> mintux1: try,  ffmpeg -i 'Amir Farjam - Zendegi Ba To OFFICIAL VIDEO HD-JMOyX5cpy4o.mp4' -i 'Amir Farjam - Zendegi Ba To OFFICIAL VIDEO HD-JMOyX5cpy4o.m4a' -map 0 -map 1 -vcodec copy -acodec copy output.mp4
[15:45] <mintux1> relaxed: it's only audio file 3.6MB
[15:46] <mintux1> it's HD video from youtube 1080
[15:46] <mintux1> http://codepad.org/NCGIsmU7
[15:46] <mintux1> then video doesn't have audio so i download audio separately
[15:47] <jkli> if you just mux videos it can be unsynchron
[15:47] <jkli> depends on video file
[15:48] <mintux1> jkli: i download both audio and video from same source and same link on youtube.com but youtube mute sound on HD video when we download
[15:48] <jkli> yeah
[15:48] <jkli> they suck
[15:51] <mintux1> so what is your solution ?
[15:54] <phelix> I am fairly new trying to use ffmpeg via the command line. ffmpeg -i ./movie.mp4 -s 854x480 -aspect 16:9 -strict experimental ../Movie\ Converted/movie.mp4 This is giving me the correct resolution I am looking for but the video quality is just terrible. Anyone know how I can improve the video quality to be just as good as the original?
[15:55] <mintux1> solved
[15:58] <another> phelix: check -b
[15:59] <phelix> I am not to sure about bitrates. What should I set this to?
[15:59] <phelix> can't it use the same bitrate of the current video?
[16:00] <another> i think there is an option -sameq
[16:01] <phelix> k, let me try that thanks
[16:04] <phelix> There we go, I think that is going to do it. Thank you!
[16:04] <phelix> Will changing the resolution cut off some of the video do you know?
[16:07] <another> shouldnat cut off anything afaik
[16:09] <ubitux> another: http://ffmpeg.org/faq.html#Why-was-the-ffmpeg-_002dsameq-option-removed_003f-What-to-use-instead_003f
[16:09] <ubitux> phelix: if you transcode, it will never be lossless
[16:10] <ubitux> (unless you explicit it, and you'll get a huge output)
[16:10] <iive> phelix: add -c:v libx264 -crf 23 , you could remove the -strict experimental
[16:10] <ubitux> add -c copy so the other stream are copied losslessly
[16:10] <iive> most likely ffmpeg uses mpeg4asp instead of mpeg4 avc
[16:11] <ubitux> iive: x264 should be the default with mp4
[16:11] <iive> ubitux: it won't change the resolution with copy.
[16:11] <ubitux> iive: for the other streams, such as audio
[16:11] <ubitux> experimental was probably added because of that
[16:12] <ubitux> ffmpeg -i in.mp4 -vf scale=854x480,setsar=16/9 -c copy -c:v libx264 -crf 23 out.mp4 should do it
[16:13] <phelix> ok let me try that
[16:13] <phelix> thank you
[16:13] <ubitux> it won't be lossless since you rescale though
[16:13] <ubitux> lower crf for better quality
[16:14] <phelix> ok, I want the same quality just in a different resolution that fits the device I am encoding this for
[16:14] <iive> indeed, it even uses crf 23 by default.
[16:14] <iive> phelix: do you use recent ffmpeg version? no forks or stuff?
[16:14] <ubitux> "same quality" makes no sense if you rescale
[16:15] <phelix> I think so, just installed it from the ubunutu application mamager
[16:15] <ubitux> ah, probably not ffmpeg then
[16:16] <phelix> yah I am getting Unrecognized otion 'c' failed to set value 'copy' for option 'c'
[16:16] <ubitux> here you go ^
[16:16] <phelix> k
[16:17] <iive> phelix: try -vcodec instead of -c:v or use `avconv`
[16:17] <phelix> same commandline option except avconv instead?
[16:18] <iive> yes, -c:v is syntax that was introduces by avconv
[16:18] <iive> debian/ubuntu continued to ship ancient version of ffmpeg.
[16:19] <phelix> Unknown encoder 'libx264'
[16:19] <phelix> where do I get this at?
[16:19] <iive> try ffmpeg -vcodec libx264... etc
[16:20] <phelix> so i can remove the -c copy ?
[16:20] <ubitux> iive: you should not recommend to use the broken ffmpeg distributed by libav :p
[16:21] <iive> yeh...
[16:21] <phelix> yah still get unkown encoder for libx264 with ffmpeg and avconv
[16:21] <ubitux> that's because it's not build with libx264 (licenses ...)
[16:21] <iive> debian probably doesn't even link it
[16:21] <iive> x264 is gpl
[16:22] <ubitux> patents sorry
[16:22] <iive> but there are also the mpeg-la patents on h264
[16:22] <phelix> k let me first install the other version
[16:22] <iive> phelix: get static ffmpeg build.
[16:23] <phelix> git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg ??
[16:23] <phelix> will this version work?
[16:24] <iive> phelix: you'd have to compile x264 with shared/static libraries first, before compiling your own ffmpeg.
[16:24] <phelix> ahh ok
[16:27] <phelix> ok seems to be running with those options now
[16:27] <phelix> thanks
[16:32] <phelix> ./ffmpeg -i in.mp4 -vf scale=854x480,setsar=16/9 -vcodec libx264 out.mp4 I checked this and the resolution is def NOT 854x480 any ideas?
[16:33] <phelix> it looks exactly like the source file
[16:36] <phelix> did I miss something?
[16:37] <iive> is the size different?
[16:38] <iive> what is the resolution of out.mp4 ?
[16:38] <phelix> Well I didn't let the whole thing finish. Its a 2 gig file I am sure its going to take a few hours
[16:38] <iive> still, the result should be playable.
[16:38] <phelix> Yes, thats how I was able to tell
[16:39] <iive> you can use -ss <start_time> -t <duration>
[16:39] <phelix> I don't know how to tell exactly what the out resolution is. I can just tell by looking at it that its not 854x480 its really thing like the original
[16:39] <iive> ffprobe could tell you resolution and other stuff.
[16:39] <phelix> it appears that its the same resolution as the in file
[16:40] <phelix> Stream #0.0(und): Video: h264 (High), yuv420p, 854x480 [PAR 16:9 DAR 427:135], 755 kb/s, 23.9
[16:40] <phelix> hmm
[16:40] <phelix> it says it is 854x480 with ffprobe
[16:40] <phelix> but it sure doesn't seem so. still seems really thin and wide.. very weird
[16:40] <iive> oh...
[16:42] <phelix> yeah there is something really weird going on. Its actually thinner than the original file.. Only able to tell by looking at the video but something isn't right
[16:51] <phelix> ffmpeg -i ./in.mp4 -s 854x480 -aspect 16:9 -strict experimental -sameq ../Movie\ Converted/out.mp4 using the other version of ffmpeg I had and this command line appears to give the desired output. Just seems that it may be cutting some of the picture off. But its much larger and fills the screen properly.
[16:54] <iive> phelix: is the original with correct aspect ratio?
[16:54] <iive> remove the setsar and just use the -aspect 16/9 as before.
[16:54] <phelix> k let me try that
[16:55] <phelix> the original is 1920x800
[16:57] <iive> if the original looks ok, then you shouldn't override the aspect info, scale would recalculate the aspect to compensate for change in resolution.
[16:58] <phelix> so to take the aspect from the source video to this new video resolution I am trying to get is actually blowing it up to fit and cropping some of the video off isn't it?
[16:59] <phelix> the way you had me doing it first was keeping everything the same but it seemed to look thinner because it changed the resolution to fit properly? which would probably make it appear to be thinner
[16:59] <phelix> if that made any sense lol
[17:22] <iive> there are a number of different ways to express aspect ratio...
[17:23] <iive> the video was thinner because you resized the image to be 16/9 then you said that the pixel is 16/9 that basically tells the player to rescale the image to 16/9 once again.
[17:25] <iive> usually the displays have square pixels, so the resolution and aspect are the same. e.g. 1920x1080 is (almost) 16/9
[18:56] <edoceo_> I have a video, it's 208.700 seconds long, and I want to stretch it to 214.607 seconds long, how could one do that?
[19:35] <synth_> could someone assist me in modifying my command to have two separate text overlays? i'd like to place part of my current overlay on the top and some on the bottom: http://pastebin.com/NZPwu9Xt
[19:42] <llogan> edoceo: see the setpts video filter
[19:43] <llogan> not sure if you can get the exact length that you want though
[19:43] <edoceo> llogan: I've been looking at that, but it's not clear to me how to adjust when I only know the times
[19:43] <edoceo> Like, my video is 98.4695% the length I want, so do I use a 1/N or N/1 kind of specifier?
[19:44] <llogan> setpts=1.02830378534*PTS or similar
[19:45] <llogan> i'm not sure how many decimals it will parse
[19:45] <llogan> synth_: just add another drawtext
[19:46] <llogan> a different project. you guys are busy.
[19:47] <edoceo> numbers >1 speed it up?
[19:48] <llogan> no. not when n*PTS
[19:55] <llogan> edoceo: 2*PTS and PTS/0.5 should do the same thing (which is to slow it down)
[19:55] <synth_> llogan: do i need to do anything special with the [0:v] tags?
[19:55] <edoceo> thanks!
[19:57] <llogan> synth_: no. see http://ffmpeg.org/ffmpeg-filters.html#Filtergraph-syntax-1
[19:58] <llogan> so you can do [0:v]drawtext,drawtext[bg];[bg][1:v]overlay........etc
[19:58] <galex-713> Hello
[19:58] <galex-713> Is there some option to remove a part of a video?
[19:59] <llogan> synth_: or if you prefer [0:v]drawtext[d1];[d1]drawtext[d2];[d2][1:v]overlay
[19:59] <galex-713> Or should I cut a first part, then cut a second part, then find how to join videos, then join parts, then test, etc.?
[19:59] <synth_> ok i actually got it
[19:59] <synth_> thanks llogan!
[20:00] <llogan> galex-713: http://video.stackexchange.com/a/10401/1760
[20:25] <RenatoCRON> wow, I just got one that ip-camera:554/cam/realmonitor?channel=4&subtype=01  but ?subtype=01&channel=4 get first channel !
[20:26] <RenatoCRON> these devices dvr maybe using regexp to parse params!
[20:45] <galex-713> llogan: ah ok, so I need to split and *then* join& ok thanks
[21:06] <phelix> Is there anyway with ffmpeg to have it convert faster than it takes to watch the entire movie?
[21:12] <llogan> phelix: that depends on many factors
[21:13] <llogan> the input, your hardware, if you're performing any filtering, the encoder being used, the settings of the encoder, other bottlenecks, etc
[21:21] <Ove_BV> Hello. I am trying to decode H264 video, but I want to decouple the demuxing from the decoding.
[21:21] <Ove_BV> Right now I am demuxing using av_read_frame to get the AVPacket, and then I am decoding using a manually-allocated AVCodecContext.
[21:21] <Ove_BV> I have noticed that decoding does not work unless I copy the extradata from the format's codec context to my manually-allocated codec context.
[21:21] <Ove_BV> Here is the code I am using:
[21:21] <Ove_BV> codec = avcodec_find_decoder(codec_id);
[21:21] <Ove_BV> codec_ctx = avcodec_alloc_context3(codec);
[21:21] <Ove_BV> codec_ctx->extradata = format_ctx->streams[stream_idx]->codec->extradata;
[21:21] <Ove_BV> codec_ctx->extradata_size = format_ctx->streams[stream_idx]->codec->extradata_size;
[21:21] <Ove_BV> avcodec_open2(codec_ctx, codec, nullptr);
[21:21] <Ove_BV> Is there any way I can make it work without copying the extradata from the codec context?
[21:24] <Ove_BV> (decoding an MPEG4 file using the same code works without copying the extradata, I only have a problem for H264)
[21:25] <galex-713> Hello, I want to cut off some part of a video (I have an english and german version, and the german version has precisely 10 seconds of additionnal video added, and I want to remove it) and seeing at the video image per image, I identified the precise frames of begin and end of the sequence to cut, but some doesnt are at a precise time in seconds (like things ending with .3333333&), so is there way to cut videos acc
[21:25] <galex-713> video stream instead of time in seconds/milliseconds?
[21:42] <llogan> galex-713: sorry, but i don't understand your question
[21:58] <galex-713> llogan: I want to cut off the part situated between frame 507 and 746 (included) of video
[21:59] <galex-713> I could do 507/24 and 746/24 to get times, but that cause some other problems: 746/24 is an irrational number, and however the fps is not precisely 24 but something like 23.97&
[22:00] <galex-713> So I would like to know if there is a way to do like -ss and -t but with frames instead of seconds
[22:01] <galex-713> llogan: also, for the concat of videos: the accurate method pointed by your link doesnt work with ffmpeg (which however is deprecated), it says Unknown input format: 'concat'
[22:09] <galex-713> and the other method output following error: Unrecognized option 'filter_complex'
[22:09] <galex-713> Failed to set value '[0:v]trim=0:21.125,setpts=PTS-STARTPTS[v0]; [0:a]atrim=0:21.125,asetpts=PTS-STARTPTS[a0]; [0:v]trim=31.083:3191,setpts=PTS-STARTPTS[v1];
[22:09] <galex-713> [0:a]atrim=31.083:3191,asetpts=PTS-STARTPTS[a1]; [v0][a0][v1][a1]concat=n=2:v=1:a=1[out]' for option 'filter_complex'
[22:11] <JEEB> galex-713, that ffmpeg is an old old binary that's still in an older version of libav.
[22:11] <JEEB> libav does have a newer binary, avconv, but libav doesn't have the concat "format"
[22:12] <JEEB> probably the simplest way for you to use it would be to grab ffmpeg's ffmpeg
[22:12] <JEEB> !bin static
[22:12] <JEEB> use one of the static builds available http://ffmpeg.org/download.html
[22:12] <JEEB> you can just extract and run
[22:13] <galex-713> Ok
[22:16] <galex-713> Oh, it seems I already downloaded it long time ago& ^^
[22:16] <galex-713> And yeah, it works now, thanks :)
[22:33] <galex-713> JEEB: ok, it worked, thank you :)
[22:33] <galex-713> llogan: thank you too
[00:00] --- Fri Apr 11 2014


More information about the Ffmpeg-devel-irc mailing list