[FFmpeg-user] syncing rtsp video and audio

2017-10-09 Thread Jesper Taxbøl
I am trying to record a video stream from an IP camera. The camera is from
Alibaba and its boasting h.265 4K recording at 30fps + 8KHz Audio.

The product page is here:
https://www.alibaba.com/product-detail/SIP-E274K-1-2-
5-SONY_60584818808.html?spm=a2700.7724838.2017115.1.621e0c80r293BD

I have successfully configured the camera to stream 4K video at 30fps using
this command.

*ffmpeg -rtsp_transport tcp -i rtsp://192.168.0.200/av0_0
 -c:v copy -t 10 -y out.mp4*

I recieve the 4k h.265 encoded video, but the audio track is badly out of
sync.

A sample can be seen here:
http://s3-eu-west-1.amazonaws.com/recoordio-zoo/2017/down/sync3.mp4

Any idea on how to achieve better audio video sync? Am I loosing the sync
because of the aac audio codec?

For those interrested in why I care about a 8khz ausio signal: I only aim
to use it for syncing two cameras and a stereo audio input. I do the sync
by hooking the audio output of a raspberry PI to the two cameras line-in
and one of the stereo channels recording audio. The output plays a sine one
second after all recordings has started.  In that way I end up with two
video files and one stereo file. The camera files has video and my
controlsignal and the stereo has the actual sound in one channel and the
controlsignal in the other channel. Thus allowing me to sync the threew
channels in post. The rtsp sync problem is giving me trouble

Kind regards

Jesper



The full ffmpeg and ffprobe output is pasted below:
---
*ffmpeg -rtsp_transport tcp -i rtsp://192.168.0.200/av0_0
 -c:v copy -t 10 -y out.mp4*

ffmpeg version N-87041-gf61e2dcfc3 Copyright (c) 2000-2017 the FFmpeg
developers
  built with gcc 7.1.1 (GCC) 20170630
  configuration: --prefix=/usr --disable-debug --disable-static
--disable-stripping --enable-avisynth --enable-avresample
--enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
--enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype
--enable-libfribidi --enable-libgsm --enable-libiec61883
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh
--enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxvid --enable-shared --enable-version3
  libavutil  55. 74.100 / 55. 74.100
  libavcodec 57.103.100 / 57.103.100
  libavformat57. 77.100 / 57. 77.100
  libavdevice57.  7.101 / 57.  7.101
  libavfilter 6.100.100 /  6.100.100
  libavresample   3.  6.  0 /  3.  6.  0
  libswscale  4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc54.  6.100 / 54.  6.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://192.168.0.200/av0_0':
  Metadata:
title   : av0_0
  Duration: N/A, start: 0.00, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive),
3840x2160, 25 tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 0x55fa5aef6ec0] Too many bits 8832.00 > 6144 per frame
requested, clamping to max
Output #0, mp4, to 'out.mp4':
  Metadata:
title   : av0_0
encoder : Lavf57.77.100
Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc,
bt709, progressive), 3840x2160, q=2-31, 25 tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp,
48 kb/s
Metadata:
  encoder : Lavc57.103.100 aac
[mp4 @ 0x55fa5aef5b00] Timestamps are unset in a packet for stream 0. This
is deprecated and will stop working in the future. Fix your code to set the
timestamps properly
frame=  250 fps= 28 q=-1.0 Lsize=6650kB time=00:00:10.11
bitrate=5387.7kbits/s speed=1.12x
video:6598kB audio:48kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.057095%
[aac @ 0x55fa5aef6ec0] Qavg: 61411.211


--
*ffprobe -rtsp_transport tcp rtsp://192.168.0.200/av0_0
*
ffprobe version N-87041-gf61e2dcfc3 Copyright (c) 2007-2017 the FFmpeg
developers
  built with gcc 7.1.1 (GCC) 20170630
  configuration: --prefix=/usr --disable-debug --disable-static
--disable-stripping --enable-avisynth --enable-avresample
--enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
--enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype
--enable-libfribidi --enable-libgsm --enable-libiec61883
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-libsoxr 

Re: [FFmpeg-user] Extra streams in gopro videos - how do I examine?

2016-06-07 Thread Jesper Taxbøl
I tried making a couple of clips using 4K and 4KS and dumped their stream
contents using the suggested method.

ffmpeg -i http://kanako.dk/clients/privat/4KS_24.MP4 -codec copy -map 0:2
-f rawvideo 4KS24_TCD
ffmpeg -i http://kanako.dk/clients/privat/4KS_24.MP4 -codec copy -map 0:3
-f rawvideo 4KS24_SOS
ffmpeg -i http://kanako.dk/clients/privat/4K_30.MP4 -codec copy -map 0:2 -f
rawvideo 4K30_TCD
ffmpeg -i http://kanako.dk/clients/privat/4K_30.MP4 -codec copy -map 0:3 -f
rawvideo 4K30_SOS

ffmpeg -i http://kanako.dk/clients/privat/4KS_24_2.MP4 -codec copy -map 0:2
-f rawvideo 4KS24_2_TCD
ffmpeg -i http://kanako.dk/clients/privat/4KS_24_2.MP4 -codec copy -map 0:3
-f rawvideo 4KS24_2_SOS
ffmpeg -i http://kanako.dk/clients/privat/4K_30_2.MP4 -codec copy -map 0:2
-f rawvideo 4K30_2_TCD
ffmpeg -i http://kanako.dk/clients/privat/4K_30_2.MP4 -codec copy -map 0:3
-f rawvideo 4K30_2_SOS

I cant make sense of the output though.

Links are available for the samples. if anyone will give it a go.

kind regards

Jesper
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Syncing stereo videos - what method?

2015-08-29 Thread Jesper Taxbøl
Thanx for your input. I did not know the -itsoffset flag.

I think my problem was that I was trying to save the recoding via the copy
class. What ended up working for me was this.

/usr/local/bin/ffmpeg -y -loglevel panic  -ss 1.161397 -i 3.mp4 -t 15 _3.mp4

I could not make the itsoffset flag do the trick.

Kind regards

Jesper


2015-08-29 15:49 GMT+02:00 Carl Eugen Hoyos ceho...@ag.or.at:

 Jesper Taxbøl jesper at taxboel.dk writes:

  I am trying to sync two videos recorded
  simultaniously from a stereo setup.

 This should work with -itsoffset and specifying the
 input file twice, something like (untested):
 $ ffmpeg -i A.mp4 -itsoffset 0.75 -i A.mp4
 -map 0:0 -map 1:1 -codec copy out.mp4

 Carl Eugen
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] HAP encoding?

2015-06-30 Thread Jesper Taxbøl
2015-06-29 23:50 GMT+02:00 Carl Eugen Hoyos ceho...@ag.or.at:

 On Monday 29 June 2015 04:40:15 pm Jesper Taxbøl wrote:
  It seems to be in git in a very recent commit. (7days ago)

 Nothing else is supported on this mailing list.

  I have downloaded the source and can see hap when i run
 
  ./configure --list-encoders

  I also tried building it but I havent figured out how to
  specify that it should use the hap codec to encode.
 
  How would I trigger its use?

 You first have to install a library called snappy (I
 have never heard of it, sorry), then run configure with
 --enable-libsnappy.
 You should be able to use -vcodec hap then.

 Please avoid top-posting here, Carl Eugen

___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user


That did the trick!

I can now encode with

ffmpeg -i test.mp4 -vcodec hap -format hap_q out.mov

It seems to require a mov extension, but im happy :)

Thanx
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] HAP encoding?

2015-06-30 Thread Jesper Taxbøl
2015-06-30 14:51 GMT+02:00 Carl Eugen Hoyos ceho...@ag.or.at:

 On Tuesday 30 June 2015 02:21:41 pm Jesper Taxbøl wrote:
  ffmpeg -i test.mp4 -vcodec hap -format hap_q out.mov
 
  It seems to require a mov extension,

 The only hap samples I found were mov files, do you
 have other samples?

  but im happy :)

 Thank you for testing!
 Did you successfully feed FFmpeg's output files to
 another tool?

 Carl Eugen
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user



No, I just had a h264 movie I tested with.

I guess they require mov extension.

I fed the result into Unity3D, via the AVPro Quicktime plugin, which should
be a QT player of some sort.

It looked allright.

I will do deeper testing in the near future.

Jesper
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] HAP encoding?

2015-06-29 Thread Jesper Taxbøl
Hi Guys,

I need to HAP Q encode my videos, to be able to use video in an realtime
video application.

From what I can read HAP is not supported in FFmpeg yet and the only client
I have found that can do it is relying on GUI which breaks my workflow.

http://vdmx.vidvox.net/tutorials/using-the-hap-video-codec

I would therefore ask if anyone is aware if there is an ffmpeg initiative
in that direction?

I dont feel confident to be able to do that myself, but I would like to
support it if I can.

Kind regards

Jesper
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] HAP encoding?

2015-06-29 Thread Jesper Taxbøl
It seems to be in git in a very recent commit. (7days ago)


I have downloaded the source and can see hap when i run

./configure --list-encoders
I also tried building it but I havent figured out how to specify that it
should use the hap codec to encode.

How would I trigger its use?

Kind regards

Jesper

2015-06-29 15:11 GMT+02:00 Carl Eugen Hoyos ceho...@ag.or.at:

 On Monday 29 June 2015 12:59:23 pm Jesper Taxbøl wrote:

  From what I can read HAP is not supported in FFmpeg

 From what I can read HAP encoding is supported:
 http://ffmpeg.org/general.html#Video-Codecs
 (Search for HAP)

 Please test and report back!

 Carl Eugen
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Straightening out image from GoPro - what is a good approach?

2015-06-17 Thread Jesper Taxbøl
I ended up using the AVLinux distro, which has Kdenlive with Defish0r
plugin. I could manually reach a somewhat acceptable result there.

I translated it into the ffmpeg filter like this:

frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1

And in my ffmpeg script it looks like this

/usr/local/bin/ffmpeg -y -ss 0.113403353664 -r 80 -i ./kamp_1/1.MP4  -t 3
-ss 0.0 -r 80 -i ./kamp_1/2.MP4  -t 3 -ss 0.0532033667281 -r 80 -i
./kamp_1/3.MP4  -t 3 -ss 0.0776444068048 -r 80 -i ./kamp_1/4.MP4  -t 3
-filter_complex
[0:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V1];[1:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V2];[2:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V3];[3:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V4];[V1]pad=iw*2:ih*2:0:0[BG1];[BG1][V2]overlay=960:0[BG2];[BG2][V3]overlay=0:540[BG3];[BG3][V4]overlay=960:540[OUT]
-c:v libx264 -pix_fmt yuv420p -preset ultrafast -tune fastdecode -tune
zerolatency -map [OUT] -r 80 ./kamp_1/out.mp4

Jesper



2015-06-15 19:33 GMT+02:00 Jesper Taxbøl jes...@taxboel.dk:

 I am working on straightening out a video from a GoPro4 shot with the
 stock lens at 1080S setting.

 Example images uploaded here:
 http://imgur.com/KYcZGTf,ILHUWBj,lserDt3,ruWKGhs,NVxtBv0,q3c6xpt,nieBLBX,QuwoMQp,1Uvzcbq,3DqczbP,jaxAQNF


 I have made a python program where I try to tweak the lenscorrection
 filter parameters, but with little luck so far.

 I have also tried finding the parameters using opencv via openframeworks,
 but that does not work well either. I guess the method is more suited for
 cameras with less distortion?

 I am currently looking at the frei0r filter extension defish0r. I have
 made a small python script where i adjust parameters, but with little luck
 so far as the tweak domain seams enormous.

 What is a practical approach to finding a good filter configuration? Is
 there a killer tool that use the frei0r plugins so I can adjust the
 parameters more easily.

 Kind regards

 Jesper




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Straightening out image from GoPro - what is a good approach?

2015-06-15 Thread Jesper Taxbøl
I am working on straightening out a video from a GoPro4 shot with the stock
lens at 1080S setting.

Example images uploaded here:
http://imgur.com/KYcZGTf,ILHUWBj,lserDt3,ruWKGhs,NVxtBv0,q3c6xpt,nieBLBX,QuwoMQp,1Uvzcbq,3DqczbP,jaxAQNF


I have made a python program where I try to tweak the lenscorrection filter
parameters, but with little luck so far.

I have also tried finding the parameters using opencv via openframeworks,
but that does not work well either. I guess the method is more suited for
cameras with less distortion?

I am currently looking at the frei0r filter extension defish0r. I have made
a small python script where i adjust parameters, but with little luck so
far as the tweak domain seams enormous.

What is a practical approach to finding a good filter configuration? Is
there a killer tool that use the frei0r plugins so I can adjust the
parameters more easily.

Kind regards

Jesper
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Lenscorrection

2015-06-10 Thread Jesper Taxbøl
Hi Guys,

I am looking into calibrating a 1080S video from a GoPro hero4. I have
looked into the lens correction filter but I have had a hard time finding
the correct parameters.

I have been fiddling around with opencv doing checkerboard videos to
extract the parameters but with little luck yet.

My question is if the lens correction filter can work on fisheye cameras or
it is limited in a way so I need a different approach?

Kind regards

Jesper
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Lenscorrection

2015-06-10 Thread Jesper Taxbøl
Cool,

Do you use a checkerboard + opencv approach or something else?

And how fishy (degrees field of view) was your fisheye lens?

Kind regards

Jesper

2015-06-09 22:15 GMT+02:00 Anshul anshul.ffm...@gmail.com:



 On 06/10/2015 01:55 PM, Jesper Taxbøl wrote:

 Hi Guys,

 I am looking into calibrating a 1080S video from a GoPro hero4. I have
 looked into the lens correction filter but I have had a hard time finding
 the correct parameters.

 I have been fiddling around with opencv doing checkerboard videos to
 extract the parameters but with little luck yet.

 My question is if the lens correction filter can work on fisheye cameras
 or
 it is limited in a way so I need a different approach?

 Kind regards

 Jesper
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user

 it works well, if you have correct parameter. I have used it to remove
 barrel and fisheye distortion.

 I use my own custom tool to find correct parameter like k1 and k2.
 -Anshul
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Using FFmpeg for horizontal video stitching for 3D video

2015-06-10 Thread Jesper Taxbøl
This works for me

/usr/local/bin/ffmpeg -i l.mov  -i r.mov -filter_complex
[0:v:0]pad=iw*2:ih:0:0[L];[L][1:v:0]overlay=w:0  out.mp4

2015-06-10 9:58 GMT+02:00 Moritz Barsnick barsn...@gmx.net:

 Hi Kevin,

 On Mon, Jun 08, 2015 at 17:37:46 -0400, Kevin Bergemann wrote:

  slightly edited for use on a Mac instead of Linux:

 Tell me, what would be different in ffmpeg's command line on Mac[OSX]
 vs. Linux? Just wondering.

  ./ffmpeg -i left.mp4 -strict -2 -vf [in] pad=2*iw:ih [left];
  movie=right.mp4 [right];[left][right] overlay=main_w/2:0 [out]”
 output.mp4;
 [...]
  [NULL @ 0x7ffe04854a00] Unable to find a suitable output format for
  'pad=2*iw:ih'
  pad=2*iw:ih: Invalid argument
  -bash: [right]: command not found
  -bash: [left][right]: command not found

 I'm very certain that - unlike you quoted above - you forget the
 quotation marks '' around the filter specification.

 HTH,
 Moritz
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Writing my own filter - fisheye to Mercator projection.

2015-06-09 Thread Jesper Taxbøl
Cool thanx for the links.

:)

2015-06-09 11:36 GMT+02:00 Moritz Barsnick barsn...@gmx.net:

 Hei Jesper,

 On Tue, Jun 09, 2015 at 10:06:17 +0200, Jesper Taxbøl wrote:
  I would like to be able to map a circular fisheye image into a Mercator
  projection.
 
  How would I go about writing my own filter that do this?

 I too would like to know more about writing filters. :-) I haven't made
 much on an effort yet though.

 This is ffmpeg's official introduction, right in your source tree:
 https://github.com/FFmpeg/FFmpeg/blob/master/doc/writing_filters.txt

 Here's also a short intro with some basics:
 http://wiki.multimedia.cx/?title=FFmpeg_filter_HOWTO

 I don't know if there's anything better in terms of introductions.

 The API is documented here:
 https://www.ffmpeg.org/doxygen/2.0/group__lavfi.html

 Apart from that, I would go looking through the available filters in
 the libavfilter/ subdirectory, and choose a basic one which does
 conversions only in a single frame as an example. Unfortunately, ffmpeg
 source code is not all too verbose with comments (as to what certain
 lines of code are supposed to do).

 In your case, something like rotate (vf_rotate.c) or perspective
 (vf_perspective.c) comes to mind.

  Ideally I would like a filter I could pass a shader. But I guess I'm
  dreaming here.

 I have no idea what this is about. ;-)

 Oh, and when you're done, and you think it may be useful for others,
 feel free to submit it to ffmpeg-devel for inclusion. They will rip it
 apart from you and tell you where you went wrong.

 Hilsen,
 Moritz
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Writing my own filter - fisheye to Mercator projection.

2015-06-09 Thread Jesper Taxbøl
I would like to be able to map a circular fisheye image into a Mercator
projection.

How would I go about writing my own filter that do this?

Ideally I would like a filter I could pass a shader. But I guess I'm
dreaming here.

Jesper
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Creating an advanced filter effect that repeats the outer pixels

2015-06-08 Thread Jesper Taxbøl
Hmm. I have tried this pipeline which work.

/usr/local/bin/ffmpeg -y -i test.MP4  -t 10 -filter_complex
[0:v:0]crop=1440:2:0:720,scale=1440:1440[OUT] -c:v libx264 -pix_fmt
yuv420p -preset ultrafast -tune fastdecode -tune zerolatency -map [OUT]
out.mp4


Then I try this one, which is scaling from 1440x1 to 1440x1440, it fails.

/usr/local/bin/ffmpeg -y -i test.MP4  -t 10 -filter_complex
[0:v:0]crop=1440:1:0:720,scale=1440:1440[OUT] -c:v libx264 -pix_fmt
yuv420p -preset ultrafast -tune fastdecode -tune zerolatency -map [OUT]
out.mp4

ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers

  built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM
3.6.0svn)

  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.2 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=
--enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid
--enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libfaac
--enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus
--enable-libquvi --enable-libx265 --enable-nonfree --enable-vda

  libavutil  54. 20.100 / 54. 20.100

  libavcodec 56. 26.100 / 56. 26.100

  libavformat56. 25.101 / 56. 25.101

  libavdevice56.  4.100 / 56.  4.100

  libavfilter 5. 11.102 /  5. 11.102

  libavresample   2.  1.  0 /  2.  1.  0

  libswscale  3.  1.101 /  3.  1.101

  libswresample   1.  1.100 /  1.  1.100

  libpostproc53.  3.100 / 53.  3.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe6a300da00] UDTA parsing failed retrying raw

Last message repeated 1 times

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.MP4':

  Metadata:

major_brand : mp42

minor_version   : 0

compatible_brands: isomavc1mp42

creation_time   : 2015-06-03 16:28:40

original_format : KODAK

comment : KODAK PIXPRO SP360

  Duration: 00:00:28.23, start: 0.00, bitrate: 17023 kb/s

Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1440x1440, 15707 kb/s, 30 fps, 30 tbr, 30k tbn, 60k tbc (default)

Metadata:

  rotate  : 270

  creation_time   : 2015-06-03 16:28:40

  handler_name: DataHandler

  encoder : h264

Side data:

  displaymatrix: rotation of 90.00 degrees

Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz,
stereo, fltp, 128 kb/s (default)

Metadata:

  creation_time   : 2015-06-03 16:28:40

  handler_name: DataHandler

[Parsed_crop_0 @ 0x7fe6a2f00820] Invalid too big or non positive size for
width '1440' or height '0'

[Parsed_crop_0 @ 0x7fe6a2f00820] Failed to configure input pad on
Parsed_crop_0

I dont think the output encoder is to blame as the output is 1440x1440 in
both cases. Could be an off by one error somewhere?

I have my workaround now, Ill just do it in two passes to get my single
pixel line stretched.

Kind regards

Jesper


2015-06-08 11:22 GMT+02:00 Moritz Barsnick barsn...@gmx.net:

 On Mon, Jun 08, 2015 at 09:59:08 +0200, Jesper Taxbøl wrote:
  The 1440x1 is only used in the pipeline. The end result will be a
  resulution around 1440x11440, so that should be fine for ffmpeg.

 It should work in a pipeline. What you are trying to is to encode it
 with libx264, that's the part that doesn't work. You should be able to
 note that, because you see the muxer complaining, and not the filter.
 :-)

 This works for me:
 $ ffmpeg -y -f lavfi -i testsrc=size=1440x1440  -t 10 -filter_complex
 [0:v:0]crop=1440:1:0:720[OUT] -map [OUT] -f null -
 and seems to produce a 1440x1 video stream (so I conclude that the crop
 filter doesn't seem to have a restriction).

 Expand your filter chain and let us know.

 Moritz
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Creating an advanced filter effect that repeats the outer pixels

2015-06-08 Thread Jesper Taxbøl
And the workaround I ended up using:

/usr/local/bin/ffmpeg -y -i test.MP4  -t 10 -filter_complex
[0:v:0]crop=1440:2:0:720,scale=1440:4,crop=1440:2,scale=1440:1440[OUT]
-c:v libx264 -pix_fmt yuv420p -preset ultrafast -tune fastdecode -tune
zerolatency -map [OUT] out.mp4

2015-06-08 22:48 GMT+02:00 Jesper Taxbøl jes...@taxboel.dk:

 Hmm. I have tried this pipeline which work.

 /usr/local/bin/ffmpeg -y -i test.MP4  -t 10 -filter_complex
 [0:v:0]crop=1440:2:0:720,scale=1440:1440[OUT] -c:v libx264 -pix_fmt
 yuv420p -preset ultrafast -tune fastdecode -tune zerolatency -map [OUT]
 out.mp4


 Then I try this one, which is scaling from 1440x1 to 1440x1440, it fails.

 /usr/local/bin/ffmpeg -y -i test.MP4  -t 10 -filter_complex
 [0:v:0]crop=1440:1:0:720,scale=1440:1440[OUT] -c:v libx264 -pix_fmt
 yuv420p -preset ultrafast -tune fastdecode -tune zerolatency -map [OUT]
 out.mp4

 ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers

   built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM
 3.6.0svn)

   configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.2 --enable-shared
 --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
 --enable-avresample --cc=clang --host-cflags= --host-ldflags=
 --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid
 --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libfaac
 --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus
 --enable-libquvi --enable-libx265 --enable-nonfree --enable-vda

   libavutil  54. 20.100 / 54. 20.100

   libavcodec 56. 26.100 / 56. 26.100

   libavformat56. 25.101 / 56. 25.101

   libavdevice56.  4.100 / 56.  4.100

   libavfilter 5. 11.102 /  5. 11.102

   libavresample   2.  1.  0 /  2.  1.  0

   libswscale  3.  1.101 /  3.  1.101

   libswresample   1.  1.100 /  1.  1.100

   libpostproc53.  3.100 / 53.  3.100

 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe6a300da00] UDTA parsing failed retrying
 raw

 Last message repeated 1 times

 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.MP4':

   Metadata:

 major_brand : mp42

 minor_version   : 0

 compatible_brands: isomavc1mp42

 creation_time   : 2015-06-03 16:28:40

 original_format : KODAK

 comment : KODAK PIXPRO SP360

   Duration: 00:00:28.23, start: 0.00, bitrate: 17023 kb/s

 Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1440x1440, 15707 kb/s, 30 fps, 30 tbr, 30k tbn, 60k tbc (default)

 Metadata:

   rotate  : 270

   creation_time   : 2015-06-03 16:28:40

   handler_name: DataHandler

   encoder : h264

 Side data:

   displaymatrix: rotation of 90.00 degrees

 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz,
 stereo, fltp, 128 kb/s (default)

 Metadata:

   creation_time   : 2015-06-03 16:28:40

   handler_name: DataHandler

 [Parsed_crop_0 @ 0x7fe6a2f00820] Invalid too big or non positive size for
 width '1440' or height '0'

 [Parsed_crop_0 @ 0x7fe6a2f00820] Failed to configure input pad on
 Parsed_crop_0

 I dont think the output encoder is to blame as the output is 1440x1440 in
 both cases. Could be an off by one error somewhere?

 I have my workaround now, Ill just do it in two passes to get my single
 pixel line stretched.

 Kind regards

 Jesper


 2015-06-08 11:22 GMT+02:00 Moritz Barsnick barsn...@gmx.net:

 On Mon, Jun 08, 2015 at 09:59:08 +0200, Jesper Taxbøl wrote:
  The 1440x1 is only used in the pipeline. The end result will be a
  resulution around 1440x11440, so that should be fine for ffmpeg.

 It should work in a pipeline. What you are trying to is to encode it
 with libx264, that's the part that doesn't work. You should be able to
 note that, because you see the muxer complaining, and not the filter.
 :-)

 This works for me:
 $ ffmpeg -y -f lavfi -i testsrc=size=1440x1440  -t 10 -filter_complex
 [0:v:0]crop=1440:1:0:720[OUT] -map [OUT] -f null -
 and seems to produce a 1440x1 video stream (so I conclude that the crop
 filter doesn't seem to have a restriction).

 Expand your filter chain and let us know.

 Moritz
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




 --
 Jesper Taxbøl
 +45 61627501




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Creating an advanced filter effect that repeats the outer pixels

2015-06-08 Thread Jesper Taxbøl
ok, it makes kind of sense then.

Is there a way to specify a more generic format inside the filter chain,
and only apply h264 in the end?


2015-06-09 0:01 GMT+02:00 Lou l...@lrcd.com:

 On Mon, 8 Jun 2015 06:57:46 + (UTC)
 Carl Eugen Hoyos ceho...@ag.or.at wrote:

  x264 does not allow encoding a height of 1 (it
  has to be even), so even if we would support
  cropping a height of 1 (it is currently forbidden),
  what would be your usecase?

 It should be clarified that this depends on the pixel format. 4:2:0,
 width and height must be divisible by 2; 4:2:2 just width.

 For example with yuv444p output seems to work for me:
 ffmpeg -f lavfi -i testsrc=d=1 -vf crop=iw:1 crop.mkv

 The output seems to decode fine, but you can't play it back with ffplay
 unless you do something like: ffplay -vf scale=iw:-2 crop.mkv
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Creating an advanced filter effect that repeats the outer pixels

2015-06-08 Thread Jesper Taxbøl
I have a full circle image that is cropped in top and bottom. I want to
make it square containing the full circle, but stretch the outmost pixels
in the top and bottom to make the transition in the cropped areas less
noticeable.

Example here: wnjPOqE.jpg http://i.imgur.com/wnjPOqE.jpg

The 1440x1 is only used in the pipeline. The end result will be a
resulution around 1440x11440, so that should be fine for ffmpeg.


2015-06-08 8:57 GMT+02:00 Carl Eugen Hoyos ceho...@ag.or.at:

 Jesper Taxbøl jesper at taxboel.dk writes:

  /usr/local/bin/ffmpeg -y -i test.MP4  -t 10
  -filter_complex [0:v:0]crop=1440:1:0:720[OUT]
  -c:v libx264 -pix_fmt yuv420p -preset ultrafast
  -tune fastdecode -tune zerolatency -map [OUT]
  out.mp4

 x264 does not allow encoding a height of 1 (it
 has to be even), so even if we would support
 cropping a height of 1 (it is currently forbidden),
 what would be your usecase?

 Carl Eugen
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user




-- 
Jesper Taxbøl
+45 61627501
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Creating an advanced filter effect that repeats the outer pixels

2015-06-07 Thread Jesper Taxbøl
I have run into a problem where I need to expand the edges of a video and
fill the newly added pixels with the nearest pixel value. Just when you use
clamp mode on a texture in graphics programming.

Look at the examnple here http://i.stack.imgur.com/padKk.png

I have tried copying the edge pixel, but the scale filter fails when I try
to scale to the needed size.

Is there an other way to achieve this clamp effect in a advanced filter
chain?

Kind regards

Jesper
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user