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

burek burek021 at gmail.com
Sat Feb 22 02:05:01 CET 2014


[00:08] <BtbN> Is there a way to tell ffprobe to stop after the first valid (video) frame?
[00:39] <didge> Hi.  How can I trim the last few seconds from an mp4 file if I don't know the length ?  I'm running the encoding as a simple shell script.
[00:44] <didge> http://pastebin.com/fGFx55f4
[00:46] <llogan> ive never seen a -b:v:a
[00:47] <didge> llogan: that was a parameter I didn't understand.  I put that in from the Wowza official forum post but the syntax differed.
[00:47] <didge> llogan: what would you suggest ?  I'm not quite sure what it is doing.
[00:48] <llogan> it depends on what you're trying to do and how you're going to use the output
[00:48] <didge> The goal is to stream 1080p through Flowplayer or JWPlayer
[00:49] <llogan> as progressive download or a live stream?
[00:49] <didge> video on demand is the Wowza feature I am using.
[00:49] <llogan> i am not familiar with wowza
[00:50] <didge> I think live stream.  Like, the source is previously recorded.
[00:50] <didge> So I'm encoding a series of mp4 files
[00:51] <llogan> sounds like progressive download
[00:52] <didge> ok.  that's the plan.
[00:53] <didge> http://pastebin.com/BPsZPrp5
[00:54] <llogan> you're missing the console output.
[00:55] <didge> The console output looks like a video being encoded.  I don't mean to be a smart ass.
[00:56] Action: llogan moves on to another ffmpeg question
[04:19] <pabs3> I'm trying to register in trac.ffmpeg.org but the page doesn't seem to load after I press register. I wanted to update #2983 with a link to http://wiki.multimedia.cx/?title=VP7
[04:35] <pabs3> hmm, it finally returned and gave me this error. how do I fix this? "Warning: Username pabs doesn't match local naming policy."
[04:47] <FriendlySeal> arite wtf
[04:47] <FriendlySeal> same instalation of ffmpeg
[04:48] <FriendlySeal> converting mkv to mp4
[04:48] <FriendlySeal> works on debian
[04:48] <FriendlySeal> not works on ubuntu
[04:48] <FriendlySeal> DAFUQQQ!
[04:49] <FriendlySeal> converting mkv to webm works on both
[04:49] <FriendlySeal> weird?
[04:50] <FriendlySeal> im asuming its the 264 codec?
[04:50] <FriendlySeal> but the install is the same!!!
[05:08] <FriendlySeal> yesh yesh
[05:10] <FriendlySeal> lets try build from ffmpeg not git pull
[08:28] <cbreak-work> Hmm... I get the feeling that I am missing something. I get this format dumped:     Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x800, q=2-31, 1000 kb/s, 12288 tbn, 24 tbc
[08:28] <cbreak-work> but 12288 seems a bit high for tbn
[08:29] <cbreak-work> before I write the header, it even says 90k
[08:43] <cbreak-work> maybe a bug in ffmpeg
[08:43] <cbreak-work> back to 2.1
[08:44] <cbreak-work> hmm, no. Same problem with 2.1
[08:45] <cbreak-work> but strangely enough not with avi output format, it does happen with mp4 and mov
[09:00] <relaxed> cbreak-work: try 1.2.5: http://johnvansickle.com/ffmpeg/releases/ffmpeg-1.2.5-64bit-static.tar.bz2
[09:02] <cbreak-work> isn't that really old?
[09:02] <cbreak-work> I currently think it's a bug in my code though.
[09:03] <relaxed> and old branch but it was released this year
[09:04] <relaxed> an*
[09:13] <cbreak-work> yes, seems it was indeed my fault
[09:13] <cbreak-work> I didn't set the AVFrame::pts correctly
[09:13] <cbreak-work> so they were all bunched up
[09:27] <termos> I have some bug when muxing an AVPacket. I get an error saying "dimensions are not set", and it seems that the AVOutputFormat->flag does not have the AVFMT_NODIMENSIONS flag set.
[09:28] <termos> I am using av_guess_format for getting the AVOutputFormat
[09:29] <braincracker> hello my friends
[09:30] <braincracker> i have a quick question
[09:30] <braincracker> can one take a snapshot from a webcam/usb camera with best quality ? not just "webcam quality"
[09:33] <BtbN> so you want to capture a better image than the webcam is actualy able to do? oO
[09:33] <braincracker> no
[09:34] <braincracker> new webcams are able to take 2Mpixel photos fo example
[09:34] <braincracker> while they deliver 640x480 video streams
[09:35] <BtbN> sounds like a thing the driver has to support
[09:35] <braincracker> :( i thought something like that too, ffmpeg doesn't know this?
[09:36] <braincracker> and all brands have different drivers for this function i assume then, just to make life easy
[09:36] <cbreak-work> hmm... The output is now correct, but ffmpeg crashes sometimes :(
[09:37] <cbreak-work> in libswscale
[09:40] <cbreak-work> time to recompile ffmpeg without optimization
[09:42] <cbreak-work> anyone else using ffmpeg on OS X 10.9 compiled with clang?
[09:43] <braincracker> never used osx, is it free?
[09:44] <T-Co> Free as in beer
[09:50] <cbreak-work> braincracker: free as in bundled-with-hardware
[09:50] <cbreak-work> big chunks are open source too
[09:58] <cbreak-work> maybe a bug in ff_rgb24ToY_avx
[10:17] <cbreak-work> https://gist.github.com/cbreak-black/9131169, very weird.
[10:19] <rjp421> i made an adobe AIR app that launches ffmpeg with some args and receives the output... but no matter how i try to define the arguments for the dshow input video/audio devices, i either get device not found, or malformed dshow input string
[10:21] <cbreak-work> this is just out of bounds.
[10:21] <cbreak-work> the input given to sws_scale seems valid
[10:21] <cbreak-work> print srcSlice[0] + srcStride[0] * srcSliceH gives (const uint8_t *) $19 = 0x000000010ae69000
[10:22] <rjp421> i.e. -f dshow -i video="WebcamMax Capture":audio="Default"
[10:37] <rjp421> this is in windows btw
[11:30] <cbreak-work> Hmm... can't help but think that this is a bug in FFMPEG...
[11:36] <cbreak-work> all parameters to swscale look sane
[11:36] <cbreak-work> and yet, inside it, a function performs an out of bounds access
[11:43] <Mavrik> there are some padding requirements for frame buffers
[11:43] <Mavrik> are you obeying them?
[11:44] <cbreak-work> There are no padding requirements mentioned in the documentation for swscale
[11:44] <cbreak-work> my buffer is 1920x800 pixel, stride is 5760 (because input is RGB24)
[11:45] <Mavrik> considering the fact that swscale heavily relies on SSE instructions, there certanly are at least some padding requirements
[11:46] <cbreak-work> the crash happens in ff_rgb24ToY_avx, but I have not been able to find this function anywhere in the source code
[11:46] <cbreak-work> it seems to somehow have been obfuscated
[11:46] <Mavrik> the _avx tells you you have to look in the ASM files
[11:47] <Mavrik> and indeed, AVX probably will require you to pad stuff to 256 bits I think
[11:47] <ubitux> cbreak-work: try to reproduce with ffmpeg
[11:47] <ubitux> also try to reproduce with -cpuflags -avx
[11:47] <Mavrik> its also rather new so having a bug there wouldnt be strange :)
[11:47] <cbreak-work> the ffmpeg command line?
[11:47] <ubitux> yes
[11:47] <cbreak-work> ok.
[11:50] <cbreak-work> what I do in my program is decode a video, convert it to RGB24, then encode that back with FFMPEG to a file (it's a test)
[11:50] <cbreak-work> how can I do that in command line ffmpeg?
[11:53] <ubitux> ffmpeg -i input -vf format=rgb24 -f null -
[11:53] <ubitux> or something like that
[12:00] <cbreak-work> it doesn't crash if I do it in the command line
[12:00] <cbreak-work> ./ffmpeg -v verbose -i input.mov -an -vf format=rgb24 out.mp4 is what I run exactly
[12:05] <cbreak-work> but it uses different flags
[12:05] <cbreak-work> I use lanczos in my code
[12:16] <cbreak-work> hmm... no, doesn't crash even if I make it use lanczos in the cli, and still sometimes crashes if I use bilinear via the library
[12:16] <cbreak-work> that would have been weird anyway since I don't change the size
[12:17] <relaxed> cbreak-work: try, ffmpeg -i input.mov -cpuflags +avx -an -vf format=rgb24 out.mp4
[12:19] <cbreak-work> still doesn't seem to crash
[12:24] <cbreak-work> weird. My program always crashes on the same frame.
[12:25] <cbreak-work> hmm... could it be that there's some weird global state issue in ffmpeg?
[12:25] <cbreak-work> I encode the input video into two separate files, but if I only write it into one there's no crash
[12:27] <cbreak-work> hmm, no. It still crashes, sometimes
[12:36] <cbreak-work> if it crashes, then on frame 244... super weird.
[12:40] <cbreak-work> if I try to encode every frame twice (so that the output video contains all frames double, and is twice as long), then it does not crash.
[12:41] <cbreak-work> so it seems to be data dependent... or some strange interaction behind the scenes
[12:42] <cbreak-work> but if I skip frame 244 then it crashes on 245
[12:51] <cbreak-work> if I give it completely white frames instead of input movie frames, it crashes a bit earlier (but still not right away).
[12:52] <cbreak-work> I reuse the input buffer, so the encoding part gets 100% the same input parameters
[12:54] <koko_> hello
[12:55] <koko_> how can i keep original timing when i use ffmpeg to change bitrate 128 -> 32k for example ?
[12:55] <cbreak-work> I also reuse the conversion context
[13:12] <koko_> i have song1.mp3 = 00:02:30 after convert ffmpeg  -i  song1.mp3 -b 32k song2.mp3 i have song2.mp3 = 00:02:35
[13:12] <koko_> how can i keep song2.mp3 with 00:02:30
[13:29] <Snowleaksange> hmm.. i had a working ffmpeg flv stream with mediaplayer.swf, but it seems thats no longer supported in many browsers.  any example for html5 stream?
[13:29] <Snowleaksange> what recommend codecs?
[13:30] <znf> Seems that you can pretty much strike gold with h264 in mp4
[13:41] <Keyboard_Warrior> Snowleaksange, h264 in .mp4 with aac is like "the gold standard"
[13:42] <Keyboard_Warrior> i asume ffmpeg still doesn automatically fast-start the mp4, so you have to do it if you want to use it online
[13:43] <koko_> please how to keep same timing   ffmpeg when i change bitrate 128 to 32 in mp3 ?
[13:54] <relaxed> Keyboard_Warrior: it can with ffmpeg -i input -movflags faststart output.mp4
[13:54] <relaxed> koko_: timing?
[13:55] <relaxed> koko_: the only thing that will change is the bitrate
[13:55] <relaxed> Snowleaksange: https://trac.ffmpeg.org/wiki/x264EncodingGuide
[14:02] <Keyboard_Warrior> relaxed, i really should re-familiarize myself with ffmpeg
[14:02] <Keyboard_Warrior> relaxed, i was using it daily back in 2008-9 era
[14:02] <Keyboard_Warrior> but, so much has changed since then
[14:03] <Snowleaksange> hmm im using an ffmeg that doesnt have movflags
[14:03] <Snowleaksange> gonna look at what it does
[14:03] <Keyboard_Warrior> Snowleaksange, well, if you cant get a new one, its not the end of the world
[14:03] <Keyboard_Warrior> theres other ways to faststart a .mp4
[14:03] <relaxed> Snowleaksange: http://johnvansickle.com/ffmpeg/
[14:04] <relaxed> or there's qt-faststart, mp4box, etc..
[14:05] <Snowleaksange> how else could you do it, Keyboard_Warrior?
[14:08] <relaxed> Snowleaksange: qt-faststart input.mp4 output.mp4
[14:09] <relaxed> Keyboard_Warrior: it's an ongoing battle to stay on top of it all.
[14:09] <Keyboard_Warrior> relaxed, didnt used to change this fast
[14:09] <Keyboard_Warrior> amount of change in the last 2-3 years is a lot more than between 2007 and 2009 :P
[14:10] <Snowleaksange> hmm
[14:11] <Snowleaksange> so i gotta upgrade ffmpeg
[14:11] <Snowleaksange> i cant see what this movflags does
[14:12] <Snowleaksange> i was using x264 with flv
[14:12] <Snowleaksange> trying to just replace flv with mp4 doesnt seem to work
[14:12] <relaxed> it moves th eindex to the front on the file for better streaming
[14:12] <Snowleaksange> not sure why it doesnt play
[14:12] <relaxed> the index*
[14:13] <Snowleaksange> yeah i understand conceptually.  but not from the code
[14:15] <Snowleaksange> vc->flags |= CODEC_FLAG_GLOBAL_HEADER;
[14:15] <Snowleaksange> hmm maybe that just has to do with x265
[14:16] <Snowleaksange> i wonder if some flag i could set on fctx->oformat
[14:17] <Snowleaksange> ok maybe ill.. UPGRADE FFMPEG!
[14:17] <cbreak-work> so, I tried to isolate the sws crash
[14:18] <cbreak-work> The scaling for encoding crashes even if I don't encode anything
[14:18] <cbreak-work> it does NOT crash if I only encode images without decoding any
[14:18] <cbreak-work> it however does not seem to be data dependent, even if I encode always the same (full white) image, it crashes on converting a white frame after decoding frame 197
[14:19] <cbreak-work> I also made it scale each frame ten times, it still crashes after frame 197 was decoded
[14:22] <cbreak-work> hmm... it also crashes if I just decode those 197 frames, and then and ONLY then try to scale.
[14:37] <koko_> relaxed: yes timing
[14:38] <koko_> relaxed: when you change bitrate i have some millisecond in ouput file
[14:39] <koko_> for example if my file is 00:02:30 after change bitrate from 128k to 32k , output file become 00:02:35
[14:53] <cbreak-work> where is the code for that ff_rgb24ToY_avx?
[15:02] <cbreak-work> it gets weirder and weirder
[15:02] <cbreak-work> I recompiled ffmpeg without avx support, and now the sse3 function crashes
[15:03] <cbreak-work> if I disable that, it works...
[15:07] <ubitux> recompile?
[15:07] <ubitux> you know you can play with cpuflags at runtime right?
[15:08] <ubitux> if it works with c but not asm, make sure it's not an alignment problem
[15:08] <ubitux> like, make sure you use av_malloc & friends for your buffers
[15:09] <cbreak-work> ubitux: I doubt it's an alignment problem
[15:09] <cbreak-work> since it works 196 times with the same buffer
[15:15] <cbreak-work> ubitux: what really strikes me as strange is that decoding frames in an other part of the program causes this issue
[15:15] <cbreak-work> the other part doesn't even use swscaling
[15:16] <ubitux> maybe a ref counting issue then
[15:16] <Mavrik> or memory corruption
[15:26] <cbreak-work> well, it stops crashing if I don't do av_free_packet on the packet I just decoded
[15:27] <cbreak-work> but then it leaks memory like a sponge
[15:43] <cbreak-work> that can't be the solution...
[16:14] <Xeta> What would be a good library to use to playback video after it's been streamed & decodec by ffmpeg? This is on a linux arm device (rpi), I'm playing the audio with openal...
[16:15] <Xeta> Should i just use opengl directly to print the frames?
[16:16] <ubitux> i think someone was working on a hwaccel using the gpu blob thing
[16:16] <ubitux> actually, i know
[16:16] <ubitux> but no news since a while now
[16:16] <ubitux> you won't have any interesting results without that accel on rpi
[16:18] <relaxed> koko_: can you upload the input you're using somewhere?
[16:19] <koko_> relaxed: yes
[16:19] <relaxed> hurry, the pubs are calling.
[16:21] <koko_> http://pastebin.com/VAwMwYCY
[16:22] <relaxed> er, can you upload song1.mp3 somewhere?
[16:23] <Xeta> ubitux: how does hwaccel work, is both the decoding and playback done on the gpu?
[16:23] <ubitux> i think so
[16:24] <koko_> ok
[16:24] <Xeta> so it's not like i in my software first call ffmpeg to decode and then call openal to render with the raw frames? it's all done on the gpu in one go?
[16:32] <koko_> where can i upload files i dont have server
[16:34] <koko_> my file http://speedyshare.com/tprmD/12-Kapa.mp3
[16:37] <Xeta> Or hm, isn't it actually that first i use ffmpeg (compiled with e.g. --enable-hwaccel=h264_vaapi) and then render the frames with opengl as normal?
[16:40] <Xeta> How do most video players, which use ffmpeg, render the actual video?
[16:41] <Mavrik> they usually use accelerated targets
[16:41] <Mavrik> so you don't have to copy frames from HW decoder memory to OpenGL context via CPU
[16:43] <relaxed> koko_: So the input is 00:03:30.90 and the output is 00:03:30.94
[16:44] <koko_> yesh
[16:44] <Xeta> Aha ok see Maverick
[16:44] <Xeta> Do you happen to know any good example where I can learn how this is done?
[16:44] <Mavrik> Xeta, see http://en.wikipedia.org/wiki/Video_overlay
[16:44] <Mavrik> Xeta, it's OS specific
[16:46] <Xeta> Ok but is there any built in support for this is ffmpeg? Or how do i get from av_read_frame/avcodec_decode to the accelerated target?
[16:47] <relaxed> koko_: I don't know if that's a bug or not. Anyone else? ^^
[16:47] <Xeta> Or i guess i shouldn't use accodec_decode since that will give me the frames in-memory
[16:55] <koko_> relaxed: have you a solution ?
[17:21] <julienb> Hello all
[17:21] <julienb> i need to cut videos from the end, this is possible with ffmpeg ?
[17:29] <koko_> from the end ?
[17:29] <koko_> julienb: some second of video ?
[17:36] <julienb> koko: no, i mean i need to put an offset from the end let's say 3mn and they cut 10mn
[20:24] <Logicgate> hey guys
[20:24] <Logicgate> I get that [libx264 @ 0x361cb40] height not divisible by 2
[20:24] <Logicgate> when trying to watermark a film
[20:24] <Logicgate> 640x361
[20:24] <Logicgate> is there a way to fix this?
[20:33] <Logicgate> http://pastebin.com/m3WDz8Da
[20:33] <Logicgate> here is the ffprobe output
[20:33] <Logicgate> there seems to be 2 video streams, 1 audio
[21:36] <BeholdMyGlory> Hi, I'm trying to use ffmpeg to grab video from a webcam using video4linux2. When I run v4l2-ctl --list-formats, I see "H264 (compressed)" as one of the available pixel formats. Does that mean that it's possible to grab H264 video directly from the webcam without having to do any additional encoding on ffmpeg's side (making it less CPU intensive to output H264 video)? If so, how do I instruct ffmpeg to grab H264 rather than YUYV video
[21:36] <BeholdMyGlory> which seems to be what it's using by default? At the moment I'm running: "ffmpeg -f video4linux2 -i /dev/video0 -r 5 -s 320x240 video.mkv"
[21:41] <llogan> BeholdMyGlory: ffmpeg -f v4l2 -list_formats all /dev/video0
[21:41] <llogan> * -i /dev/video0
[21:43] <BeholdMyGlory> llogan: That gives me http://hastebin.com/raw/vomexitayo
[21:44] <llogan> you can choose one of the formats listed: ffmpeg -f v4l2 -input_format h264 -video_size 1280x720 -i /dev/video0 -codec:v copy output.mkv
[21:45] <llogan> Raw (yuyv422) is probably default.
[21:45] <llogan> http://ffmpeg.org/ffmpeg-devices.html#video4linux2_002c-v4l2
[21:47] <llogan> but your ffmpeg lacks H.264 encoding support so you can not encode from yuyv422 to H.264 if you wanted to
[21:50] <BeholdMyGlory> Yeah, I know that I'd have to rebuild ffmpeg if I'm not able to grab H264 video directly from the webcam, which is another reason I'm trying to get this working
[21:51] <BeholdMyGlory> Unfortunately the device I'm working with seems to have become unresponsive at a bad timing (I don't have physical access to it at the moment), but I'll see if I can get it working later, thanks for the help llogan
[21:53] <jclairem> hi, I'm trying to stream raw (yuyv422) from my webcam to my LAN, what's the good way to do that?
[21:54] <jclairem> right now I'm trying to avoid compression as the streaming device cannot live encode without huge latency
[21:56] <jclairem> I've tried something like this;
[21:56] <jclairem> ffmpeg -r 5 -s 320x240 -f video4linux2 -i /dev/video0 -c rawvideo -f rawvideo rtp://192.168.0.16:8080
[21:57] <jclairem> data is flowing to network
[21:57] <jclairem> but i can't decode it using vlc
[21:59] <jclairem> any hint?
[22:04] <rjp421> pi cams?
[22:05] <rjp421> jclairem, theres always MJPEG if all else fails
[22:20] <jclairem> rjp421: yes, that's on a Rpi
[22:21] <jclairem> what do you mean by "theres always MJPEG"
[22:21] <jclairem> ?
[22:21] <rjp421> jclairem, http://twit.tv/show/know-how/77
[22:21] <rjp421> mjpeg is ip cam style
[22:22] <rjp421> not a video stream, just frame by frame
[22:22] <jclairem> ok
[22:22] <rjp421> but that video has a good method to making the pi an ip cam
[22:23] <rjp421> using ffmpeg behind the scenes, you just edit the config
[22:25] <jclairem> thx
[22:26] <jclairem> looking at the video
[22:26] <rjp421> not sure if theres any performance diff as opposed to just using ffmpeg alone
[22:26] <rjp421> np
[00:00] --- Sat Feb 22 2014


More information about the Ffmpeg-devel-irc mailing list