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

burek burek021 at gmail.com
Sat Jun 29 02:05:02 CEST 2013


[00:44] <mcepl> I have a DVD dump (looks like MPEG-2) which has subtitles included inside ... I would like to convert (especially compress) the file to .MP4, but I would like still to preserve those internal subtitles. ffmpeg -i file.mpg file.mp4 doesn't seem to be the trick. ANy thoughts?
[00:45] <sacarasc> The subtitles are most likely vobsubs. I am not sure they can go into MP4. If they can't, you'd have to convert them using some kind of OCR.
[00:45] <mcepl> what are vobsubs? some kind of graphic?
[00:46] <sacarasc> Yeah, they're bitmaps.
[00:47] <mcepl> how could I find out? ffplay -stats -vn -an file.mpg doesn't seem to mention them.
[00:49] <adnap> Wow, so that was what vobsubs were. So ghetto
[00:49] <Frantic1> Hey guys, I'm trying to process a video with ffmpeg 1.2.1, and I've stumbled across a weird video. Every player can play it (QuickTime, VLC, Chrome player). http://i.imgur.com/IJAGkzO.png
[00:49] <Frantic1> But, the video is at 1920width
[00:50] <Frantic1> Though, ffprobe and inspect report it at 1440w
[00:50] <Frantic1> Quicktime's inspect, however, gives the thing you see in the image, two resolutions for the same thing
[00:50] <Frantic1> Could someone please tell me what's going on with this file? :)
[00:51] <Frantic1> btw, output from ffprobe is here: https://gist.github.com/anonymous/f66ce998b8b6855380d1
[00:53] <vulture> maybe one is some resolution from the container, or a resolution format table lookup id (mpeg does this and it's worthless), and then the other is the actual resolution used?
[00:53] <sacarasc> Frantic1: Some files have different display ratios and storage ratios. This is quite common on TV channels.
[00:54] <Frantic1> if I reencode it, it works OK, but I'm also trying to get a poster image for it with -f image2, and that gives me an image at the wrong aspect ratio
[00:55] <Frantic1> sacarasc: I think you are right, In lines 15-16 of the gist, there's "sample_aspect_ratio" and "display_aspect_ratio", those are different
[01:01] <Frantic1> yep, that's it :)
[01:02] <Frantic1> Basically every player does in fact play the video correctly
[01:02] <Frantic1> so apparently it's something common as you say
[01:02] <Frantic1> But, does anyone know how I might be able to get a frame from it at the display aspect ratio?
[01:03] <sacarasc> Use -aspect 16:9 or something, I guess.
[01:03] <Frantic1> I'm just reading through `man ffmpeg`, but setting -aspect doesn't help :(
[01:03] <Frantic1> yep, it's the only thing i found as well
[01:04] <Frantic1> I'm trying: ffmpeg -i /Users/tudor/proj/phoenix/media/uploads/19._individual_approach_in_LNP_.mp4 -ss 10 -f image2 -frames:v 1 -aspect "16:9" -y x.jpg
[01:04] <Frantic1> still prduces 4:3 image
[01:07] <tsjiller> Frantic1: tried -vf "scae=1920:1080"  ?
[01:08] <tsjiller> s/scae/scale
[01:08] <Frantic1> tsjiller: if I just do -s 1920x1080, it works
[01:08] <Frantic1> tsjiller: but I'm looking for a generic solution
[01:09] <Frantic1> because I have no idea what aspect or size the next video will have
[01:09] <Frantic1> currently I'm thinking of getting 4/3  16/9 and scaling the image by that
[01:10] <Frantic1> but I'm just hoping that ffmpeg has a way of outputting the image at the display ratio, so I don't have to do this extra step which can lead to a 1px off due to float rounding
[01:13] <tsjiller> you can use logic functions in the scale stuff.
[01:13] <tsjiller> http://ffmpeg.org/pipermail/ffmpeg-user/2011-July/001746.html has some info
[01:14] <tsjiller> if I understood you correctly
[01:16] <Frantic1> tsjiller: that's cool, but it just scales any video to 16:9, I don't want to always scale to 16:9, I want to always scale to the display ratio
[01:17] <Frantic1> and the display ratio can be whatever the video says it is
[01:18] <Frantic1> am I the first person to try to get poster images for videos with ffmpeg? :)
[01:22] <mark4o> Frantic1: -vf "scale=iw*sar:ih"
[01:23] <Frantic1> mark4o: that worked!
[01:23] <Frantic1> thank you
[01:23] <Frantic1> though, will that still work when sar and dar are the same?
[01:24] <mark4o> yes
[01:24] <Frantic1> yes, it does :)
[01:25] <Frantic1> I don't understand why, though
[01:25] <mark4o> why would sar and dar be the same?  unless you have a square image
[01:25] <Frantic1> aren't they usually the same?
[01:26] <mark4o> no, if it is a computer image then sar is 1:1 and dar is the width/height, which is usually not square
[01:26] <Frantic1> I may be wrong, I'm not sure what SAR is, I guess it's the ratio at which the video was when it was sampled
[01:26] <mark4o> sar is the aspect ratio of each pixel
[01:26] <mark4o> which on a computer monitor is 1:1
[01:27] <Frantic1> oh
[01:27] <Frantic1> I'll read some more on the topic then, I seem to have assumed wrongly what that was
[01:27] <Frantic1> thanks a lot for your help guys
[01:28] <Frantic1> I was actually writing the code to manually get the difference between sar and dar and apply it to w :)
[01:34] <Frantic1> mark4o: I got it now, thanks a lot for your patience
[01:34] <mark4o> np
[01:44] <Frantic1> I have one more issue that maybe you guys can help me understand
[01:44] <Frantic1> I'm rendering a player with my processed video. I have a fixed width, and I am varying height in order to keep the aspect ratio and not have black bars
[01:45] <Frantic1> I used to always get streams[video_sream_id][width] / height, and use that ratio, but now that I know about the SAR, I have to factor that in as well
[01:45] <Frantic1> but I have a video, which has DAR and SAR showing "0:1"
[01:46] <Frantic1> does that mean somthing? Or is the video bad?
[01:46] <Frantic1> I'm just probing random videos to see if I run into problems
[02:00] <mark4o> Frantic1: if it is 0 then it is unspecified; you'll need to guess, or assume sar=1:1 and dar=width/height
[02:57] <RigidWig> how can I feed ffmpeg a list of images in a sequence of my choosing?
[03:04] <grepper> RigidWig: one way would be to symlink to %03d.png or whatever (001.png 002.png etc) then use that.
[03:05] <grepper> ffmpeg -f image2 ...  -i %03d.png ...
[03:12] <mark4o> RigidWig: or -f image2 -pattern_type glob -i "{first,second,third}.png" might work
[03:29] <Mista_D> http://pastebin.ca/2410257 having problems with buring in time stamps to a 24p video...
[03:31] <Mista_D> got it... its a :/;/. in timestamp format.
[04:08] <llogan> RigidWig: also see -start_number option: http://ffmpeg.org/faq.html#How-do-I-encode-single-pictures-into-movies_003f
[04:08] <llogan> https://ffmpeg.org/trac/ffmpeg/wiki/Create%20a%20video%20slideshow%20from%20images
[04:09] <llogan> Mista_D: my brother had "Mista C" on his hard hat until his co workers started calling him "Mistake".
[05:28] <blink>  /cls
[09:37] <diroots> hi there!
[09:57] <diroots> I have an issue with ffmpeg when encoding DVCPRO HD to H264. DVCPRO HD are files with size set to 1440x1080i [PAR 4:3 DAR 16:9], but displaying as fullHD (1920x1080) (and mediainfo reports "2" sizes : width : 1440 original width 1888 height 1062 original height 1080, i think it's these info which permit to view DVCPROHD files either in 4:3 or 16:9), and when I encode it to H264, i get videos with size 1440x1080 (so their aspect ratio is 4:3 only). do I ne
[09:57] <diroots> ed to explicitely force -s 1920x1080 during encoding? or -video_size hd1080 ? or force aspect ratio?
[10:16] <mrAlmond> Hi everyone
[10:17] <mrAlmond> I've encoded a video using Android H264 encoder then I've muxed it with ffmpeg in c code.
[10:17] <mrAlmond> it's an mp4 container
[10:18] <mrAlmond> It works well in VLC but it gaves me error on Windows Media Player
[10:18] <mrAlmond> this is the MP4Box output
[10:18] <mrAlmond> http://pastebin.com/meP2Dfw8
[10:19] <mrAlmond> there is no audio track, only video
[10:19] <mrAlmond> h264 avc base profile
[10:20] <diroots> mrAlmond: did you try with an audio track? same result?
[10:21] <mrAlmond> this is the ffprobe
[10:21] <mrAlmond> http://pastebin.com/DifENUMX
[10:22] <mrAlmond> diroots : No, at the moment I haven't tried with audio track as I'm recording video from a camera that has no audio input
[10:24] <diroots> try adding an audio track to your file, to see if WMP still complains
[10:24] <mrAlmond> do you have a ffmpeg command line to add a dummy audio track to it?
[10:25] <diroots> https://www.google.com/search?q=ffmpeg+adding+audio+
[10:26] <mrAlmond> I was just searching now in google
[11:28] <mrAlmond> diroots : I've tried to add a silent audio track but windows media player sees it as an audio only file
[11:28] <mrAlmond> I've also tried to install K-lite codec pack and now it works!
[11:28] <mrAlmond> Does this mean that the codec I'm using is not supported by windows?
[11:30] <zap0> probably.
[11:37] <mrAlmond> it's avc base profile
[11:37] <mrAlmond> is h264 base profile not supported by WMP?
[11:41] <JEEB> mrAlmond, it is with Win7+
[11:42] <JEEB> are you sure you muxed with AVCc
[11:42] <JEEB> and not Annex B or something crappy otherwise
[11:43] <JEEB> as in, did you follow 14496-15
[11:43] <JEEB> libavformat will not do this automatically for you
[11:47] <mrAlmond> we muxed in avcc
[11:48] <JEEB> ok, then it should work with Win7 and newer
[11:48] <mrAlmond> we filled extradata and converted annexb format to avcc
[11:48] <JEEB> I think Vista has the decoders included as an update package
[11:48] <JEEB> but I have no idea how well they work in WMP
[11:49] <mrAlmond> do you see something strange inthe ffprobe?  http://pastebin.com/DifENUMX
[11:51] <mrAlmond> it's a variable framerate video
[11:51] <mrAlmond> here it says 18.74 fps but I think it's an average
[11:51] <JEEB> you shouldn't be bothered by that too much
[11:52] <mrAlmond> also quicktime doesn't work
[11:52] <mrAlmond> it just shows a black screen
[11:52] <JEEB> lol
[11:52] <mrAlmond> in linux mplayer and vlc work
[11:52] <JEEB> sounds like you have failed
[11:52] <JEEB> yes, naturally crap that uses libav* will work
[11:52] <JEEB> does flash player work?
[11:53] <mrAlmond> gstreamer does not work
[11:53] <JEEB> anyways, I have no idea at what point, but you have successfully created a broken file in some way it seems :P
[11:53] <JEEB> tried demuxing the AVC stream into annex b with ffmpeg or something
[11:53] <JEEB> and then remuxing it with L-SMASH's muxer?
[11:54] <JEEB> http://code.google.com/p/l-smash/
[11:54] <JEEB> also the boxdumper application from L-SMASH will most probably be of use
[11:54] <mrAlmond> we are using android mediacodec classes to encode that video
[11:54] <mrAlmond> and then ffmpeg to mux it
[11:54] <mrAlmond> Android is able to play it
[11:55] <JEEB> yes, and I'm telling you to demux the AVC stream as Annex B again
[11:55] <JEEB> and remuxing with L-SMASH's muxer
[11:55] <JEEB> then see if the results change with anything
[11:55] <mrAlmond> ok
[11:55] <mrAlmond> thank you for the suggestion
[11:56] <JEEB> also as I said, boxdumper is a great tool for checking how the "mp4" file is constructed
[11:58] <mrAlmond> great, I will try it
[12:18] <mrAlmond> JEEB : if we are missing stss atom could it be the problem?
[12:22] <muken> mrAlmond: absence of stss atom means all frame is a random access point
[12:27] <mrAlmond> Paranoialmaniac so is it normal that without stss it doesn't play in windows media player?
[12:27] <mrAlmond> but it plays in vlc
[12:28] <Paranoialmaniac> wut
[12:28] <Paranoialmaniac> does wmp load an appropriate splitter?
[12:29] <mrAlmond> wut? :-)
[12:29] <mrAlmond> I don't know
[12:35] <JEEB> wmp, unless you have poked around should use the MS things by default
[12:36] <JEEB> also how did the demux + remux go?
[13:49] <superware> I'm struggling with this for days now :| I have an h264-ts-udp stream that doesn't play with "udp://0.0.0.0:1234" but if I dump the stream to a .ts file it plays great. Any ideas??
[13:49] <superware> (I'm using ffplay/ffprobe)
[13:54] <arpu> hello @all
[13:54] <arpu> is it possible to  reencode and send to rtmp server of files in a directory without restart ffmpeg on new files?
[16:35] <sine``> is there an alternative to using batch files on windwos to use ffmpeg
[16:36] <sine``> like an updated gui front end
[17:28] <zap0> sine``, WinFF
[17:31] <sine``> but thats old
[17:31] <sine``> is there regular updates
[17:41] <zap0> its a GUI.  what's the problem?   have the icons faded?
[18:13] <sine``> no i mean the command line parameters have changed over time
[18:15] <zap0> you can make your own presets, pass your own cmd line params
[19:22] <Maverick|MSG> are there any image quality comparisions available between the different preset values
[19:22] <Maverick|MSG> like medium vs slow
[19:22] <Maverick|MSG> slow's filesize is obviously smaller, but does that result in a lower/higher quality video?
[19:26] <llogan> Maverick|MSG: http://pastebin.com/JSrXhWYf
[19:33] <Maverick|MSG> oo, thanks again llogan
[19:45] <Maverick|MSG> for the record, it looks like moving from medium to slow will decrease the output filesize by about 1.25%
[19:46] <Maverick|MSG> (at least based on what I'm encoding)
[21:15] <superware> michaelni: hi
[22:05] <mibofra> hi guys :)
[22:05] <mibofra> excuse me for the off topic but I don't know where I can find info about it
[22:06] <mibofra> Does anyone know a irc channel for AAlib?
[22:06] <llogan> mibofra: maybe there was one in 2001.
[22:07] <llogan> you could use libcaca instead
[22:08] <mibofra> thanks
[22:08] <brontosaurusrex> the ascii library?
[22:08] <llogan> mibofra: then you could go to #libcaca
[22:09] <mibofra> brontosaurusrex, yep
[22:09] <mibofra> llogan, ok
[22:09] <mibofra> thanks guys
[22:42] <Maverick|MSG> is there a way to ise itsoffset but only have one input (-i) defined?
[22:42] <Maverick|MSG> *use
[22:43] <Maverick|MSG> rather than: -i input.avi -itsoffset 5 -i input.avi ...
[22:43] <Maverick|MSG> something like: -itsoffset 5 -i input.avi -map 0:0 -map -0:1
[22:48] <Maverick|MSG> the audio in my input is delayed 5 seconds, so I need to move it forward a bit so things are sync'd
[23:38] <mark4o> Maverick|MSG: ffmpeg -i input.avi -af "asetpts=PTS-5/TB" ...
[23:39] <Maverick|MSG> hm, not familiar with those settings
[23:39] <mark4o> asetpts sets audio timestamps to timestamp minus 5 seconds
[23:40] <Maverick|MSG> what does /TB mean?
[23:40] <llogan> Maverick|MSG: http://ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts
[23:40] <Maverick|MSG> ah, thanks llogan, was just looking for thart
[23:40] <mark4o> timebase
[23:40] <Maverick|MSG> cool, let me read up a bit
[23:40] <Maverick|MSG> thanks guys
[23:46] <Maverick|MSG> mark4o llogan thanks a ton.  it worked!
[23:50] <Maverick|MSG> is there an advantage to using that as compared to the itsoffset?
[23:51] <llogan> you can use it in a filtergraph. you can apply it to specific streams more sanely.
[23:51] <sander455> Hi
[23:51] <Maverick|MSG> yeah, minus the syntax it seems a little bit easier to manage
[23:51] <mark4o> or to just audio or just video -- -itsoffset applies to all streams
[23:51] <llogan> the syntax just takes some getting used to
[23:52] <mark4o> because it is more flexible
[23:53] <mark4o> although -itsoffset:a would be nice
[00:00] --- Sat Jun 29 2013


More information about the Ffmpeg-devel-irc mailing list