[Ffmpeg-devel-irc] ffmpeg.log.20121019
burek
burek021 at gmail.com
Sat Oct 20 02:05:01 CEST 2012
[00:47] <whoom> hi
[00:48] <whoom> anyone in here
[00:51] <relaxed> we're all waiting for a valid question.
[01:21] <arakn0> is it possible to use a bit stream filter in ffserver? any hint? Thanks
[01:56] <creep> both vlc and mplayer should be useful, but the coders surely suck in user interaction
[02:41] <t4nk157> hello! anyone know how i can convert a byte array of 2 channel 16 bit audio into a planar format that i can encode with?
[02:55] <durandal_1707> t4nk157: that should be pretty trivial and there are and was numerous examples in FFmpeg source code and on the web
[02:56] <t4nk157> yeah i've spent 4 days on it so far - any ideas where to look? I've spent hours on google looking for it
[02:56] <durandal_1707> have you wrote some code at all?
[02:57] <t4nk157> yes massive amounts, it's working with single channel, as soon as i add another channel it gets distorted - i think i was chatting to you yesterday about it
[02:57] <durandal_1707> t4nk157: i mean code that does interleaving
[02:59] <t4nk157> i'm not sure where to start - the code i had worked with the 53 version. It doesn't work with the new version. I get a byte array of AV_SAMPLE_FMT_S16 which I can't encode with unless I use AV_SAMPLE_FMT_S16P - but I have no idea how to get that byte array into a planar format
[03:01] <durandal_1707> for planar and 2 channels it is 2 planes or 2 byte arrays
[03:01] <durandal_1707> how do you call encode_audio2 ?
[03:02] <t4nk157> avcodec_encode_audio2(c, &pkt, frame, &got_packet);
[03:02] <durandal_1707> and where you put your pointer to array?
[03:03] <t4nk157> i get a load of byte data at a time that i have to split into frames
[03:04] <durandal_1707> you put it into AVFrame->data[] ?
[03:04] <t4nk157> ret = libffmpeg::avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt, pSoundBuffer, size, 1);
[03:07] <durandal_1707> in that case your pSoundBufer need to be interleaved
[03:07] <durandal_1707> *deinterleaved
[03:07] <durandal_1707> so lets assume it have 100 samples in each frame - each sample takes 2 bytes
[03:08] <t4nk157> yeah that's what i'm after - how to do that
[03:09] <durandal_1707> size & 1 must be 0 for stereo
[03:09] <durandal_1707> so you divide size by 2 (because there are 2 channels in stereo)
[03:10] <durandal_1707> there are many ways to do actual deinterleaving, one of it is using libswresample
[03:10] <t4nk157> do you know of any example code that does that?
[03:11] <durandal_1707> ffplay.c use it
[03:12] <durandal_1707> and some filters libavfilter
[03:12] <durandal_1707> do you use any of them?
[03:13] <t4nk157> i've been through an enormous amount of source code trying to find an example of deinterleaving without result :(
[03:13] <durandal_1707> i'm mentioning that lib because it have simd for conversion
[03:15] <durandal_1707> naive approach: you take first 2 bytes and put them in X buffer. then take next 2 bytes and put them into Y buffer, you repeat this until you run out of samples
[03:15] <t4nk157> yeah i haven't gotten anywhere, my old code does deinterleaving but i can't see how it relates to the new api - everything it's calling has either been deprecated or removed
[03:15] <durandal_1707> last step you concatenate X and Y buffer
[03:16] <t4nk157> ok so each packet has to be left or right channel?
[03:16] <durandal_1707> packet is what encoder gives you
[03:17] <durandal_1707> aka output
[03:17] <t4nk157> yeah but i need to feed into the encoder arrays of left and then right channel?
[03:17] <durandal_1707> the pSoundBUffer you mentioned in avcodec_fill_audio_frame is X+Y
[03:19] <t4nk157> someone must have done this before right?
[03:20] <durandal_1707> what?
[03:21] <t4nk157> written some code that deinterleaves data for avcodec_encode_audio2
[03:22] <t4nk157> https://www.google.com/search?q=deinterleave+avcodec_encode_audio2
[03:22] <durandal_1707> no, you deinterleave pSoundBuffer you use in fill_audio_frame
[03:23] <durandal_1707> it must be deinterleaved before calling fill_audio_frmae
[03:26] <t4nk157> yes, therein lies my problem - you said there are loads of examples of doing this - could you give me a link?
[03:29] <t4nk157> I thought all this was automatic - which is why you specify channel_layout and channels etc
[03:30] <durandal_1707> t4nk157: i could be but it is not, you can not specify your sample format and expect fill_array to do the job
[03:31] <durandal_1707> that is job for swr_convert
[03:31] <t4nk157> ok is there an example of using swr_convert?
[03:31] <durandal_1707> but this could be implemented ....
[03:31] <durandal_1707> t4nk157: only if you have libswresample actually instealled. do you?
[03:31] <t4nk157> yes
[03:35] <durandal_1707> t4nk157: http://ffmpeg.org/doxygen/trunk/ffplay_8c-source.html
[03:37] <t4nk157> ok thanks for that
[07:34] <lake> i would like to use jack as an input format with ffmpeg. i'm on archlinux but i cannot seem to get the "-f jack" flag working
[07:39] <lake> looks like i have to compile it with --enable-indev=jack
[11:59] <gazzwi86> hi all
[12:00] <gazzwi86> I'm trying to get a raspberry pi to stream a webcam to my computer
[12:00] <gazzwi86> but when i go to ip/webcan.mjpeg it starts to download a file
[12:10] <Yulth> hi! is fdk_aac be able to convert to AAC-HE? or is libaacplus better for this task?
[12:12] <durandal_1707> yes. no.
[12:16] <Yulth> extremely precise and concise :D
[12:19] <Yulth> and, How I can be sure that I'm achieving AAC-HE quality typing this command:??
[12:19] <Yulth> ffmpeg -i input_file.flac -acodec libfdk_aac -ab 60k output_file.mp4
[12:24] <durandal_1707> Yulth: doing blind ABX test with reference that have AAC-HE quality
[12:27] <durandal_1707> libfdk-aacenc supports several profiles: LC, HE-AAC, HE-AACv2, LD and ELD
[12:28] <Yulth> I understand, but in the command line I can't specify what type of AAC I want to use for encoding. I only can type "mp4" or "aac".
[12:29] <durandal_1707> there is -profile
[12:29] <Yulth> mmm, interesting, I'm going to try it
[12:29] <durandal_1707> ffmpeg -h full
[12:39] <Yulth> this command: ffmpeg -i file_in.flac -profile:aac_he_v2 -ab 60k file_out.mp4
[12:39] <Yulth> is giving me this error:
[12:39] <Yulth> Unable to find a suitable output format for '60k': invalid argument
[12:39] <Yulth> :S
[12:39] <Yulth> I think I've followed all steps shown by man page...
[12:44] <durandal_1707> -profile HE-AAC
[12:51] <Yulth> mmm the same:
[12:51] <Yulth> "Please use -profile:a or -profile:v, -profile is ambiguous"
[12:51] <Yulth> and I've followed the same sintax shown by man and even given by you...
[12:56] <Yulth> ok solved:
[12:56] <Yulth> -profile:a aac_he_v2
[13:13] <Element9> why doesn't "ffmpeg -formats" list the wmv1 and wmv2?
[13:14] <durandal_1707> Element9: because they are not formats
[13:14] <Element9> durandal_1707: formats == containers?
[13:15] <durandal_1707> something like that
[13:16] <Element9> durandal_1707: can I read somewhere about the difference?
[13:17] <durandal_1707> it is just wording
[13:18] <durandal_1707> in this specific case formats are containers
[13:18] <Element9> can I choose which codecs to include and which to exclude when I compile ffmpeg?
[13:19] <durandal_1707> yes
[13:19] <Element9> durandal_1707: great. thanks!
[15:16] <cykl> Hi. I currently have the following workflow: {SWFs} --swfrender--> {PNGs} --ffmpeg(image2)--> avi. I'm wondering if I could remove the dependency on swfrender and do all the stages with ffmpeg.
[15:17] <cykl> Basically, each SWF file is an image, and I want to encode all the image into a movie.
[15:18] <durandal_1707> can ffmpeg recognize swf files?
[15:19] <cykl> According to google, uncompressed swf could be supported.
[15:20] <durandal_1707> but does it work with your files?
[15:21] <cykl> nope. I get this error message [swf @ 0x8e61a60]Could not find codec parameters (Video: mjpeg)
[15:26] <durandal_1707> have you compiled ffmpeg with zlib support - paste full ffmpeg output
[15:27] <cykl> http://pastebin.com/NBerPDUH
[15:28] <durandal_1707> that is 3 years old
[15:30] <cykl> Running a Debian stable. I need to embedded this process into an application, so user will have "outdated" versions anyway
[15:31] <durandal_1707> cykl: sorry, i cant give you such support
[15:32] <cykl> I will try on with an up to date version in few hours and see if it works or not.
[15:32] <cykl> durandal_1707: thanks for your time. BTW: If somebody already did this kind of workflow I'm interested by a testimonial ;)
[16:21] <dericed> :(
[16:45] <meekohi> Hey how can I figure out which codec corresponds to AVCodec with codec id: 142?
[16:45] <meekohi> avcodec_get_context_defaults3
[16:46] <meekohi> ?
[16:46] <meekohi> No that doesn't make any sense...
[16:47] <durandal_1707> most likely VP8
[16:50] <meekohi> durandal_1707: Thanks
[16:51] <meekohi> I just realized XCode switched to clang and now none of my stuff works, what a pain :(
[16:53] <teratorn> meekohi: well I guess you are fucked
[16:53] <teratorn> meekohi: thanks Apple
[16:53] <teratorn> can you even have more than one xcode installed at once?
[16:53] <meekohi> lol
[16:53] <teratorn> is that permitted?
[16:54] <meekohi> Even if it is I'm sure you wouldn't want to.
[16:54] <teratorn> hahaha
[16:55] <meekohi> avcodec_find_encoder keeps returning null when I look for VP8, despite linking in lvpx, and this all worked in the past.
[16:55] <meekohi> So I'm a bit stumped what I'm missing.
[16:56] <Plorkyeran> you can have multiple versions of 4.x installed
[16:56] <Plorkyeran> there's a cli tool to choose which one is active for command line stuff
[16:57] <Plorkyeran> probably need a developer account to actually get anything other than 4.5 though
[16:58] <meekohi> Any recommendations for debugging missing codec problems?
[18:11] <sedulous> hi. i'm trying to remux a live stream with avconv: |avconv -re -i pipe:0 -acodec copy -f mp4 -movflags empty_moov
[18:11] <sedulous> however i get: Undefined constant or missing '(' in 'empty_moov'
[18:12] <sedulous> how do I add an empty moov atom?
[19:54] <amendes365> #Hello everyone. I'm new to ffmpeg and would like to know if its possible to configure a webcam stream with both audio and video, and no flv?
[19:55] <klaxa> what container do you want to use instead of flv?
[19:56] <amendes365> I've tried mjpeg, which is almost real time, but it has no audio
[19:56] <amendes365> @klaxa : anything but asf or flv
[19:57] <klaxa> what is your setup so far?
[19:58] <amendes365> @klaxa: pastebin.com/nqqE8bdq following this tutorial http://www.area536.com/projects/streaming-video/
[20:01] <klaxa> you could try simply replacing asf by mp4 i think
[20:01] <klaxa> just a guess, i'm no expert
[20:02] <amendes365> @klaxa: thanks, i'll try it right now
[20:15] <amendes365> @klaxa: do you happen to know a good tutorial for streaming a webcam using mp4?
[20:15] <amendes365> i'm lost here
[20:15] <klaxa> actually no, i rarely use ffserver
[20:15] <amendes365> i've found tutorials to stream mp4 videos only
[20:15] <amendes365> it's ok... thanks anyway
[20:16] <klaxa> using mp4 didn't work properly?
[20:16] <klaxa> did it give any errors?
[20:33] <klaxa> amendes365: i tried using the mpegts container, mpeg2video and vorbis as codecs, i get segmentation faults with the ffmpeg command though
[21:29] <arakn0> hey guys... is it possible to use a bit stream filter in ffserver? any hint? Thanks
[21:34] <amendes365> thank you @klaxa
[21:36] <klaxa> did you try it and it worked?
[21:42] <amendes365> no, but I appreciate the help
[21:42] <amendes365> I will reinstall and start again from scratch
[21:56] <rainmaker1> Hi, can we perform multipass encoding with live stream? It sounds impossible to me, but maybe...
[22:11] <amendes365> @klaxa got the webcam working following http://bit.ly/PfJyd5 but getting 'file mystream.ffm not found' in browser
[22:13] <klaxa> amendes365: did you copy the config? because that config isn't complete (lacks xml tags)
[22:17] <amendes365> @klaxa here it is: pastebin.com/zTJz4KLm
[22:19] <klaxa> swf container and flv codec? i thought you didn't want flash?
[22:19] <klaxa> and you wanted audio
[22:35] <amendes365> @klaxa thats the goal, but I was focusing on a working solution to stream the webcam and then change the format
[22:36] <klaxa> try setting the contaner as mpegts, the videocodec as mpeg2video and vorbis as audio codec
[22:36] <klaxa> then try again and see if anything crashes
[22:36] <amendes365> ok
[22:47] <ghostrookie> hey guys. i've joined 2 videos (X = A+B) with mp4box and when i open X in a player it only shows B and it says that duration of X is the same as for B. but the file size for X is s(X) ~ s(A)+s(B). ffprobe for X says
[22:47] <ghostrookie> Duration: 00:00:29.44, start: -12.027937
[22:47] <ghostrookie> that 12.027937 secs is A. how can i reset that "start" to be 0 ?
[23:03] <amendes365> @klaxa gives me an error 'Unknown AudioCodec ogg' in ffserver
[23:03] <klaxa> replace ogg by vorbis
[23:03] <amendes365> ok
[23:03] <klaxa> ogg is a container
[23:05] <amendes365> yes. ffmpeg shows 'Could not find input stream matching output stream #0.0 ioctl(VIDIOC_QBUF)'
[23:06] <klaxa> what command did you run?
[23:06] <amendes365> http://pastebin.com/Xws1LUzu
[23:07] <amendes365> i ran ffmpeg -r 15 -s 640x480 -f video4linux2 -i /dev/video0 http://127.0.0.1:8090/feed1.ffm
[23:09] <klaxa> not sure if this is the error, but ffmpeg isn't providing an audio stream
[23:09] <klaxa> so there is nothing for the audio to be encoded
[23:09] <amendes365> that's weird
[23:09] <klaxa> if you run pulse you can use -f alsa -i pulse and change the recoding device with the pulseaudio volume control
[23:11] <amendes365> ok. pulseaudio shows 'No application is currently recording audio'
[23:12] <klaxa> it says so while running ffmpeg?
[23:15] <amendes365> no, i checked it out in the pulseaudio volume control
[23:16] <amendes365> and ffserver shows [ffm @ 0x9a14cf0]Could not find codec parameters (Audio: vorbis, 44100 Hz, mono, s16, 32 kb/s)
[23:16] <Endorgh> Hi folks! I don't understand why the output file (aac format, -profile aac_he_v2) generated has a length of only 2 minutes plus 20 seconds, when the input file has 5minutes length..... I'm converting to aac-he v2 into mp4, using version 1.0 under FreeBSD. Any ideas? :S
[23:16] <Endorgh> the command is:
[23:17] <Endorgh> ffmpeg1 -i input_file.flac -profile:a aac_he_v2 -ab 60k -ar 44100 -ac 2 output_file.mp4
[23:17] <Endorgh> I'm typing wrong any option?
[23:20] <durandal_1707> Endorgh: is output really that long?
[23:24] <Endorgh> durandal_1707: interesting observation!! The MP4 output file has the same SIZE as a raw aac output file, but when I play both files, the raw aac file doesn't show any metadata although it appears as correct lenght. Otherwise, the MP4 output shows full metadata, but player only can play first 2 min + 20 secs...
[23:25] <Endorgh> any incompatibility with mp4 - m4a containers?
[23:28] <durandal_1707> Endorgh: does same happens with mkv container?
[23:29] <Endorgh> I don't know, let me try it!
[23:35] <Endorgh> durandal_1707: with mkv or mka containers it seems to work...
[23:36] <Endorgh> what could be the cause? or..., when I can find more information about containers, etc....
[23:37] <durandal_1707> Endorgh: you sure it works? and it is not just number set in container header?
[23:38] <Endorgh> mmm
[23:39] <durandal_1707> do: ffmpeg -i input -f null -
[23:39] <Endorgh> I don't know if this could give any extra info, but ffmpeg says this when encoding into mp4:
[23:39] <Endorgh> [flac @ 0x2a4e3110] max_analyze_duration 5000000 reached at 5015510
[23:39] <Endorgh> ok
[23:39] <durandal_1707> that is just spam (completly irrelevant)
[23:40] <Endorgh> ok
[23:44] <Endorgh> this is the output:
[23:44] <Endorgh> http://pastebin.com/q2PzAqTL
[23:48] <durandal_1707> Endorgh: that is expected, flac support is not broken, but do same with aac in mkv
[23:49] <DelphiWorld> Hey
[23:49] <DelphiWorld> i'm transcoding a mpeg2 stream into mpeg4
[23:49] <DelphiWorld> how to output it to RAW UDP?
[23:51] <Endorgh> durandal_1707: flac support is not broken? what it means?
[23:55] <durandal_1707> Endorgh: that duration of flac file is correct
[23:58] <Endorgh> durandal_1707: ok, and what is the conclusion?
[00:00] --- Sat Oct 20 2012
More information about the Ffmpeg-devel-irc
mailing list