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

burek burek021 at gmail.com
Thu Jan 29 02:05:01 CET 2015


[00:02] <kc8hfi> i have a pcm audio file and a raw uncompressed video file.  when I use ffmpeg to combine and encode these to mpeg/ac-3,  the audio falls out of sync.
[00:03] <kc8hfi> can I encode the video separately, then the audio separately, and then use ffmpeg to combine the two together without losing the audio sync?
[00:16] <iive> kc8hfi: there is no problem to encode the video without audio and then try to mux them both at second stage.
[00:16] <iive> however I doubt that you'd get a different result.
[00:17] <iive> processing audio and video separately is risky thing, because you lose sync data.
[00:17] <iive> e.g. is the pcm from a live source, capture or sound card?
[00:19] <iive> these are known to use imprecise oscillators that result in drift in the audio frequency...
[00:25] <kc8hfi> it came from a capture card
[00:26] <kc8hfi> i captured the raw video and audio at the same time into a huge file.  but the audio and video fell out of sync.  so i split the audio and video into 2 pieces.
[00:27] <kc8hfi> Then I used openshot to try and resync the audio and video.  however,  when playing back both tracks side by side, there were no audio/video sync problems.  So I went ahead and let openshot encode them both in another file.  the audio and video were in sync for awhile, but then came out of sync.
[00:31] <kc8hfi> http://fpaste.org/176405/14224013/ is the command i'm using to encode just the video.
[00:34] <kc8hfi> http://fpaste.org/176410/42240160/ is the command i'm gonna try to encode both the video and audio together into the output file.  I haven't tested this yet to see if its syntactically correct yet.  It should be close if it isn't
[00:35] <kc8hfi> dang, something bad happened,  http://fpaste.org/176413/40173814/
[01:07] <kc8hfi> any idea why i'm getting those buffer underflow errors like that?
[01:59] <michael__> Hello
[02:00] <michael__> I have some videos which have been sped up with an unknown program
[02:00] <michael__> They are 119.9115782% normal speed
[02:01] <michael__> The method of speeding up seems to have simply increased the framerate, and adjusted the audio accordingly
[02:02] <michael__> I can get it to play at normal speed with the command ffmpeg -i input.mp4  -filter_complex "[0:v]setpts=1.199115782*PTS[v];[0:a]atempo=0.833947826[a]" -map "[v]" -map "[a]" -r 23.976 output.mp4
[02:03] <michael__> Unfortunately, although it is running slower, it is still high pitch.  How can I modify the above command to reduce the pitch?
[02:11] <michael__> I have some videos which have been sped up with an unknown program. They are 119.9115782% normal speed. The method of speeding up seems to have simply increased the framerate, and adjusted the audio accordingly. I can get it to play at normal speed with the command 'ffmpeg -i input.mp4  -filter_complex "[0:v]setpts=1.199115782*PTS[v];[0:a]atempo=0.833947826[a]" -map "[v]" -map "[a]" -r 23.976 output.mp4'. Unfortunately, although it is running
[02:11] <michael__> slower, it is still high pitch.  How can I modify the above command to reduce the pitch?
[02:13] <michael__> I am now trying with asetpts instead
[02:33] <michael__> Ok, that just results in flickering audio
[02:34] <michael__> I'll try asetrate
[03:12] <k_sze[work]> What's a good container format that would allow me to quickly get a frame count while the video is still being written?
[03:13] <k_sze[work]> It appears that if I use raw h.264, ffmpeg needs to try and decode every frame just to get the stats and frame count.
[03:14] <relaxed> frame count of what's been encoded so far?
[03:14] <k_sze[work]> yes
[03:15] <relaxed> ffmpeg's output should tell you
[03:15] <relaxed> frame= <number>
[03:16] <k_sze[work]> Problem is that the video is remotely encoded.
[03:17] <relaxed> have it copy stderr to a file and parse that for the frame count
[03:18] <k_sze[work]> the frame count in stderr is guaranteed to be flushed to disk?
[03:20] <relaxed> hmm, good point.
[03:21] <relaxed> are you monitoring progress or what?
[03:22] <k_sze[work]> I have a remote machine that captures video and writes it as H.264 over samba, to this local machine.
[03:23] <k_sze[work]> And I would like to periodically check the frame count on the local machine, programmatically.
[03:24] <k_sze[work]> I need assurance that the frame count I get is the number of frames *flushed to disk* and immediately decodable.
[03:24] <relaxed> the local machine is running Windows?
[03:24] <k_sze[work]> no, Debian
[03:25] <relaxed> I think matroska would be a good choice.
[03:35] <michael__> If you use the sync command, it will be flushed to the disk
[03:35] <k_sze[work]> michael__: you mean using the libav* API directly?
[03:36] <michael__> k_sze[work]: No
[03:36] <k_sze[work]> Then what sync command?
[03:37] <michael__> On my system (Linux Mint), there is a command sync which flushes disk caches
[03:37] <michael__> If you're using Mac, I assume it's there too
[03:38] <michael__> Append the '&' symbol (no quotes) to the ffmpeg command and you can run sync in the same terminal
[03:47] <k_sze[work]> And I'm having trouble remuxing a H.264 avi file to mkv
[03:47] <k_sze[work]> I get Can't write packet with unknown timestamp av_interleaved_write_frame(): Invalid argument
[03:48] <k_sze[work]> I've already tried adding -fflags genpts and it's still the same.
[03:49] <k_sze[work]> oh, never mind
[03:49] <k_sze[work]> need to put that *before* the -i
[04:01] <coherence> welp, solved my issues - had to twiddle the start time bits using libavformat, and writing the playlist out myself at the same time.
[04:01] <coherence> cheers!
[04:02] <Godface> can anyone help me correct this error? "ffmpeg: error while loading shared libraries: libass.so.4: cannot open shared object file: No such file or directory"
[04:02] <c_14> Did you compile ffmpeg yourself?
[04:03] <Godface> yes
[04:03] <c_14> What prefix?
[04:04] <Godface> prefix?
[04:04] <c_14> You did `make install', right?
[04:04] <Godface> yes
[04:04] <Godface> i used this https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[04:05] <c_14> You installed libass-dev ?
[04:05] <Godface> yes
[04:05] <c_14> does /usr/lib/libass.so exist?
[04:08] <Godface> c_14: no
[04:08] <c_14> Can you pastebin the output of `dpkg -L libass-dev' ?
[04:09] <Godface> http://pastebin.com/uM1fcAuc
[04:11] <c_14> How about `ldd /path/to/ffmpeg' ?
[04:13] <Godface> how can i find the path?
[04:13] <c_14> which ffmpeg
[04:13] <Godface> ldd: ./ffmpeg: not regular file
[04:14] <c_14> `which ffmpeg' returns ./ffmpeg ?
[04:16] <Godface> c_14: http://pastebin.com/7aDNyCNn
[04:17] <c_14> Ehhh, what does `/home/admin/bin/ffmpeg -version' output?
[04:18] <Godface> ffmpeg version 2.5.git Copyright (c) 2000-2015 the FFmpeg developers. built on Jan 27 2015 10:26:29 with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
[04:19] <c_14> Now what command were you executing when you got the error abov?
[04:19] <c_14> +e
[04:20] <Godface> ffmpeg -i "$2" -vcodec copy -acodec libfdk_aac -ac 2 -b:a 384k "$1".mp4
[04:20] <c_14> Replace 'ffmpeg' with '/home/admin/bin/ffmpeg'
[04:22] <Godface> that works. why won't just ffmpeg work?
[04:22] <c_14> Because there's probably another 'ffmpeg' binary in your path somewher.
[04:22] <c_14> +e
[04:22] <c_14> export PATH="/home/admin/bin:$PATH"
[04:24] <Godface> thanks for the help
[04:24] <c_14> np
[10:39] <k_sze[work]> I followed this build guide to build a local copy of ffmpeg: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[10:39] <k_sze[work]> And then I want to build the PyAV python binding against it.
[10:41] <k_sze[work]> but I then get some weird error about lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
[10:42] <k_sze[work]> What's that supposed to mean? *What* am I supposed to "recompile with -fPIC"?
[10:42] <c_14> ffmpeg
[10:45] <c_14> You can probably just add --enable-pic to your configure line.
[10:58] <deepsystm> Hi All!
[10:59] <deepsystm> anybody knows how to stream MP3, AAC, OGG to icecast with ffmpeg?
[11:03] <deepsystm> I try: http://pastebin.com/MALq9w26
[11:04] <deepsystm> I try to search ffmpeg useage example to stream to icecast in google, but nothing found
[11:19] <k_sze[work]> c_14: ok, --enable-pic got rid of that.
[11:19] <k_sze[work]> And now I get ffmpeg/libavutil/mem.c:253: multiple definition of `av_calloc'
[11:20] <k_sze[work]> Also /ffmpeg/libavutil/frame.c:30: multiple definition of `av_frame_get_best_effort_timestamp'
[12:10] <deasy> hello all
[12:10] <Guest21271> hello all
[12:12] <Guest21271> i want to ask to everyone here
[12:12] <Guest21271> how to make video like this http://www.imagebam.com/image/145b86385282890 with ffmpeg?
[12:12] <Guest21271> video with overlay /frame ..
[12:13] <Guest21271> thanks for answer :)
[12:18] <c_14> Use the overlay filter?
[12:18] <c_14> k_sze[work]: no clue
[12:18] <c_14> How are you compiling your program?
[12:21] <Guest21271> i have 1 video ..
[12:21] <Guest21271> i want set frame to my video..with static image ..like in screenshot
[12:22] <c_14> The overlay filter can take an image as input.
[12:23] <Guest21271> how to use overlay filter command c_14?
[12:23] <Guest21271> :) i'm new in ffmpeg
[12:24] <Guest21271> https://www.youtube.com/watch?v=faHziFBwUeg  <<this is sample video
[12:25] <c_14> https://ffmpeg.org/ffmpeg-filters.html#overlay-1 https://ffmpeg.org/ffmpeg-filters.html#Examples-50
[12:26] <Guest21271> fast forward to 1:24 minutes
[12:27] <c_14> You mean that surrounding picture frame thingy?
[12:28] <Guest21271> yes
[12:28] <Guest21271> something like that
[12:28] <Guest21271> give my video picture frame ..
[12:30] <Guest21271> or something like this https://www.youtube.com/watch?v=1Jdf_aIFCsE
[12:31] <Guest21271> with overlay filter command? can we make video like that?
[12:32] <c_14> Either use the picture frame as the backer with -loop 1 and overlay the video in the position you want, or pad your video to the total video+frame size, and overlay the image (the image needs to have a transparent portion or you won't see the video)
[12:35] <Guest21271> can you give me example command @c_14 ? if i have 1 transparant picture ..test.jpg and i have 1 video ..upin.mp4
[12:39] <c_14> `ffmpeg -i upin.mp4 -i test.jpg -filter_complex '[0:v][1:v]overlay={x_offset}:{y_offset}[v]' -map '[v]' -map 0:a -c:a copy out.mp4'
[12:39] <c_14> Where x_offset is the width of the 'frame' from the left and y_offset is the width of the 'frame' from the top
[12:40] <c_14> eh, wait
[12:40] <c_14> `ffmpeg -i upin.mp4 -i test.jpg -filter_complex '[0:v]pad={image_width}:{image_height}[iv];[iv][1:v]overlay={x_offset}:{y_offset}[v]' -map '[v]' -map 0:a -c:a copy out.mp4'
[12:41] <c_14> Everything in {} is a variable that depends on your input, the {} should not be there in your final command line
[12:43] <Guest21271> thanks c_14
[12:43] <Guest21271> i will try right now
[15:26] <kc8hfi> i'm having a problem with vidoe and audio sync.  When I encode a raw video and raw audio into a mpeg file,  at the beginning of the file, the audio and video is in sync.  around 48 minutes or so, the sound starts coming befor ethe video.  from that time forward, the sync gets farther and farther apart
[15:27] <kc8hfi> I've seen options where you can shift the audio eithe way to correct the sync.  But I that just the shift on the whole thing
[16:48] <oomkiller1> hi i'm getting an error while executing an ffmpeg command: http://pastebin.com/wdyrHK44 command is in first line, can someone help?
[16:49] <oomkiller1> I don't understand what the exact problem is, I have an h264 decoder, all the other files with h264 are working
[17:00] <justinX> oomkiller1: so you only get that error for that file?
[17:01] <justinX> I mean, something with that file that don't work with "ffmpeg -i input.mkv -vcodec hevc -x265-params crf=28 -sn -acodec ac3 -map 0:0 -map 0:1 -map 0:2 output.mkv" ?
[17:03] <oomkiller1> justinX: I'm not sure if I understand you, but the only difference from the other files I could see was that the Codec ID is avc1 instead of V_MPEG4/ISO/AVC
[17:07] <justinX> hmm.. that is strange if that is only difference in the ffprobe output between a file that works and this that don't
[17:17] <oomkiller1> justinX: heres the output of ffprobe: https://bpaste.net/show/f242286e6831 (I got my information from mediainfo)
[17:19] <oomkiller1> justinX: could that be a problem? [mov,mp4,m4a,3gp,3g2,mj2 @ 0x23df250] stream 0, timescale not set
[17:19] <justinX> sadly I'm no expert but maybe yes
[17:20] <justinX> hopefully someone that knows more joins in here later in the evening
[17:20] <oomkiller1> ok thx
[18:06] <Vladimir_> Hi all
[18:06] <Vladimir_> anybody not sleep?
[18:07] <Vladimir_> how can help with stream audio to icecast with ffmpeg?
[18:19] <relaxed> Vladimir_: man ffmpeg-protocols|less +/^'   'Icecast
[18:22] Action: relaxed 's static build will have alsa indev/outdev and libvidstab support
[19:08] <justinX> Vladimir_: I'm not sleeping.
[19:39] <Vladimir_> No manual entry for ffmpeg-protocols
[19:40] <Vladimir_> justinX how can give example how to broadcast to icecast
[19:56] <c_14> https://ffmpeg.org/ffmpeg-protocols.html#Icecast
[21:02] <llogan> man ffmpeg-protocols works for me
[21:02] <llogan> Vladimir_: ^
[21:34] <ben_> hi. i have some videos with 5.1 audio that i want to add stereo audio. the command i'm using works great, but i was wondering if there's a way to set the new stereo track as the default?
[21:34] <llogan> let me guess: QuickTime?
[21:35] <ben_> no, for my roku
[21:35] <ben_> can't handle the 5.1 audio
[21:38] <JoshX> i'm saving a h264 stream from an ip camera in 15 minute chunks and I need the timecode tothe msec of the first frame (or the timecode of every frame) or an index file with frametimes/numbers
[21:38] <JoshX> is there any way to do this using the segment filter and perhaps metadata?
[21:38] <JoshX> or any other way?
[21:41] <ben_> http://pastebin.com/bGZSCgDR
[21:41] <ben_> thats the ffmpeg part from my script
[21:42] <ben_> as i mentioned, it works fine but i'd like to mark the stereo track as the default one
[21:44] <llogan> why did you not incluse the console output too?
[21:46] <ben_> is it required? the output files are fine and work correctly
[21:46] <llogan> it was requested.
[21:47] <ben_> i just wanted to know if it was possible for ffmpeg to set the default audio track
[21:47] <llogan> i ask because it seems at least half of people do not include the output
[21:47] <llogan> and i'd like to know why
[21:47] <llogan> so maybe i can re-word the request
[21:48] <ben_> well i'd have to run another task to get console output
[22:06] <ben_> http://pastebin.com/uZAuM45e
[22:06] <ben_> there's the whole thing
[22:07] <ben_> so, is it possible for ffmpeg to set the stereo track as default?
[22:14] <llogan> ben_: do you have a similar file where it does have the correct default audio?
[22:15] <ben_> no, the original files only have 5.1 audio so that is the default track
[22:18] <ben_> i can tag the new stereo tracks as default with mkvpropedit but i'd like to see if i could get it all done with a single ffmpeg script
[22:20] <DX099> hello all
[22:21] <DX099> I have a problem regarding metadata, flac and m4a container
[22:21] <DX099> http://paste.debian.net/142748/
[22:22] <DX099> when producing the file, ffmpeg acts like everything went fine, but when I use ffprobe or even try to import resulting m4a files within my Rhythmbox library, nothing shows up in place of the metadata
[22:23] <Vladimir_> how was try to stream content from ffmpeg to icecast?
[22:24] <BtbN> i don't think you want it to convert that cover png to h264
[22:24] <DX099> BtbN, should I specify it so that it stays png ?
[22:24] <BtbN> no idea if m4a supports that
[22:26] <DX099> BtbN, you were right ! removing the png and ffprobe is no longer confused, and certainly other software will be fine
[22:26] <DX099> I'll try png
[22:28] <DX099> ah "codec not currently supported in container"
[22:29] <BtbN> m4a should support it. But ffmpeg currently doesn't.
[22:32] <DX099> BtbN, I just saw that mjpeg is supported by m4a too but "Could not find tag for codec mjpeg in stream #0, codec not currently supported in containe"
[22:32] <BtbN> yes, i don't think ffmpeg currently supports muxing cover art into m4a
[22:32] <DX099> ok
[22:33] <DX099> I don't know why I got the impression that it could somehow... maybe while coverting files with already embedded images
[22:38] <DX099> BtbN, alright, I'll just be using external utilities thanks
[00:00] --- Thu Jan 29 2015


More information about the Ffmpeg-devel-irc mailing list