Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Francois Visagie
 -Original Message-
 From: ffmpeg-user-boun...@ffmpeg.org [mailto:ffmpeg-user-
 boun...@ffmpeg.org] On Behalf Of fernando.takeshi
 Sent: 17 September 2014 01:39
 To: ffmpeg-user@ffmpeg.org
 Subject: [FFmpeg-user] Mux encoded video data directly into mp4 files
 
 Hello,
 
 I've been searching for ways to create .mp4 files directly from saved raw
 video data. The sources of said data can record frames in the h264, mpeg
and
 mjpeg formats; I end up with files that are basically raw frames of these
 formats, one after the other.
 
 Now, I've tested the command line approach (that I cannot use,
 unfortunately) and it seems to work for h264 and mpeg files, but not for
 mjpeg. I need to do this programmatically; so I've followed ffmpeg's
muxing
 example and many others I found online (stackoverflow, etc) and can't seem
 to find any consistency in how to (or what would be the correct way to)
 accomplish this.
 
 Right now, I do not have any sample code working - the muxing example
 generates a divide by zero error on av_write_frame (I tried messing with
 DTS/PTS but nothing seems to work). Other examples all yielded different
 results, but none worked.
 
 So, what I ask is basically: given a file consisting of raw frames (h264,
mpeg or
 mjpeg), how do I go about creating a playable video mp4 file? What would
be
 the correct way? Specifically speaking, which functions should I be
calling and
 in what order as to make the code work for those three formats?

I hope you get the help you need, but failing that, consider making a
(custom) debug build of ffmpeg to trace the sequence in the successful
command line multiplexing you mention.

 
 Some sample data can be found at
 https://drive.google.com/file/d/0B8XSlN4yAH72T1R0Ti1zaGViNmM/edit?usp
 =sharing
 
 Thanks in advance!
 
 
 
 --
 View this message in context: http://ffmpeg-
 users.933282.n4.nabble.com/Mux-encoded-video-data-directly-into-mp4-
 files-tp4667372.html
 Sent from the FFmpeg-users mailing list archive at Nabble.com.
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Carl Eugen Hoyos
fernando.takeshi fernando.takeshi at seventh.com.br writes:

 I've tested the command line approach and it seems 
 to work for h264 and mpeg files, but not for mjpeg.

Could you elaborate?
How can I reproduce this?

 Right now, I do not have any sample code working - 
 the muxing example generates a divide by zero 
 error on av_write_frame

Seems like a perfect start for a question on the 
libav-user mailing list: 
http://ffmpeg.org/mailman/listinfo/libav-user

Carl Eugen

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


Re: [FFmpeg-user] How to delete digital silence?

2014-09-17 Thread Paul B Mahol
On 9/16/14, Bart Gopnik bart.gop...@gmail.com wrote:
 I've created test file in sound editor (https://goo.gl/IJY9t6): 1
 second (44 100 samples) of silence + 1 second (44 100 samples) of
 simple sine 1kHz waveform + 1 second (44 100 samples) of silence =
 total 3 seconds (132 300 samples), and save it as input.wav

 After it, I use FFMPEG to remove silence using the following command line:

 ffmpeg -i input.wav -af silenceremove=1:0.1:0:1:0.1:0 output.wav

 The resulting file, output.wav, contains total 44 981 samples: 44 099
 samples of simple sine 1kHz waveform (the first sample of simple sine
 1kHz waveform is truncated) + 882 samples of silence. Instead of
 expected total 1 second (44 100 samples) of simple sine 1kHz waveform.

 WAIDW?

To trim silence at end you could use sox and its silence and reverse effect.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] AVStream.codec.time_base deprecated when using -f ssegment

2014-09-17 Thread Carl Eugen Hoyos
Claudiu Rad jazzman at misalpina.net writes:

 i am trying to generate a HLS stream from a 
 standard MP4 file. the muxer generates a pair 
 of warnings for each output .ts file.

This is ticket #3741 iirc.

 why is this?

You haven't sent a patch afaict.

 shouldn't this be fixed?

All bugs should be fixed but imo the currently 
open regressions (wrt to the output files) are 
much more important than spam on the console 
(but see above).

Please remember that time is the only limiting 
factor in FFmpeg development and please 
continue to report all issues!

Carl Eugen

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


Re: [FFmpeg-user] AVStream.codec.time_base deprecated when using -f ssegment

2014-09-17 Thread Claudiu Rad

On 9/17/2014 10:41 AM, Carl Eugen Hoyos wrote:


i am trying to generate a HLS stream from a
standard MP4 file. the muxer generates a pair
of warnings for each output .ts file.


This is ticket #3741 iirc.


now true, but mainly the ticket wasn't about this. i didn't check it lately.

 shouldn't this be fixed?


All bugs should be fixed but imo the currently
open regressions (wrt to the output files) are
much more important than spam on the console
(but see above).


my main question here is if this can be safely ignored. i only quickly 
checked the output in a few cases and it seemed fine but how sure can i be?


this is important because i am preparing to convert a massive amount of 
data (~5TB and ~10.000hours) to HLS and i can't just check everything if 
it is ok, i will only scan the ffmpeg logs afterwards.
also the originals will be deleted in short time so you can imagine the 
harm that can be done if something is wrong and it gets discovered too late.


so, can someone confirm that this warning can really be safely ignored?


Please remember that time is the only limiting
factor in FFmpeg development and please
continue to report all issues!


sure, will do.

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


[FFmpeg-user] -strict unofficial error

2014-09-17 Thread ypatios
hello

when using “-strict unofficial” with the latest ffmpeg versions i get the 
following error:

###
[NULL @ 0x3857a60] [Eval @ 0x7fffb730b4b0] Undefined constant or missing '(' in 
'unofficial'
[NULL @ 0x3857a60] Unable to parse option value unofficial
[NULL @ 0x3857a60] Error setting option strict to value unofficial.
###


the same error doesn’t occur with “-strict experimental” or “-strict normal”.

I know you can replace these strings with integers but i couldn’t find an exact 
description in the documentation.
I only know that “experimental” can be replaced with “-2”.

Any help will be appreciated!
thanks
y
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] (mpeg2) how to set audio delay relative to video as 0 ?

2014-09-17 Thread linxs
Hi everybody,
I transcode other video to mpg2 video as following command:
ffmpeg -i other video -c:v mpeg2video -b:v 8000k -c:a mp2 -y 0.mpg

/
/
d:\ffmpeg -i orig.mpg -c:v mpeg2video -c:a mp2 -y 0.mpg
ffmpeg version N-63439-g96470ca Copyright (c) 2000-2014 the FFmpeg
developers
  built on May 25 2014 22:01:51 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil  52. 86.100 / 52. 86.100
  libavcodec 55. 65.100 / 55. 65.100
  libavformat55. 41.100 / 55. 41.100
  libavdevice55. 13.101 / 55. 13.101
  libavfilter 4.  5.100 /  4.  5.100
  libswscale  2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc52.  3.100 / 52.  3.100
Input #0, mpeg, from 'orig.mpg':
  Duration: 00:00:15.00, start: 0.269611, bitrate: 8661 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR
16:1
5 DAR 4:3], max. 8000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s
[mpeg @ 04677680] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to '0.mpg':
  Metadata:
encoder : Lavf55.41.100
Stream #0:0: Video: mpeg2video, yuv420p, 720x576 [SAR 16:15 DAR 4:3],
q=2-31
, 200 kb/s, 25 fps, 90k tbn, 25 tbc
Metadata:
  encoder : Lavc55.65.100 mpeg2video
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Metadata:
  encoder : Lavc55.65.100 mp2
Stream mapping:
  Stream #0:0 - #0:0 (mpeg2video - mpeg2video)
  Stream #0:1 - #0:1 (mp2 - mp2)
Press [q] to stop, [?] for help
frame=  137 fps=0.0 q=31.0 size= 588kB time=00:00:05.40 bitrate=
892.0kbits/
frame=  282 fps=282 q=31.0 size=1286kB time=00:00:11.22 bitrate=
938.8kbits/
frame=  375 fps=290 q=31.0 Lsize=1744kB time=00:00:15.01 bitrate=
951.6kbits
/s
video:1023kB audio:704kB subtitle:0kB other streams:0kB global headers:0kB
muxin
g overhead: 0.974431%

/
/

I use MediaInfo.exe to view the ouput mpg, and get the result:

/
/
General
Complete name:
D:\1.project\1.HDPlayer\audiolevel\FM_MIRROR\loop\0.mpg
Format   : MPEG-PS
File size: 1.70 MiB
Duration : 15s 24ms
Overall bit rate mode: Variable
Overall bit rate : 951 Kbps

Video
ID   : 224 (0xE0)
Format   : MPEG Video
Format version   : Version 2
Format profile   : Main@Main
Format settings, BVOP: No
Format settings, Matrix  : Default
Format settings, GOP : Variable
Duration : 14s 960ms
Bit rate mode: Variable
Bit rate : 548 Kbps
Width: 720 pixels
Height   : 576 pixels
Display aspect ratio : 4:3
Frame rate   : 25.000 fps
Standard : PAL
Color space  : YUV
Chroma subsampling   : 4:2:0
Bit depth: 8 bits
Scan type: Progressive
Compression mode : Lossy
Bits/(Pixel*Frame)   : 0.053
Time code of first frame : 00:00:00:00
Time code source   

Re: [FFmpeg-user] (mpeg2) how to set audio delay relative to video as 0 ?

2014-09-17 Thread Stefano Sabatini
On date Wednesday 2014-09-17 19:44:02 +0800, linxs wrote:
 Hi everybody,
 I transcode other video to mpg2 video as following command:
 ffmpeg -i other video -c:v mpeg2video -b:v 8000k -c:a mp2 -y 0.mpg
 
 /
 /
 d:\ffmpeg -i orig.mpg -c:v mpeg2video -c:a mp2 -y 0.mpg
 ffmpeg version N-63439-g96470ca Copyright (c) 2000-2014 the FFmpeg
 developers
[...]
 I use MediaInfo.exe to view the ouput mpg, and get the result:
 
 /
 /
 General
 Complete name:
 D:\1.project\1.HDPlayer\audiolevel\FM_MIRROR\loop\0.mpg
 Format   : MPEG-PS
 File size: 1.70 MiB
 Duration : 15s 24ms
 Overall bit rate mode: Variable
 Overall bit rate : 951 Kbps
 
 Video
 ID   : 224 (0xE0)
 Format   : MPEG Video
 Format version   : Version 2
 Format profile   : Main@Main
 Format settings, BVOP: No
 Format settings, Matrix  : Default
 Format settings, GOP : Variable
 Duration : 14s 960ms
 Bit rate mode: Variable
 Bit rate : 548 Kbps
 Width: 720 pixels
 Height   : 576 pixels
 Display aspect ratio : 4:3
 Frame rate   : 25.000 fps
 Standard : PAL
 Color space  : YUV
 Chroma subsampling   : 4:2:0
 Bit depth: 8 bits
 Scan type: Progressive
 Compression mode : Lossy
 Bits/(Pixel*Frame)   : 0.053
 Time code of first frame : 00:00:00:00
 Time code source : Group of pictures header
 Stream size  : 1 001 KiB (57%)
 
 Audio
 ID   : 192 (0xC0)
 Format   : MPEG Audio
 Format version   : Version 1
 Format profile   : Layer 2
 Duration : 15s 24ms
 Bit rate mode: Constant
 Bit rate : 384 Kbps
 Channel(s)   : 2 channels
 Sampling rate: 48.0 KHz
 Compression mode : Lossy
 Delay relative to video  : -10ms
 
   !!! how to make this delay relative to video value to
 0ms?

What values do you get with ffprobe? Did you try with the asetpts
filter? This will require audio transcoding though.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] -strict unofficial error

2014-09-17 Thread Moritz Barsnick
On Wed, Sep 17, 2014 at 13:51:44 +, Carl Eugen Hoyos wrote:
 Moritz Barsnick barsnick at gmx.net writes:
  It seems that was removed in 2011:
 No, inofficial was removed.

Well, d'uh. My bad.

These are the definitions from libavcodec/avcodec.h:
#define FF_COMPLIANCE_VERY_STRICT   2 /// Strictly conform to an older more 
strict version of the spec or reference software.
#define FF_COMPLIANCE_STRICT1 /// Strictly conform to all the things 
in the spec no matter what consequences.
#define FF_COMPLIANCE_NORMAL0
#define FF_COMPLIANCE_UNOFFICIAL   -1 /// Allow unofficial extensions
#define FF_COMPLIANCE_EXPERIMENTAL -2 /// Allow nonstandardized experimental 
things.

Could it be that there's a difference in option parsing for -strict
for format vs. codec options?

(Too much guessing on my side.)

ypatios, could you please show us your full command and complete uncut
console output?

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


Re: [FFmpeg-user] -strict unofficial error

2014-09-17 Thread Carl Eugen Hoyos
ypatios ypatios at gmail.com writes:

 [Eval  at  0x7fffb730b4b0] Undefined constant 
 or missing '(' in 'unofficial'

This is a regression since d858ee71
Workaround is to use -strict -1

Thank you for the report, Carl Eugen

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


Re: [FFmpeg-user] ffprobe: Not using full CPU, regardless of -threads parameter

2014-09-17 Thread Peter B.
On 09/17/2014 04:27 PM, tim nicholson wrote:
 Try using a simpler ffprobe command and compare like with like.

 Your example includes a complex filter chain  and not all filters
 multi-thread afaik.

That's a good point.
I'll try that.

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


Re: [FFmpeg-user] ffprobe: Not using full CPU, regardless of -threads parameter

2014-09-17 Thread Carl Eugen Hoyos
Peter B. pb at das-werkstatt.com writes:

 Yes, they are absolutely different use cases. I just 
 brought the ffmpeg-framemd5 example to illustrate 
 that it's neither the source file's encoding, nor 
 the disk that might limit ffprobe.

But you are claiming that there is an ffprobe problem.
This is certainly not impossible but running the same 
command with ffmpeg should (??) show you that there is 
no issue with ffprobe but that you are using a filter 
that does not support multi-threading and is 
significantly slower than decoding.

Carl Eugen

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


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread einguste
I try to test.

$ ffmpeg -i mjpeg.hex -vcodec copy mjpeg.mp4
ffmpeg version N-66318-g85f2c01 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 18 2014 00:12:17 with gcc 4.9.1 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-avisynth 
--enable-fontconfig --enable-frei0r --enable-gnutls
--enable-ladspa --enable-libass --enable-libbluray --enable-libcaca 
--enable-libcdio --enable-libfreetype
--enable-libgsm --enable-libmodplug --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr 
--enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc 
--enable-libvorbis --enable-libvpx --enable-libvidstab
--enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxvid 
--enable-libilbc --enable-libxavs --enable-opengl
--enable-libwebp --enable-avresample --enable-w32threads 
--extra-ldflags=-static --extra-cflags='-march=i686
-mtune=generic -mfpmath=sse -msse' --optflags='-O2 -finline-functions'
  libavutil  54.  7.100 / 54.  7.100
  libavcodec 56.  1.100 / 56.  1.100
  libavformat56.  4.102 / 56.  4.102
  libavdevice56.  0.100 / 56.  0.100
  libavfilter 5.  1.101 /  5.  1.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale  3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  0.100 / 53.  0.100
[mjpeg @ 005372c0] Format mjpeg detected only with low score of 25, misdetection
 possible!
Input #0, mjpeg, from 'mjpeg.hex':
  Duration: N/A, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg), 1280x720 [SAR 1:1 DAR 16:9
], 25 tbr, 1200k tbn, 25 tbc
Output #0, mp4, to 'mjpeg.mp4':
  Metadata:
encoder : Lavf56.4.102
Stream #0:0: Video: mjpeg (l[0][0][0] / 0x006C), yuvj420p, 1280x720 [SAR 1:1
 DAR 16:9], q=2-31, 1200k tbn, 1200k tbc
Stream mapping:
  Stream #0:0 - #0:0 (copy)
Press [q] to stop, [?] for help
frame=  163 fps=0.0 q=-1.0 Lsize=   13551kB time=00:00:06.48 bitrate=17130.7kbit
s/s
video:13549kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
 overhead: 0.010840%


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


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Carl Eugen Hoyos
einguste einguste at gmail.com writes:

 I try to test.

Thank you!

Carl Eugen

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


Re: [FFmpeg-user] V4L2 recording results in invalid data buffer still owned errors.

2014-09-17 Thread Louis Rossmann
 Louis Rossmann l.a.rossmann at gmail.com writes:

  So that messed up configure line is not Gentoo's
  fault, but all mine. :(

 Then please reconfigure with ./configure --enable-gpl
 and add the external libraries you need, do NOT add any
 --disable-* flags and do NOT add any --extra-cflags /
 --extra-ldflags except those needed for library detection.

 Your current executable is intentionally slow.

 Carl Eugen

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


 I've done everything I can with my executable, however, the problem
 persists.

 If I run a recording, it works. if I stop the recording, there is little I
 can do short of reboot the system to record a second video using the V4L2
 device. I've tried on an Ubuntu desktop and a Gentoo laptop. Do you have
 any suggestions? Kernel 3.14 was a quick fix but sadly that did not last
 long. :(


I decided to try on a different computer with a fresh install and the
problem persists. I can only record once before having to reboot.

I have two of the same device. What is interesting is, even after I have
run out of recording tries with one device, I can try again with the next
and it works - but of course, only for one time.

The only other software I can find that allows me to simultaneously capture
raw video from an HDMI source is $1000 on Windows 7. If someone can fix
V4L/ffmpeg so it works properly with these devices, I'd be willing to match
the $1k in donations. I absolutely love how no frills this is - no crap, no
tons of menus, no junk I don't need, just type a line tell it how to encode
and it gives me files I can easily edit. I love it... I just hate rebooting
my machine for each take. I have an SSD, but still, cmon! :)
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread fernando.takeshi
Ok, it seems that a newer build of ffmpeg can understand and mux the mjpeg
raw frames file. Still, that doesn't help me much, since I need to do this
programatically... thank you for your time though!



--
View this message in context: 
http://ffmpeg-users.933282.n4.nabble.com/Mux-encoded-video-data-directly-into-mp4-files-tp4667372p4667397.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Carl Eugen Hoyos
fernando.takeshi fernando.takeshi at seventh.com.br writes:

 Ok, it seems that a newer build of ffmpeg can understand 
 and mux the mjpeg raw frames file.

It works with older versions if the file has a .mjpeg suffix 
or if you force the file format.

 Still, that doesn't help me much, since I need to do this
 programatically...

Why didn't you sent an email to the relevant mailing list 
yet (as I suggested)?

Carl Eugen

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


Re: [FFmpeg-user] How to record audio and video from FaceTime HD Camera in OSX

2014-09-17 Thread Jay Muthialu
Hi Moritz,

Thanks for the information. I finally applied the patches. Although I could not 
apply through git because the latest ffmpeg version I downloaded did not seem 
to match with the patches in the email and it failed. So I had to manually sync 
the patch file to the source file and I complied sucessfully. The patched 
version works for all basics scenarios  but did not fix the underlying issue. 
It now shows the inbuilt microphone which is an improvement, but the microphone 
is showing as error. 

$ ffmpeg -f avfoundation -list_devices true -i 

Output:
libavutil  54.  7.100 / 54.  7.100
  libavcodec 56.  1.100 / 56.  1.100
  libavformat56.  4.102 / 56.  4.102
  libavdevice56.  0.100 / 56.  0.100
  libavfilter 5.  1.101 /  5.  1.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale  3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  0.100 / 53.  0.100
[AVFoundation input device @ 0x7ff6c0c14de0] AVFoundation video devices:
[AVFoundation input device @ 0x7ff6c0c14de0] [0] FaceTime HD Camera
[AVFoundation input device @ 0x7ff6c0c14de0] AVFoundation audio devices:
[AVFoundation input device @ 0x7ff6c0c14de0] [0] Built-in Microphone
: Input/output error

Can you or anyone help me on this? Please note that I have applied all the 5 
patches in the thread given below.

https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-April/156866.html

These patches only modified one file avfoundation.m. I have attached the 
patched avfoundation.m for reference purpose.



avfoundation.m
Description: Binary data


Warm Regards
Jay

On Sep 8, 2014, at 3:52 AM, Moritz Barsnick barsn...@gmx.net wrote:

 Hi Jay,
 [oops, sent too early]
 
 On Sun, Sep 07, 2014 at 12:01:25 -0400, Jay Muthialu wrote:
 
 I went through all the patches specified in the link but I am not
 sure how to apply the patches. Could you please guide me on how to
 apply the patches and also what would be command I would have to use
 to take audio input ? Please note that I originally installed ffmpeg
 using Homebrew.
 
 You would need to compile yourself. Instructions are here:
 
 https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX
 
 I don't know how Homebrew works. To apply the patches, you would need
 to grab the patch files from the emails, i.e. sections like this:
 
 diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
 index 3622be0..2ac1b3c 100644
 --- a/libavdevice/avfoundation.m
 +++ b/libavdevice/avfoundation.m
 at  at  -191,7 +191,7  at  at  static int
 avf_read_header(AVFormatContext *s)
 goto fail;
 }
 } else {
 -video_device = [AVCaptureDevice
 - defaultDeviceWithMediaType:AVMediaTypeMuxed];
 +video_device = [AVCaptureDevice
 - defaultDeviceWithMediaType:AVMediaTypeVideo];
 }
 
 // Video capture device not found, looking for AVMediaTypeVideo
 -- 
 1.8.3.2
 
 (I don't know where to get the proper ASCII versions of these patches)
 and apply each of them with
 patch -p1 -i patchfilename
 
 before the configure of make stage. As said, I have no idea how to
 interrupt homebrew stages.
 
 Moritz
 ___
 ffmpeg-user mailing list
 ffmpeg-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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


[FFmpeg-user] ffmpeg read from UDP/Port

2014-09-17 Thread Alex Lin
Hi all,

I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z

I have spent the entire day experimenting with ffmpeg today but I haven't
quite figure out if ffmpeg is the right solution to my problem yet, so I
would like to get some opinions.

I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really matter
at this point.

Currently, I have a server sending the H264 packets to port 50002 of my
machine (192.168.1.200), so I run the following ffmpeg command on my
machine:

ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4

Then the following shows

ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil  54.  7.100 / 54.  7.100
  libavcodec 56.  1.100 / 56.  1.100
  libavformat56.  4.101 / 56.  4.101
  libavdevice56.  0.100 / 56.  0.100
  libavfilter 5.  1.100 /  5.  1.100
  libswscale  3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  0.100 / 53.  0.100

The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this

udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.

am I using ffmpeg correctly? and are the H264 packets I am receiving not
supported?
I have looked around and did not see any debug log generated by ffmpeg, so
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264 packets.

Thanks in advance.
AL
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] V4L2 recording results in invalid data buffer still owned errors.

2014-09-17 Thread artwait
Louis Rossmann l.a.rossmann at gmail.com writes:

 
  Louis Rossmann l.a.rossmann at gmail.com writes:
 
   So that messed up configure line is not Gentoo's
   fault, but all mine. :(
 
  Then please reconfigure with ./configure --enable-gpl
  and add the external libraries you need, do NOT add any
  --disable-* flags and do NOT add any --extra-cflags /
  --extra-ldflags except those needed for library detection.
 
  Your current executable is intentionally slow.
 
  Carl Eugen
 
  ___
  ffmpeg-user mailing list
  ffmpeg-user at ffmpeg.org
  http://ffmpeg.org/mailman/listinfo/ffmpeg-user
 
 
  I've done everything I can with my executable, however, the problem
  persists.
 
  If I run a recording, it works. if I stop the recording, there is 
little I
  can do short of reboot the system to record a second video using the 
V4L2
  device. I've tried on an Ubuntu desktop and a Gentoo laptop. Do you 
have
  any suggestions? Kernel 3.14 was a quick fix but sadly that did not 
last
  long. :(
 
 
 I decided to try on a different computer with a fresh install and the
 problem persists. I can only record once before having to reboot.
 
 I have two of the same device. What is interesting is, even after I have
 run out of recording tries with one device, I can try again with the next
 and it works - but of course, only for one time.
 
 The only other software I can find that allows me to simultaneously 
capture
 raw video from an HDMI source is $1000 on Windows 7. If someone can fix
 V4L/ffmpeg so it works properly with these devices, I'd be willing to 
match
 the $1k in donations. I absolutely love how no frills this is - no crap, 
no
 tons of menus, no junk I don't need, just type a line tell it how to 
encode
 and it gives me files I can easily edit. I love it... I just hate 
rebooting
 my machine for each take. I have an SSD, but still, cmon! :)
 

So, I've now tried using VLC's command line (cvlc) to record from v4l2, and 
it works flawlessly. Not a single failure; no reboots required.

So for the time being, I'm giving up on ffmpeg and will use VLC. As of 
yesterday's ffmpeg build, the problem still exists.

FYI, here's the VLC command line I tested with. There are additional 
parameters to play with of course, but this was enough to prove to me that 
it works:

cvlc v4l2:// :v4l2-vdev=/dev/video0 --sout 
'#transcode{venc=x264}:standard{access=file,mux=avi,dst=/home/myusername/V
ideos/test.avi}'

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


Re: [FFmpeg-user] (mpeg2) how to set audio delay relative to video as 0 ?

2014-09-17 Thread linxs
D:\ffprobe 0.mpg
ffprobe version N-63439-g96470ca Copyright (c) 2007-2014 the FFmpeg
developers
  built on May 25 2014 22:01:51 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil  52. 86.100 / 52. 86.100
  libavcodec 55. 65.100 / 55. 65.100
  libavformat55. 41.100 / 55. 41.100
  libavdevice55. 13.101 / 55. 13.101
  libavfilter 4.  5.100 /  4.  5.100
  libswscale  2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc52.  3.100 / 52.  3.100
Input #0, mpeg, from '0.mpg':
  Duration: 00:00:14.98, start: 0.529978, bitrate: 953 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR
16:1
5 DAR 4:3], max. 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s


I added -af asetpts=PTS+0/TB to the options of ffmpeg.
The audio delay relative to video of output mpg  is -10ms too. nothing
changed.


2014-09-17 20:10 GMT+08:00 Stefano Sabatini stefa...@gmail.com:

 On date Wednesday 2014-09-17 19:44:02 +0800, linxs wrote:
  Hi everybody,
  I transcode other video to mpg2 video as following command:
  ffmpeg -i other video -c:v mpeg2video -b:v 8000k -c:a mp2 -y 0.mpg
 
 
 /
 
 /
  d:\ffmpeg -i orig.mpg -c:v mpeg2video -c:a mp2 -y 0.mpg
  ffmpeg version N-63439-g96470ca Copyright (c) 2000-2014 the FFmpeg
  developers
 [...]
  I use MediaInfo.exe to view the ouput mpg, and get the result:
 
 
 /
 
 /
  General
  Complete name:
  D:\1.project\1.HDPlayer\audiolevel\FM_MIRROR\loop\0.mpg
  Format   : MPEG-PS
  File size: 1.70 MiB
  Duration : 15s 24ms
  Overall bit rate mode: Variable
  Overall bit rate : 951 Kbps
 
  Video
  ID   : 224 (0xE0)
  Format   : MPEG Video
  Format version   : Version 2
  Format profile   : Main@Main
  Format settings, BVOP: No
  Format settings, Matrix  : Default
  Format settings, GOP : Variable
  Duration : 14s 960ms
  Bit rate mode: Variable
  Bit rate : 548 Kbps
  Width: 720 pixels
  Height   : 576 pixels
  Display aspect ratio : 4:3
  Frame rate   : 25.000 fps
  Standard : PAL
  Color space  : YUV
  Chroma subsampling   : 4:2:0
  Bit depth: 8 bits
  Scan type: Progressive
  Compression mode : Lossy
  Bits/(Pixel*Frame)   : 0.053
  Time code of first frame : 00:00:00:00
  Time code source : Group of pictures header
  Stream size  : 1 001 KiB (57%)
 
  Audio
  ID   : 192 (0xC0)
  Format   : MPEG Audio
  Format version   : Version 1
  Format profile   : Layer 2
  Duration : 15s 24ms
  Bit rate mode: Constant
  Bit rate : 384 Kbps
  Channel(s)   : 2 channels
  Sampling rate: 48.0 KHz
  Compression mode : Lossy
  Delay relative to video  : -10ms
 
!!! how to make this delay relative to video value to
  0ms?

 What values do