Re: [FFmpeg-user] Request for Assistance: Recording Android Mobile Device Input and Output Audio with FFmpeg

2024-04-04 Thread H. Vidal, Jr.




On 4/4/24 10:53, Nagulan Bsc cs wrote:

Dear FFmpeg Team,

I hope this email finds you well. I am writing to seek your assistance with
a project involving audio recording using FFmpeg.

I am currently working on a project that requires capturing both the input
and output audio from mobile devices. After some research, I came across
FFmpeg as a potential solution for recording audio. However, I am facing
difficulties in achieving this functionality.

Specifically, I need to record the audio input (microphone) and output
(speaker) simultaneously on mobile devices. I have tried various
approaches, including using "alsa" input for microphone and "pulse" output
for the speaker, but haven't been successful in obtaining the desired
results.

Below is a simplified version of the script I've been using:

*import subprocess*

*def record_audio(output_audio):try:ffmpeg_command = [
   'ffmpeg', '-f', 'alsa', '-i', 'pulse', '-ac', '2', '-vn', output_audio
 ]subprocess.run(ffmpeg_command, check=True)print("Audio
recording completed successfully.")except subprocess.CalledProcessError
as e:print("Error:", e)if __name__ == "__main__":output_audio =
"output_audio.mp3"record_audio(output_audio)*


Could you please provide guidance on how I can achieve simultaneous
recording of mobile device input and output audio using FFmpeg? Any
insights, suggestions, or examples would be greatly appreciated.

Thank you very much for your time and assistance. I look forward to hearing
from you soon.



*Best regards,Nagulan M*

It doesn't feel like mobile devices and ffmpeg would
be the way to go.

Mobile devices (Android, iOS presumably) have dedicated
APIs for media capture, recording, muxing, etc.

A very quick google search suggests MediaRecorder and MediaMuxer
are places to start in Android API.

I am sure you can find an iOS equivalent.

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

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


Re: [FFmpeg-user] buffer underflow (?)

2023-09-29 Thread H. Vidal, Jr.

Semantics are a little different presumably but the concept
is the same: presumably, an underflow condition exists when
a consuming process may have the expectation of available data
but cannot satisfy that consumption because of (presumably
then unavailable, perhaps by error) lack of producer data.

Fair guess? Welcome to corrections if incorrect. Did not write
ffmpeg. Have written video software with underflow considerations.

Can we please stop with the 'my code's bigger than yours' now?

hv


On 9/29/23 11:43, Paul B Mahol wrote:

On 9/29/23, Mark Filipak  wrote:

On Fri, Sep 29, 2023 at 11:36 AM Paul B Mahol  wrote:

On 9/29/23, Mark Filipak  wrote:

On Fri, Sep 29, 2023 at 11:01 AM Paul B Mahol  wrote:
-snip-

Buffer underflow - something is too small in size. So there is unused,
wasteful space left.

That's not correct.


Also could mean decoder and/or demuxer did not processed whole buffer.

That's not underflow. That can be produced by underflow, but it's not
underflow.
Why would a process access a buffer before buffering is finished?

Clearly you know better ...

Clearly. I've written 8051 real time code and kernel.

This have nothing to do with real time code and/or kernel.


... and do not need help at all.

I do need help. I didn't write ffmpeg.


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

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


Re: [FFmpeg-user] Make conversion go faster

2023-09-13 Thread H. Vidal, Jr.

On 9/13/23 12:08, Ferdi Scholten wrote:

Hi! I'm using this command to convert wav audio to mp3:
  -i "\\.\pipe\FFMpegCore_d1110724-bf07-4ada-9ea4-5b404aea3d52" -b:a 
64k -f

mp3 "\\.\pipe\FFMpegCore_c9edc9bd-8061-42a8-a806-ff34bfa7408d" -y

I would like it to go faster. How can I make it faster?
Thanks!




I don't know the benchmarks, but you might want to look at Lame
for a Wave-to-MP3 solution.

It is certainly a generally available package under most
Linux distros; don't know if it is available for Win
and OSX (latter more likely?)

https://lame.sourceforge.io/

Good luck.

H. Vidal, Jr.


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

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


Re: [FFmpeg-user] Problem with recorded YouTube stream

2020-05-01 Thread H
On 04/22/2020 02:04 PM, Carl Zwanzig wrote:
> On 4/22/2020 10:39 AM, H wrote:
>
>> I downloaded the latest version for CentOS 7 from the ffmpeg website
>> after your first e-mail and my two previous posts were based on that.
> And that is not the _latest_ ffmpeg (forget about "for centos", it's not).
>
>
> All of these errors say the basically the same thing, the file is 
> well-damaged-
>
>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x215fe80] moov atom not found
>> RRTepdBvUFE.mp4: Invalid data found when processing input
>
>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fca54c41360] moov atom not found
>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fca2cc09fa0] moov atom not found
>
> > [ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
>
> (mplayer can't even tell the format)
>> RAWDV file format detected.
>> VIDEO:  [DVSD]  720x480  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
>> Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV)
>
> If you google for "moov atom not found", you'll find a pile of suggestions 
> and pointers to some tools. At this point, that will probably help more than 
> poking about with ffmpeg options.
>
>
> For future recordings, consider using a different output container like flv 
> or ts (or mkv?); those are more resilient to streaming errors.
>
>
> z!
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

So you are saying that despite knowing the settings youtube-dl used when 
recording the file, it is not possible to use that knowledge when using ffmpeg 
to play the file back (barring damage while recording the file which I have no 
evidence for)?

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

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

Re: [FFmpeg-user] Problem with recorded YouTube stream

2020-04-22 Thread H
On 04/22/2020 12:38 PM, Carl Zwanzig wrote:
> On 4/22/2020 7:40 AM, H wrote:
>> Yes, I was using the latest version of youtube-dl from the CentOS 7 
>> repository.
>
> On 4/22/2020 9:15 AM, Edward Park wrote:
>> But your newest version of ffmpeg is still pretty old, you should try with 
>> an up-to-date version first, it probably has as much of a chance of
>> working as any other method.
> The point I was trying to make earlier (and Edward, too) is that while you're 
> getting the latest in the Centos repo, that is nowhere _near_ the current 
> version. Please try that.
>
> I already pointed to ffmpeg, but again-
> go to https://ffmpeg.org/download.html
> skip the Ubuntu official packages because we know they are old, go to "Linux 
> Static builds" (https://johnvansickle.com/ffmpeg/) and get a "git master" 
> build from there.
>
> for youtube-dl-
> http://ytdl-org.github.io/youtube-dl/download.html
>
>
> Regarding the captured content-
> Have you tried any other players to view it (vlc, mpv, mplayer, etc)? What do 
> they do?
> If none of them can even play the file, it may be truly damaged and you need 
> to look at repair tools. You _may_ be able to recover something with a simple 
> "ffmpeg -i input.mp4 -c copy output.mp4" (using a current ffmpeg), but no 
> guarantees. VLC also has some recovery and conversion options.
>
>
> Later,
>
> z!
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

I downloaded the latest version for CentOS 7 from the ffmpeg website after your 
first e-mail and my two previous posts were based on that. As for the download 
using an old version of youtube-dl that is in the past and not something I can 
do again since it was a live event.

I was hoping that knowing the output from youtube-dl when recording would allow 
us to know which options to use to force ffmpeg to play it back - assuming it 
can be done, of course.

Output from various other packages follow below.

Copying the file using ffmpeg fails with:

ffmpeg -i *mp4 -c copy test.mp4
ffmpeg version 3.4.7 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg 
--docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 
--mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong 
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 
--extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 
--enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt 
--enable-gnutls --enable-ladspa --enable-libass --enable-libbluray 
--enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype 
--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc 
--enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg 
--enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg 
--enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libx264 
--enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter 
--enable-avresample --enable-postproc --enable-pthreads --disable-static 
--enable-shared --enable-gpl --disable-debug --disable-stripping 
--shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil  55. 78.100 / 55. 78.100
  libavcodec 57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter 6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale  4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x215fe80] moov atom not found
RRTepdBvUFE.mp4: Invalid data found when processing input

vlc fails with:

LC media player 2.2.8 Weatherwax (revision 2.2.7-14-g3cc1d8cba9)
[00eb0168] core libvlc: Running vlc with the default interface. Use 
'cvlc' to use vlc without interface.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fca54c41360] moov atom not found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fca2cc09fa0] moov atom not found
[7fca2cc018d8] avformat demux error: Could not open /home/RRTepdBvUFE.mp4: 
Unknown error 1094995529

mplayer fails with:

^C[hakan@rose01 ~]$ mplayer *mp4
MPlayer SVN-r37391-4.8.3 (C) 2000-2015 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You wil

Re: [FFmpeg-user] Problem with recorded YouTube stream

2020-04-22 Thread H
On 04/21/2020 10:32 PM, Edward Park wrote:
> Hi,
>> [tls @ 0x22e0d00] The TLS connection was non-properly terminated.
>> [tls @ 0x22e0d00] The specified session has been invalidated for some reason.
>> [tls @ 0x2309820] The TLS connection was non-properly terminated.te= 
>> 224.4kbits/s   
> It doesn't look like the download was entirely successful in the first 
> place...
> It does report some kind a bitrate, are you trying to salvage this, or would 
> redownloading be an easier option?
>
> Regards,
> Ted Park
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

No, as I said in my post, this was a live event and I am stuck with what I have 
recorded. The recording is about 260 MB so something has been recorded, now how 
to recover it.

BTW, the warning(?) messages above repeated the entire time, if, however, there 
was nothing that could be recorded I would think youtube-dl would have aborted, 
not continued to record?

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

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

Re: [FFmpeg-user] Problem with recorded YouTube stream

2020-04-22 Thread H
On 04/21/2020 09:03 PM, Tom Sparks wrote:
> Are you sure you are using the latest version of youtube-dl from
> https://youtube-dl.org/ ?
> Are you using the latest version of python?
>
>
> On 22/04/2020, H  wrote:
>> On 04/20/2020 02:58 PM, Carl Zwanzig wrote:
>>> On 4/20/2020 11:42 AM, H wrote:
>>>> I am running ffmpeg 2.8.15 under CentOS 7, the latest version released
>>>> for that operating system.
>>> First- that version is positively _ancient_ and not supported at all.
>>> Download a current linux build as linked from
>>> https://ffmpeg.org/download.html and try that. Or pull the source from git
>>> and build your own version.
>>>
>>> Second- please post the _entire_ command output
>>>
>>> (third- when replying, do not top-post your message)
>>>
>>> These are pretty much immutable rules of the list and are discussed in
>>> https://ffmpeg.org/mailing-list-faq.html
>>>
>>>
>>> Later,
>>>
>>> z!
>>> ___
>>> ffmpeg-user mailing list
>>> ffmpeg-user@ffmpeg.org
>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>> I downloaded the latest version of ffmpeg for CentOS 7 and tried to view the
>> file, the error message is pretty much the same as with the older version of
>> ffmpeg, ie:
>>
>> [hakan@decd379621cd ~]$ ffmpeg -v 9 -loglevel 99 -i *mp4
>> ffmpeg version 3.4.7 Copyright (c) 2000-2019 the FFmpeg developers
>>   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
>>   configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg
>> --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg
>> --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g
>> -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
>> --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
>> --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' '
>> --enable-libopencore-amrnb --enable-libopencore-amrwb
>> --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd
>> --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa
>> --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm
>> --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm
>> --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl
>> --enable-opengl --enable-libopenjpeg --enable-libopus
>> --disable-encoder=libopus --enable-libpulse --enable-librsvg
>> --enable-libsoxr --enable-libspeex --enable-libtheora
>> --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libx264
>> --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter
>> --enable-avresample --enable-postproc --enable-pthreads --disable-static
>> --enable-shared --enable-gpl --disable-debug --disable-stripping
>> --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
>>   libavutil  55. 78.100 / 55. 78.100
>>   libavcodec 57.107.100 / 57.107.100
>>   libavformat    57. 83.100 / 57. 83.100
>>   libavdevice    57. 10.100 / 57. 10.100
>>   libavfilter 6.107.100 /  6.107.100
>>   libavresample   3.  7.  0 /  3.  7.  0
>>   libswscale  4.  8.100 /  4.  8.100
>>   libswresample   2.  9.100 /  2.  9.100
>>   libpostproc    54.  7.100 / 54.  7.100
>> Splitting the commandline.
>> Reading option '-v' ... matched as option 'v' (set logging level) with
>> argument '9'.
>> Reading option '-loglevel' ... matched as option 'loglevel' (set logging
>> level) with argument '99'.
>> Reading option '-i' ... matched as input url with argument
>> 'RRTepdBvUFE.mp4'.
>> Finished splitting the commandline.
>> Parsing a group of options: global .
>> Applying option v (set logging level) with argument 9.
>> Successfully parsed a group of options.
>> Parsing a group of options: input url RRTepdBvUFE.mp4.
>> Successfully parsed a group of options.
>> Opening an input file: RRTepdBvUFE.mp4.
>> [NULL @ 0x248ee00] Opening 'RRTepdBvUFE.mp4' for reading
>> [file @ 0x248f620] Setting default whitelist 'file,crypto'
>> Probing mov,mp4,m4a,3gp,3g2,mj2 score:100 size:2048
>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] Format mov,mp4,m4a,3gp,3g2,mj2 probed
>> with size=2048 and score=100
>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] type:'ftyp' parent:'root' sz: 32 8
>> 227566402
>> [mov,mp4,m4a,3gp,3

Re: [FFmpeg-user] Problem with recorded YouTube stream

2020-04-21 Thread H
On 04/20/2020 02:58 PM, Carl Zwanzig wrote:
> On 4/20/2020 11:42 AM, H wrote:
>> I am running ffmpeg 2.8.15 under CentOS 7, the latest version released for 
>> that operating system.
>
> First- that version is positively _ancient_ and not supported at all. 
> Download a current linux build as linked from 
> https://ffmpeg.org/download.html and try that. Or pull the source from git 
> and build your own version.
>
> Second- please post the _entire_ command output
>
> (third- when replying, do not top-post your message)
>
> These are pretty much immutable rules of the list and are discussed in 
> https://ffmpeg.org/mailing-list-faq.html
>
>
> Later,
>
> z!
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

I downloaded the latest version of ffmpeg for CentOS 7 and tried to view the 
file, the error message is pretty much the same as with the older version of 
ffmpeg, ie:

[hakan@decd379621cd ~]$ ffmpeg -v 9 -loglevel 99 -i *mp4
ffmpeg version 3.4.7 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg 
--docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 
--mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong 
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 
--extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 
--enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt 
--enable-gnutls --enable-ladspa --enable-libass --enable-libbluray 
--enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype 
--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc 
--enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg 
--enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg 
--enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libx264 
--enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter 
--enable-avresample --enable-postproc --enable-pthreads --disable-static 
--enable-shared --enable-gpl --disable-debug --disable-stripping 
--shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil  55. 78.100 / 55. 78.100
  libavcodec 57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter 6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale  4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 
'9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) 
with argument '99'.
Reading option '-i' ... matched as input url with argument 'RRTepdBvUFE.mp4'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url RRTepdBvUFE.mp4.
Successfully parsed a group of options.
Opening an input file: RRTepdBvUFE.mp4.
[NULL @ 0x248ee00] Opening 'RRTepdBvUFE.mp4' for reading
[file @ 0x248f620] Setting default whitelist 'file,crypto'
Probing mov,mp4,m4a,3gp,3g2,mj2 score:100 size:2048
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] Format mov,mp4,m4a,3gp,3g2,mj2 probed 
with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] type:'ftyp' parent:'root' sz: 32 8 
227566402
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] type:'free' parent:'root' sz: 8 40 
227566402
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] type:'mdat' parent:'root' sz: 0 48 
227566402
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] type:'ftyp' parent:'root' sz: 32 8 
227566402
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] type:'free' parent:'root' sz: 8 40 
227566402
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] type:'mdat' parent:'root' sz: 0 48 
227566402
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x248ee00] moov atom not found
[AVIOContext @ 0x2497800] Statistics: 65536 bytes read, 3 seeks
RRTepdBvUFE.mp4: Invalid data found when processing input



Here is the output when I recorded the live stream on YouTube, hopefully it can 
help with configuring ffmpeg correctly to play back:


youtube-dl https://youtube.com/watch?v=RRTepdBvUFE
[youtube] RRTepdBvUFE

[FFmpeg-user] Problem with recorded YouTube stream

2020-04-20 Thread H
I am running ffmpeg 2.8.15 under CentOS 7, the latest version released for that 
operating system.

Yesterday I recorded a YouTube stream for later playback. However, playing it 
back in ffmpeg results in the dreaded:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1d5ac20] moov atom not found
abb.mp4: Invalid data found when processing input

I saved the information output by ffmpeg (youtube-dl) when recording the stream 
and am hoping that someone could suggest some options I could use for ffmpeg to 
allow me to play the stream back. Here is what I believe might be key info:

Metadata:
    encoder : Lavf56.40.101
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 
1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 120 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[tls @ 0x22e0d00] The TLS connection was non-properly terminated.
[tls @ 0x22e0d00] The specified session has been invalidated for some reason.
[tls @ 0x2309820] The TLS connection was non-properly terminated.te= 
224.4kbits/s   

...


Thank you.

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

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

Re: [FFmpeg-user] Equivalent of "-f rawvideo" but for audio?

2019-06-25 Thread H. Vidal, Jr.

On 6/25/19 6:11 PM, Peter B. wrote:

Hi everyone :)

Is it possible somehow to transcode any source audio format type to its
raw, uncompressed format that matches the source?

I'm dealing with collections of mixed input format combinations, and am
trying to find a way to bash-automate something.


For video "-f rawvideo" seems to do the trick.
But according to the "audio types" documentation [1] it seems I have to
know define the (and therefore already know) the format.

So, instead of specifying "-f s16le" or "-f s24le", is there something
like "-f rawaudio"?



I'm grateful for any hints or input!


Thanks in advance,
Peter B.



## Links:
[1] https://trac.ffmpeg.org/wiki/audio%20types


Maybe 'sox' can help if this is purely an audio-to-audio
application. I have used it to useful effect reliably in signal
processing applications; your mileage may vary.

http://sox.sourceforge.net/

hv

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

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

[FFmpeg-user] Unable to make FFMPEG to work with Icecast2 Server

2017-12-04 Thread Edgar H
Thanks a lot for the help guys! The problem is now solved and it's working
perfectly.

Funny enough I was using a FFMPEG build from 2 days ago! Maybe it was
erroneously compiled?
___
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".

[FFmpeg-user] Unable to make FFMPEG to work with Icecast2 Server

2017-12-04 Thread Edgar H
Sorry for that, didn't understand it at first...

The command I'm exeucting is the following one...

C:\Users\myuser\myproject>java -jar streamer/strea
mer.jar 6 53122 | ffmpeg/bin/ffmpeg -f s16le -ar 48000 -ac 2 -i - -f ogg
icecast
://hackme:hackme@localhost:8000/streaming.ogg

And the output...

ffmpeg version N-50911-g9efcfbe Copyright (c) 2000-2013 the FFmpeg
developers
  built on Mar 13 2013 21:26:48 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb
--enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil  52. 19.100 / 52. 19.100
  libavcodec 55.  0.100 / 55.  0.100
  libavformat55.  0.100 / 55.  0.100
  libavdevice54.  4.100 / 54.  4.100
  libavfilter 3. 45.103 /  3. 45.103
  libswscale  2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc52.  2.100 / 52.  2.100
[s16le @ 0227e640] max_analyze_duration 500 reached at 501
microseconds
[s16le @ 0227e640] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, s16le, from 'pipe:':
  Duration: N/A, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[NULL @ 021f20c0] Unable to find a suitable output format for '/bin/ffmpeg'
/bin/ffmpeg: Invalid argument
___
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".

[FFmpeg-user] Unable to make FFMPEG to work with Icecast2 Server

2017-12-03 Thread Edgar H
Thanks a lot for the quick reply Mortiz, really appreciate it.

My god the > and | operator... And I wonder if this even worked back then
like this! Thanks a lot for the heads up with that, totally forgot about it.

Now that I've changed the operator, the output shows again but it seems
that it's "Unable to find a suitable output format for '/bin/ffmpeg'", and
then it says "bin/ffmpeg: Invalid argument"

Am I missing any parameter? Maybe just remove the 'content_type' part?
___
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".

[FFmpeg-user] Unable to make FFMPEG to work with Icecast2 Server

2017-12-03 Thread Edgar H
Thanks a lot for the quick reply Mortiz, really appreciate it.

My god the > and | operator... And I wonder if this even worked back then
like this! Thanks a lot for the heads up with that, totally forgot about it.

Now that I've changed the operator, the output shows again but it seems
that it's "Unable to find a suitable output format for '/bin/ffmpeg'", and
then it says "bin/ffmpeg: Invalid argument"

Am I missing any parameter? Maybe just remove the 'content_type' part?
___
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".

[FFmpeg-user] Unable to make FFMPEG to work with Icecast2 Server

2017-12-03 Thread Edgar H
Hey guys,

I'm really struggling with the following problem, a problem I had solved
few months ago and now that I revisit it, it doesn't work anymore...

At the moment I have a Java desktop application which spits audio bytes
through the stdout, bytes that ffmpeg must receive. I've done this using
some libraries in Java so I don't need to wrap everything in a batch file
whatsoever, but for testing I'm just using the Windows cmd to quick test it.

Basically I'm using the > operator to send the stdout data to ffmpeg in the
following way...

java -jar folder_in_project_root/streamer.jar > ffmpeg/bin/ffmpeg.exe -f
s16le -ar 48000 -ac 2 -i - -f ogg -content_type application/ogg icecast://
hackme:hackme@127.0.0.1:8000/streaming.ogg

When I tested this months ago, FFMPEG shown the data that was being
streamed along more stats, but now when I execute the command nothing
happens, it just hangs.

Maybe it isn't able to connect to Icecast? Should I do something with ports
or something to make it even work in localhost?
___
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".

[FFmpeg-user] Encoding raw data written in real time into vorbis?

2016-12-06 Thread Edgar H
Hello guys,

I have a Java application which writes into a file without extension all
the bytes that are read from a given mixer in the system. Those raw bytes
should be encoded into a .ogg file so that it can be sent in real time to
Icecast and stream it to the net.

The fact is that I'm facing problems with this as it's my first time with
ffmpeg and I'm quite lost. What I've tried so far are the following things.

- Write/overwrite bytes into .au file in 4kb chunks > Encode .au chunk to
.ogg and merge all .ogg files in realtime. (It seems that concatenated
files don't work in some software).

- Write/overwrite raw bytes into file in 4kb chunks > Encode raw chunk file
to .ogg and merge all .ogg files in realtime. (The same problem as with the
previous approach).

And another possible solution that I don't know if it's possible... Writing
constantly all the bytes into the file, open ffmpeg in another thread and
encode the file which is being written in real time to .ogg?

If this isn't possible, how could I solve the concatenation problems?
___
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".

[FFmpeg-user] av_interleaved_write_frame - Not able to handle non-interleaved data

2015-12-18 Thread Gajanan H
Hi,

I am trying to run remuxing.c example for remuxing a TS file containing
h264, aac into FLV format. Initially I was getting an error due to ADTS
header in AAC. So I have added aac_adtstoasc filtering to audio stream. Now
I don't get that error any more.

The TS packets that are being fed are not properly interleaved. So I am
using 'av_interleaved_write_frame' function for muxing. Even then I am
getting the following error.

"[flv @ 0x7feab581d400] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 2464 >= 2379"

Here is the log snippet:

out: pts:2431 pts_time:2.431 dts:2398 dts_time:2.398 duration:33
> duration_time:0.033 stream_index:0
> in: pts:221793 pts_time:2.46437 dts:218790 dts_time:2.431 duration:3003
> duration_time:0.0333667 stream_index:0
> out: pts:2464 pts_time:2.464 dts:2431 dts_time:2.431 duration:33
> duration_time:0.033 stream_index:0
> in: pts:224796 pts_time:2.49773 dts:221793 dts_time:2.46437 duration:3003
> duration_time:0.0333667 stream_index:0
> out: pts:2498 pts_time:2.498 dts:2464 dts_time:2.464 duration:33
> duration_time:0.033 stream_index:0
> in: pts:214108 pts_time:2.37898 dts:214108 dts_time:2.37898 duration:2089
> duration_time:0.0232111 stream_index:1
> out: pts:2379 pts_time:2.379 dts:2379 dts_time:2.379 duration:23
> duration_time:0.023 stream_index:1
> [flv @ 0x7feab581d400] Application provided invalid, non monotonically
> increasing dts to muxer in stream 0: 2464 >= 2379
> in: pts:216198 pts_time:2.4022 dts:216198 dts_time:2.4022 duration:2089
> duration_time:0.0232111 stream_index:1
> out: pts:2402 pts_time:2.402 dts:2402 dts_time:2.402 duration:23
> duration_time:0.023 stream_index:1
> [flv @ 0x7feab581d400] Application provided invalid, non monotonically
> increasing dts to muxer in stream 0: 2464 >= 2402
> in: pts:218288 pts_time:2.42542 dts:218288 dts_time:2.42542 duration:2089
> duration_time:0.0232111 stream_index:1
> out: pts:2425 pts_time:2.425 dts:2425 dts_time:2.425 duration:23
> duration_time:0.023 stream_index:1
> [flv @ 0x7feab581d400] Application provided invalid, non monotonically
> increasing dts to muxer in stream 0: 2464 >= 2425
> in: pts:220378 pts_time:2.44864 dts:220378 dts_time:2.44864 duration:2089
> duration_time:0.0232111 stream_index:1
> out: pts:2449 pts_time:2.449 dts:2449 dts_time:2.449 duration:23
> duration_time:0.023 stream_index:1
> [flv @ 0x7feab581d400] Application provided invalid, non monotonically
> increasing dts to muxer in stream 0: 2464 >= 2449
> in: pts:222467 pts_time:2.47186 dts:222467 dts_time:2.47186 duration:2089
> duration_time:0.0232111 stream_index:1
> out: pts:2472 pts_time:2.472 dts:2472 dts_time:2.472 duration:23
> duration_time:0.023 stream_index:1
> in: pts:224557 pts_time:2.49508 dts:224557 dts_time:2.49508 duration:2089
> duration_time:0.0232111 stream_index:1




Here is my code snippet.

AVBitStreamFilterContext *bsfc = av_bitstream_filter_init("aac_adtstoasc");
  if (!bsfc) {
printf("Error creating adtstoasc filter\n");
goto end;
  }

  while (1) {
AVStream *in_stream, *out_stream;

ret = av_read_frame(ifmt_ctx, );
if (ret < 0) break;

in_stream = ifmt_ctx->streams[pkt.stream_index];
out_stream = ofmt_ctx->streams[pkt.stream_index];

log_packet(ifmt_ctx, , "in");

/* copy packet */
pkt.pts =
av_rescale_q_rnd(pkt.pts, in_stream->time_base,
out_stream->time_base,
 AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
pkt.dts =
av_rescale_q_rnd(pkt.dts, in_stream->time_base,
out_stream->time_base,
 AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
pkt.duration =
av_rescale_q(pkt.duration, in_stream->time_base,
out_stream->time_base);
pkt.pos = -1;
log_packet(ofmt_ctx, , "out");

if (out_stream->codec->codec_id == AV_CODEC_ID_AAC) {
  AVPacket newpacket = {0};
  int rc = av_bitstream_filter_filter(
  bsfc, out_stream->codec, NULL, , ,
  pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY);
  if (rc >= 0) {
/*printf("Filter aac success\n");*/
newpacket.pts = pkt.pts;
newpacket.dts = pkt.dts;
newpacket.duration = pkt.duration;
newpacket.pos = -1;

/*printf("calling av_interleaved_write_frame for audio:%d\n",
   pkt.stream_index);*/
ret = av_write_frame(ofmt_ctx, );
/*printf("av_interleaved_write_frame success\n");*/
av_free_packet();
  } else {
printf("Error filtering aac packet\n");
break;
  }
} else {
  ret = av_interleaved_write_frame(ofmt_ctx, );
  if (ret < 0) {
fprintf(stderr, "Error muxing packet\n");
break;
  }
}
av_packet_unref();
  }

  av_write_trailer(ofmt_ctx);

What am I doing wrong? Please help me.

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