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

burek burek021 at gmail.com
Mon Sep 16 02:05:01 CEST 2013


[00:00] <beastd> chrisballinger: you have a 64bit arm? didn know they were available already...
[00:00] <chrisballinger> you can compile for them haha
[00:00] <relaxed> no, it's where they test building/decoding for certain archs
[00:00] <chrisballinger> just figured i might as well see if i could compile it
[00:00] <chrisballinger> oh
[00:01] <beastd> chrisballinger: on fate.ffmpeg.org you can also see the configure lines used for the individual test machines. can be useful information from time to time.
[00:01] <chrisballinger> ahhh
[00:01] <relaxed> chrisballinger: did you try a "make distclean" to see if it still happens?
[00:01] <chrisballinger> nice i see
[00:01] <chrisballinger> for which issue?
[00:02] <relaxed> for make clean
[00:03] <chrisballinger> ah ill try that
[00:03] <chrisballinger> https://gist.github.com/chrisballinger/6566091
[00:04] <chrisballinger> i can probably disable asm for the arm64 build but i feel like it would be faster to run the 32-bit armv7s code with assembler optimizations anyway
[00:05] <relaxed> you can't run an arm64 build on a 32bit armv7
[00:06] <chrisballinger> no i know i meant the other way around
[00:06] <relaxed> unless I'm missing something
[00:06] <chrisballinger> ill just not build arm64 for now
[00:06] <chrisballinger> because the arm64 processor can run 32-bit code with neon optimizations
[00:06] <chrisballinger> instead of 64-bit straight c
[01:59] <chrisballinger> hey i noticed that ffmpeg doesn't like to be called directly from within another program
[02:00] <chrisballinger> i renamed ffmpeg.c's main to ffmpeg_main and called it directly from my program
[02:00] <chrisballinger> it works great the first time but it seems like each time i call it after the first it keeps on adding new output streams or something
[09:47] <esing> Hi, I want to cut an mpeg video with ffmpeg and for that I used this command: /ffmpeg -i test1.mpg -vcodec copy -acodec copy -ss 00:01:00 -to 00:01:20 test2.mpeg   ... but though I used -acodec copy I don't hear any sound for the output video when playing in vlc or other media players
[09:47] <esing> This is the mediainfo of the input file: http://ix.io/84m   ... and this is the mediainfo of the output file: http://ix.io/84l
[10:47] <relaxed> esing: add -f vob
[10:49] <esing> relaxed, Um, that worked
[10:49] <esing> Thank you
[10:49] <relaxed> by default ffmpeg uses the mpeg 1 container
[10:49] <relaxed> which is wrong, in my opinion.
[10:51] <relaxed> a relic from long ago :)
[10:52] <esing> I tried it earlier with libav and they adopted the same relict from ffmpeg
[10:53] <relaxed> bad habits die hard, like Burce Willis
[10:54] <relaxed> Bruce*
[10:54] <esing> Heh :)
[10:55] <relaxed> in ffmpeg's defense, it choses the caontainer based on the output name if not specified.
[10:56] <relaxed> chooses*
[10:56] Action: relaxed had too many pints
[10:59] <esing> Oh, good to know, then with the output filename out.m2v it would have probably worked
[11:02] <relaxed> The lesson here is to always consult `ffmpeg -formats|less` and force the correct container with -f $format
[11:03] <relaxed> because, as you've learned, ffmpeg can give you the wrong one.
[11:03] <relaxed> "The more you know."
[11:03] <esing> Yes, I'll keep that in mind and use -f to definetly select my desired format
[11:19] <dv-> has anyone recorded audio from a blue usb microphone with ffmpeg?
[12:42] <brontosaurusrex> how would i pipe mplayer (with subs burned in) out to ffmpeg? this http://paste.debian.net/plain/40578 is not working.
[12:42] <brontosaurusrex> & i'am on wheezy
[16:59] <Jookia> Hello! Is there a way to calculate the pts of a frame?
[16:59] <Jookia> When encoding, that is.
[17:00] <Mavrik> yep
[17:00] <Mavrik> pts is just a timestamp of a frame in timebase units.
[17:02] <Mavrik> but you'll need to ask a more concrete question if you want a more specific answer :)
[17:03] <Jookia> Mavrik: Heh, I think that may have been the answer I need.
[17:03] <Mavrik> ;)
[17:03] <Jookia> Someone a little more specific, what's AVStream's pts do? Can I set it each time I write a frame?
[17:04] <Mavrik> Jookia, uh, I think that's just a marker used for demuxer/muxer
[17:04] <Mavrik> Jookia, not meant for your use
[17:04] <Mavrik> Jookia, you just make sure your frame pts are set properly
[17:05] <Mavrik> and the encoder will set your pts/dts on packet properly on the output
[17:05] <Mavrik> you just need to set time_base in codec context
[17:05] <Jookia> Ah. Okay. The problem I'm having implementation wise is that my writeFrame function takes a frame, so it won't have the right pts.
[17:05] <Mavrik> also on the stream :)
[17:06] <Jookia> So I'm trying to figrue out how I'm going to get a pts from outside the frame.
[17:07] <Mavrik> well, pts has to be set to the player has to know when to show the frame
[17:07] <Mavrik> you can generate pts yourself if you're sure your fps is constant and you have no lost frames
[17:09] <Jookia> I think the FPS is constant, but I'm not sure about losing frames, which is a problem.
[17:11] <Jookia> My old system was based off of just incrementing the pts, but I'm guessing that's not useful either?
[17:11] <Mavrik> well, that's what I meant by "generate FPS"
[17:11] <Mavrik> *PTS
[17:12] <Jookia> Ah. So, ideally I should be generating timestamps based off the system clock?
[17:12] <Mavrik> if your timebase is 1/90000 and you have 25fps
[17:12] <Mavrik> it means your frames will have (90000 / 25) delta
[17:12] <Mavrik> so you just say PTS += (90000 / 25) for each frame
[17:12] <Mavrik> of course, if you lose a frame your video will desync
[17:14] <Jookia> Ah. So how do I solve this?
[17:15] <Mavrik> by keeping the timestamp of your frame at all times ;)
[17:15] <Mavrik> timestamp being the pts
[17:16] <Jookia> Don't I set the timestamp in the first place though?
[17:16] <Mavrik> Jookia, that depends what your source it.
[17:16] <Mavrik> *is
[17:17] <Jookia> Mavrik: I'm encoding a screencapture
[17:17] <Mavrik> Jookia, any video grabbing device will set pts properly because that's the basic of playing a video :)
[17:17] <Jookia> I am the video grabbing device though. :(
[17:18] <Mavrik> ah :)
[17:18] <Mavrik> well then you have to know when you want your frames displayed while they're being played no? :)
[17:19] <Jookia> Yes, I think I can conjure a delta between the frame I'm writing and the last frame written.
[17:20] <Mavrik> btw, I strongly suggest you make your video with constant fps
[17:20] <Mavrik> or pain will ensure :)
[17:20] <Jookia> Mavrik: It is a constant FPS, but I may have to drop frames now and then which is the problem.
[17:22] <Mavrik> Jookia,  you could use fps filter from ffmpeg
[17:22] <Mavrik> which does that for you
[17:22] <Mavrik> but it does expect proper timestamps on frames though.
[17:24] <Jookia> Mavrik: So I can't drop frames?
[17:25] <Mavrik> Jookia, whatever you do with frames is your think
[17:25] <Jookia> :s I don't
[17:25] <Mavrik> you just have to pass frames with evenly spaced PTS into the encoder to get constant FPS video
[17:25] <Mavrik> it doesn't care for anything else you do :)
[17:26] <Jookia> Ah. So with that I could make one frame last for twice as long, etc?
[17:27] <Mavrik> or you could copy it and pass it twice
[17:27] <Jookia> Ah.
[17:28] <Jookia> While I'm here I kind of have a slightly more 'interesting' question, that's not really related to ffmpeg.
[17:28] <Jookia> Do you know of any libraries in C or whatnot that could provide a good clock?
[17:29] <Mavrik> hmmm
[17:29] <Mavrik> no idea :/
[17:30] <Jookia> I have a function to get the current time and whatnot, but I'm worried about things like leap seconds or time skewing.
[17:32] <klaxa> sys/time.h ?
[17:33] <klaxa> the POSIX time struct should deal with that stuff
[17:33] <klaxa> other than that, if the machine is always connected to the internet, there are probably ntp headers somwhere
[17:33] <Jookia> I'm using timespec, and CLOCK_REALTIME for portability (but later I'll have to deal with another OS sometimes so
[17:34] <Jookia> I'm worried about what happens if the clock suddenly stays still for a second, or jumps back due to skewing
[18:04] <Jookia> So, I've implemented my pts setting for frames, but it doesn't seem to be working- It's variable across players (mplayer plays it choppily, vlc plays it at almost normal speed)
[18:05] <Jookia> http://sprunge.us/ehVe is my code, could somebody see what I'm doing wrong?
[18:59] <Jookia> My encoded video isn't writing the correct output. What could be the cause of this?
[19:26] <Jookia> I'm pretty sure my pts is set right now, I'm incrementing it by one for each frame. However, the duration of my encoded video isn't correct- If I record a few seconds of video, at 1FPS, I get a duration that doesn't match.
[20:41] <megakacktus> I'm trying to encode mp3 audio into vorbis, is there a way I can automatically make the bitrate of the output file match the bitrate of the input file?
[20:47] <GoaLitiuM> with some scripting, probably
[20:50] <megakacktus> is there a way I can get ffmpeg to return just the bitrate?
[20:51] <sacarasc> ffprobe -i input.mp3 2>&1 | grep bitrate
[20:51] <sacarasc> Or whatever...
[20:52] <sacarasc> Might have to do some awking, too.
[20:52] <megakacktus> that's what I was afraid of :P
[20:56] <sacarasc> megakacktus: Excuse the cygwinness...
[20:56] <sacarasc> User at User-PC ~
[20:56] <sacarasc> $ /cygdrive/c/Users/User/Desktop/ffmpeg/ffmpeg-20130823-git-c443689-win64-static/bin/ffprobe.exe -i "E:\music\3M2K\3M2K - Retrash FLAC\3M2K - Retrash - 01 The Nude Sunrise.flac" 2>&1 | grep bitrate | awk '{print $4}'
[20:56] <sacarasc> 254
[20:56] <sacarasc> Simple. :D
[20:56] <sacarasc> That's with a k, if you wanna use it in a command, so...
[20:58] <sacarasc> ffmpeg -i input.mp3 -c vorbis -b $(ffprobe -i input.mp3 2>&1 | grep bitrate | awk '{print $4}')k output.ogg
[20:58] <sacarasc> Something like that, megakacktus.
[20:59] <megakacktus> thanks, I'll try that :)
[20:59] Action: sacarasc goes off to save Metropolis, now.
[21:01] <spaam> good
[21:05] <megakacktus> Hmm... I tried that and my 218 kb/s mp3 was encoded into a 112 kb/s vorbis file :P
[21:07] <beastd> megakacktus: why do you want same bitrate?
[21:08] <megakacktus> beastd, I'm writing a script to recursively convert a directory of mp3s into vorbis, and I don't want to lose quality
[21:08] <beastd> megakacktus: you are tackling the problem in the wrong way. let me try to explain (will take a moment)
[21:10] <flarunt> same bitrate does not mean same quality when comparing different codecs
[21:11] <beastd> in short: 1) you will lose quality anyway because vorbis is a lossy codec (so compared to the original you will always lose quality)
[21:12] <beastd> 2) vorbis compresses usually better than mp3. so it will not mean you will get better quality if you mimic the rate of the input mp3
[21:15] <beastd> 3) i would advice you to test encoding the input with e.g. quality 5 (on vorbis scale) and its neighbours. then make decision with your own ears what quality is sufficient
[21:17] <beastd> (not re-encoding to a lossy format would of course keep the highest quality)
[21:18] <beastd> megakacktus: you get the hang of it?
[21:20] <megakacktus> I think so
[21:37] <megakacktus> thanks for your help, I think I have it figured out now
[23:12] <chrisballinger> hey all is there any way to manually call ffmpeg's main function twice from another program? i can call it once just fine but the second time breaks on ffmpeg_parse_options->open_files->open_output_file-> L1690:                 new_area = ist->st->codec->width * ist->st->codec->height;
[23:16] <Orpheon> Hello, I need some help. I have a lot of .m4a files, and I can listen to them perfectly on both phone and computer. Whenever I try to convert them to mp3 though, the computer can still read them properly, but all music players I've tried on my android phone don't support skipping or even pausing. Doing so jumps back to a time between 0 and the first 30 seconds, as if seeking a certain time went to the square root of it or something. Any
[23:16] <Orpheon> idea how I could identify the problem and fix it?
[23:16] <Orpheon> (I've tried using both avconv and ffmpeg for converting, same thing)
[23:17] <chrisballinger> why are you converting to MP3?
[23:17] <chrisballinger> lossy -> lossy isn't great
[23:17] <Orpheon> consistency with the rest of my music library
[23:18] <Orpheon> well, I don't have any problem with keeping .m4a files from now on
[23:18] <Orpheon> but I already have a good hundred files converted this way, and knowing the problem/being able to fix it would be nice
[23:19] <Orpheon> chrisballinger, ^
[23:20] <chrisballinger> yeah
[23:20] <chrisballinger> maybe convert to .wav then use lame to make the MP3
[23:21] <Orpheon> do you happen to have the command for that?
[23:21] <Orpheon> also, won't that be even worse for quality?
[23:23] <chrisballinger> no it will be just as bad
[23:27] <Orpheon> like this?
[23:27] <Orpheon> $ avconv -i Night.wav -acodec libmp3lame Night.mp3
[23:29] <Orpheon> chrisballinger, ok. Converting a not-working mp3 file into wav gives a working wav file, converting back to mp3 gives a non-working mp3 again
[23:30] <sacarasc> Orpheon: For avconv help, go to #libav.
[23:31] <Orpheon> sacarasc, the same thing happens with ffmpeg
[23:31] <bais> ffmpeg wants my dead .)
[23:31] <sacarasc> Why are you converting from (probably) AAC to MP3?
[23:32] <Orpheon> sacarasc, because I didn't know the difference
[23:32] <Orpheon> so basically the best way would to redownload the entire thing?
[23:33] <sacarasc> Whenever you convert to a lossy format, you always lose quality. Generally, AAC is better quality per bitrate than MP3.
[23:33] <Orpheon> ah
[23:33] <Orpheon> so converting mp3s back would make it even worse?
[23:34] <sacarasc> Yes.
[23:34] <Orpheon> ok
[23:39] <chrisballinger> hey is it advisable to call ffmpeg_parse_options twice within a program?
[23:46] <Plorkyeran> it is not part of the API, so I'd be inclined to say that it is not advisable to call it at all
[23:47] <chrisballinger> :(
[23:48] <bais> hi I'm trying to compile last version #ffmpeg with Linux Encoding Install.sh and it said "ERROR: libx264 not found", very strange :) because "============> libx264 git installed successfully" 3 lines before
[23:49] <bais> any advice ?
[23:52] <bais> it said:   In function `x264_opencl_load_library'  con config.log   :  opencl.c:(.text+0x411): undefined reference to `dlopen'
[23:52] <bais> and other with dlsym
[00:00] --- Mon Sep 16 2013


More information about the Ffmpeg-devel-irc mailing list