Re: [FFmpeg-user] Trying to transcode raw video file from VLC

2016-01-19 Thread no6b
At 1/18/2016 03:14 PM, you wrote:
>On Mon, Jan 18, 2016 at 11:52:15 -0800, n...@no6b.com wrote: > Doing some 
>screencaps in VLC but its x264 transcoder is apparently > broken on Win8.1 x64 
>systems, including my own. No problem, I figure: > I'll just save the video in 
>raw format (I'm only capturing a 554x65 > area so even with raw video the file 
>isn't too big) & transcode it to > x264 using ffmpeg. But no... You *could* 
>capture with ffmpeg... But anyway: > From this point I tried specifying the 
>video frame size with -s, but > that didn't work. Any ideas as to how to tell 
>ffmpeg how to read > this, or am I going down the wrong path? VLC says the raw 
>format is > RV32 & ffmpeg seemed to be able to get the video size correct on 
>that > 1st try without the -f switch, so the "-f rawvideo" might be leading > 
>ffmpeg astray? Hmm. Is it an AVI containing rawvideo, or is it pure rawvideo? 
>If it's packed in an AVI, the rawvideo parameters should be available from the 
>container's headers: $ ffmpeg -f lavfi -i testsrc=size=hd720 -c:v rawvideo -t 
>3 rawvideo.avi [...] $ ffprobe rawvideo.avi ffprobe version N-77840-gcc538e9 
>Copyright (c) 2007-2016 the FFmpeg developers [...] Input #0, avi, from 
>'rawvideo.avi':   Metadata: encoder : Lavf57.21.101   Duration: 
>00:00:03.00, start: 0.00, bitrate: 552980 kb/s Stream #0:0: Video: 
>rawvideo, bgr24, 1280x720, 560432 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 
>tbn, 25 tbc If it's an AVI, but that doesn't help - which seems to  be the 
>case for you - you are looking for the input option "-c:v rawvideo", not "-f 
>rawvideo" (because "-f avi" would be correct, as automatically detected or 
>derived from the suffix). I.e. set the codec, not the format (container) type. 
>In the latter case (where it isn't really an AVI at all), you need to tell 
>ffmpeg *all* the codec details. It's described in the rawvideo format's 
>documentation: https://www.ffmpeg.org/ffmpeg-formats.html#rawvideo $ [...] -f 
>rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 I think this is 
>not the case for you though. Moritz

Thanks Moritz.  After trying a few of this options in FFprobe I believe the 
file is in fact raw video, & the pixel format is RGB32.  However, I don't see 
RGB32 or anything else in the list of -pix_fmts as matching in terms of number 
of channels & bits per pixel.  So would be mean there's no way for FFmpeg to 
decode this file?

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


Re: [FFmpeg-user] Compiling ffmpeg with libx264

2016-01-19 Thread Krishnan Unni
Hi Henrik

I tried launching msys2 from mingw64 shell. But still receiving the same error. 
I am using windows 10 x64. I am trying to get a dll for libx264 which can work 
with visual studio 2015 projects and WinRT app just like ffmpeg. This is how I 
compiled ffmpeg for win10rt: https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT
Tried the same for x264 too. No luck. Could you please guide me.

-Original Message-
From: "Krishnan Unni" 
Sent: ‎1/‎14/‎2016 7:14
To: "ffmpeg-user@ffmpeg.org" 
Subject: Compiling ffmpeg with libx264

Hi

I am trying to compile ffmpeg with libx264 in windows 10 x64. Based on the 
guideline in ffmpeg wiki I am able to compile ffmpeg alone successfully. But 
when I try to compile x264 lib based on the guide provided in ffmpeg wiki it's 
failing saying "could not identify os" and give two links to update the 
configure.* (2 files). Once I updated the file from the provided link and try 
to compile again MSYS is throwing error "could not identify OS" . The same MSYS 
compiled the ffmpeg fine. 😞  please help me to compile libx264 . I know how to 
enable it for ffmpeg once its cookies using the enable-libx264 attribute.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Replacing First 90 Seconds of a Video with Silence or with Another Audio Clip

2016-01-19 Thread a...@fumatic.org
On 01/18/2016 10:02 PM, Ryan Williams
wrote:




On Tuesday, 19 January 2016 02:13 Sam Logan  wrote:



I have a video AVI file, "Video.avi", consisting of a video and an 
audio track, and a separate audio file, "Audio.mp3". I want to do the 
following two things:

(1)

First, I want to produce a version of the video, "OutputSilenced.avi", 
which would be identical to the original video except that the first 
90 seconds of the video's audio are replaced with silence (to clarify, 
I want to REPLACE, as in overwrite, the first 90 seconds, NOT insert 
90 seconds of silence to push the audio back 90 seconds).



-af "volume=enable='lte(t,90)':volume=0"

http://ffmpeg.org/ffmpeg-filters.html#volume
http://ffmpeg.org/ffmpeg-filters.html#Timeline-editing



(2)

Second, I want to produce a version of the video, 
"OutputReplaced.avi", which would be identical to the original video 
except that the first 90 seconds of the video's audio are replaced 
with the first 90 seconds of "Audio.mp3" (again, to be clear, I want 
to REPLACE, as in overwrite, the first 90 seconds, NOT insert 90 
seconds of audio to push the original audio back 90 seconds).

How commands would I use to do this with FFmpeg? Ideally, I would like 
to just remux without doing any re-encoding. Thanks in advance.


Only way I can think of is to use a combination of the volume filter above to 
suppress the audio form the video and chain it with 'amix' to create a new 
audio track.

If you run into volume level problems using 'amix' try a combination of 
'amerge' to make it a 4 channel track then 'pan' to change it back into stereo.

http://ffmpeg.org/ffmpeg-filters.html#amix
http://ffmpeg.org/ffmpeg-filters.html#amerge-1
http://ffmpeg.org/ffmpeg-filters.html#pan





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







step 1)  Stop being a tool with the
all caps. be polite
You catch more flies with honey, 
than you do with vinegar.


step 2)
grab just the audio from your video 90 seconds in:
ffmpeg -ss 00:01:30  -i in.mp4 -vn  out.mp3

step 3)
concat your audio.mp3 with the out.mp3 you just made

ffmpeg -i "concat:audio.mp3|out.mp3"   -c copy all.mp3

step 4)
take the video stream from the original video and mux in all.mp3

ffmpeg -i in.mp4 -i all.mp3 -map 0:0 -map 1:0 -c copy done.mp4

step 5) record a blank 90 secs of audio
and repeat the steps 3 and 4 with it instead of audio.mp3.

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


Re: [FFmpeg-user] Trying to cut 5 sec of beginning and ending of mp4 files

2016-01-19 Thread tsh
I want to thank all that has submitted suggestions to me. I am guessing all of 
them are for Linux.
I really only know Windows.  I have loaded a laptop with Ubuntu.  I think it 
will take me longer to learn that
then to manually edit each end of each file using Avidemux.  I really don’t 
even know what bash is.

Sorry Guys, for being so stupid about Linux
Best
Tom

-Original Message-
From: ffmpeg-user [mailto:ffmpeg-user-boun...@ffmpeg.org] On Behalf Of Jim 
Shupert, Jr.
Sent: Tuesday, January 19, 2016 10:38 AM
To: FFmpeg user questions
Subject: Re: [FFmpeg-user] Trying to cut 5 sec of beginning and ending of mp4 
files


> Hi
>
> I am been trying almost every combination of switches to be able to 
> cut 5 sec from the start and 5 sec from the ending of variable length mp4 
> files.
>
> I have not been successful at doing either.  I guess I really don't 
> understand the usage.  I have more than 100 files to do.
>
> Can anyone suggest a command string that will work?
>

read
https://www.ffmpeg.org/ffmpeg.html
about
-ss position
and
-t duration (input/output)

When used as an input option (before -i), limit the duration of data read 
from the input file




so what you really want is a sh script to loop



5 sec fro top is easy cause they all start at 0 so approx something like : and 
you ffmpeg -i < inFile> -ss 05.000 -vcodec $$  -acodec $$ 

you now have outFile  with the top 5 sec off

and I think you HAVE to reEncode to trim , or is that just for video filters 
(-vf) ??

or can one do -codec copy -acodec copy :: reckon I am not sure - try it

so what you really want is a sh script to loop and you have to get the total 
duration in seconds subtract 5 sec from that start at the top and and your new 
duration is ( totalSec- 5 sec

try some of this
## this is NOT a fuctioning sh script but a sketch a copy & paste from some 
things I *have done It may help you get started ( or be very wrong )


i think you strat 5 sec deep
with a ss- 5
and then you want your duration [ -t ]  to be 10 sec less that the running time 
of the org
5 sec from top and then short another 5 - so as not all the way to end ..

#!/bin/bash
Src=
etn=mp4

###  for a file 2.mp4   I get seconds
##ffprobe -i 2.mp4 -show_entries format=duration -v quiet -of csv="p=0"
##yields
##865.365000
## but maybe you want to take just the whole sec ## so use some awk

cd $Src

for f in *.$etn ; do

durT=$(ffprobe -i $Src/$f -show_entries format=duration -v quiet -of
csv="p=0")

echo $durT
## get the whole sec NNN  of NNN.mmm
echo $durT | awk -F'.' '{print $1}'
durT1=$(echo $durT | awk -F'.' '{print $1}')

echo my sec = $durT1
## yields a number like so 865



durT=$(ffprobe -i $Src/$f -show_entries format=duration -v quiet -of
csv="p=0")

echo $durT
## get the whole sec NNN  of NNN.mmm
echo $durT | awk -F'.' '{print $1}'
durT1=$(echo $durT | awk -F'.' '{print $1}')

echo my sec = $durT1

#---/ do a subtract ..tot time in sec - 10 sec
durTless10=$(($durT1 - 600))
echo $durTless10

## i think is then your -t $durTless10

ffmpeg -ss 5 -i ${f%.*}.mp4 -t $durTless10 videocodec etc etc
${f%.*}_short.mp4


done



___
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] Compiling ffmpeg with libx264

2016-01-19 Thread Krishnan Unni
Moritz Barsnick  gmx.net> writes:

> 
> On Thu, Jan 14, 2016 at 07:14:26 -0500, Krishnan Unni wrote:
> > successfully. But when I try to compile x264 lib based on the guide
> > provided in ffmpeg wiki it's failing saying "could not identify os"
> 
> I can't even find that string or a similar one in the libx264 source
> tree. (Using 0c21480 from 20150901.)
> 
> Moritz
> ___
> ffmpeg-user mailing list
> ffmpeg-user  ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 


Hi Moritz

Sorry for the vague error. Here is the exact error message when I type
"./configure --enable-shared"
The error is "unknown system pc-msys, edit the configure".

Could you please help me with this.

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


Re: [FFmpeg-user] Trying to cut 5 sec of beginning and ending of mp4 files

2016-01-19 Thread Jim Shupert, Jr.

> Hi
>
> I am been trying almost every combination of switches to be able to cut 5
> sec from the start and 5 sec from the ending of variable length mp4 files.
>
> I have not been successful at doing either.  I guess I really don't
> understand the usage.  I have more than 100 files to do.
>
> Can anyone suggest a command string that will work?
>

read
https://www.ffmpeg.org/ffmpeg.html
about
-ss position
and
-t duration (input/output)

When used as an input option (before -i), limit the duration of data
read from the input file




so what you really want is a sh script to loop



5 sec fro top is easy cause they all start at 0
so approx something like : and you
ffmpeg -i < inFile> -ss 05.000 -vcodec $$  -acodec $$ 

you now have outFile  with the top 5 sec off

and I think you HAVE to reEncode to trim , or is that just for video
filters (-vf) ??

or can one do -codec copy -acodec copy :: reckon I am not sure - try it

so what you really want is a sh script to loop
and you have to get the total duration in seconds
subtract 5 sec from that
start at the top and and your new duration is ( totalSec- 5 sec

try some of this
## this is NOT a fuctioning sh script but a sketch
a copy & paste from some things I *have done
It may help you get started ( or be very wrong )


i think you strat 5 sec deep
with a ss- 5
and then you want your duration [ -t ]  to be 10 sec less that the running
time of the org
5 sec from top and then short another 5 - so as not all the way to end ..

#!/bin/bash
Src=
etn=mp4

###  for a file 2.mp4   I get seconds
##ffprobe -i 2.mp4 -show_entries format=duration -v quiet -of csv="p=0"
##yields
##865.365000
## but maybe you want to take just the whole sec
## so use some awk

cd $Src

for f in *.$etn ; do

durT=$(ffprobe -i $Src/$f -show_entries format=duration -v quiet -of
csv="p=0")

echo $durT
## get the whole sec NNN  of NNN.mmm
echo $durT | awk -F'.' '{print $1}'
durT1=$(echo $durT | awk -F'.' '{print $1}')

echo my sec = $durT1
## yields a number like so 865



durT=$(ffprobe -i $Src/$f -show_entries format=duration -v quiet -of
csv="p=0")

echo $durT
## get the whole sec NNN  of NNN.mmm
echo $durT | awk -F'.' '{print $1}'
durT1=$(echo $durT | awk -F'.' '{print $1}')

echo my sec = $durT1

#---/ do a subtract ..tot time in sec - 10 sec
durTless10=$(($durT1 - 600))
echo $durTless10

## i think is then your -t $durTless10

ffmpeg -ss 5 -i ${f%.*}.mp4 -t $durTless10 videocodec etc etc
${f%.*}_short.mp4


done



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


Re: [FFmpeg-user] Let ffmpeg pick correct fps from stdin

2016-01-19 Thread Jean-Marie Baran



On 15/01/2016 16:33, Jean-Marie Baran wrote:



On 15/01/2016 10:52, Moritz Barsnick wrote:

On Fri, Jan 15, 2016 at 10:11:09 +0100, Moritz Barsnick wrote:

Would it be worth an attempt to add an option to ffmpeg to take the
timestamps from "arrival time" (time of day)? I'll have a look at this
- sometime.

Oh, sorry, that option does exist: "-use_wallclock_as_timestamps".

If I record my incoming MJPEG multipart/alternative HTTP stream with
"-re -use_wallclock_as_timestamps 1", the timestamps look okay, though
astonishingly quite strictly aligned to full seconds. (My stream can
vary between 1 fps and 5 fps.)


Using "-re -use_wallclock_as_timestamps 1" seems right, but sadly it 
trigger some «Non-monotonous DTS» warning message, and the resulting 
video now plays too slowly. But this time the fps recorded is 16.52 
fps which is better than the 25 of before :


ffmpeg -y -thread_queue_size 1024 -f s16le -ar -i 
tcp://localhost:5419?listen=1 -re -use_wallclock_as_timestamps 1 -f 
mjpeg -thread_queue_size 1024 -i -c:v libx264 -preset veryfast -crf 28 
-vsync 0 -strict -2 -acodec aac -threads 0 -ar 44100 file.mp4



Well, I somewhat solved the problem by removing the "-re" option which 
was preceding "-use_wallclock_as_timestamps". The fps is now guessed 
correctly, and the DTS/PTS things seem to be right. The video plays at 
correct speed when read by ffplay or VLC or whatever, even if I still 
get some warning messages «Past duration 0.xxx too large». If anyone 
gets an idea about this, I'll gladly hear it.


Here is the trace:

ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (GCC)
  configuration: --arch=arm --target-os=android --enable-cross-compile
  libavutil  54. 31.100 / 54. 31.100
  libavcodec 56. 60.100 / 56. 60.100
  libavformat56. 40.101 / 56. 40.101
  libavfilter 5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
Input #0, s16le, from 'tcp://localhost:44722?listen=1':
  Duration: N/A, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
D/AMA.sr.AbusService( 2082): Calling recording_started()
D/amaCnxMgr.pyc(  367): AMA.amaAbusService - recording_started() return 
code: 0
E/amaCnxMgr.pyc(  367): AMA.amaAbusService - Cannot notify the UI that 
the record started: callback not defined

[mjpeg @ 0xb6427c00] Changeing bps to 8
Input #1, mjpeg, from 'pipe:':
  Duration: N/A, start: 1453192324.981191, bitrate: N/A
Stream #1:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 
720x480 [SAR 1:1 DAR 3:2], 25 tbr, 1200k tbn, 25 tbc
[swscaler @ 0xb6517000] deprecated pixel format used, make sure you did 
set range correctly

[libx264 @ 0xb6428800] using SAR=1/1
[libx264 @ 0xb6428800] using cpu capabilities: ARMv6 NEON
[libx264 @ 0xb6428800] profile High, level 3.0
[libx264 @ 0xb6428800] 264 - core 148 - H.264/MPEG-4 AVC codec - 
Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: 
cabac=1 ref=1 deblock=1:-1:-1 analyse=0x3:0x113 me=hex subme=2 psy=1 
psy_rd=1.00:0.15 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 
lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf 
mbtree=1 crf=28.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 
aq=1:1.00

Output #0, mp4, to '/storage/emulated/0/DCIM/AMA/NP/record/./test.mp4':
  Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), 
yuv420p, 720x480 [SAR 1:1 DAR 3:2], q=-1--1, 25 fps, 12800 tbn, 25 tbc

Metadata:
  encoder : Lavc56.60.100 libx264
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, mono, 
fltp, 128 kb/s

Metadata:
  encoder : Lavc56.60.100 aac
Stream mapping:
  Stream #1:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Past duration 0.974800 too large
Past duration 0.746681 too large
Past duration 0.765221 too large
Past duration 0.888924 too large
Past duration 0.992058 too large
Past duration 0.631645 too large
Past duration 0.957054 too large
Past duration 0.698036 too large

--
*Jean-Marie Baran*
AMA developer

Skype: jeanmarie.baran
Email: jean-marie.ba...@ama.bzh 
www.advancedmedicalapplications.com 


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


Re: [FFmpeg-user] A video file with srt file question

2016-01-19 Thread Moritz Barsnick
On Mon, Jan 18, 2016 at 18:28:29 -0700, jd1008 wrote:
> I did. I still hear the non-English speech louder than the English speech.
> The English speech seems to have been encoded into the video :(

Since you're not showing us the command line you're using, and neither
the complete, uncut console output, you have people guessing at how
your media file is formatted and what you're trying to achieve. Please
give more information is you want assistance!

IF (if!) the Englisch subtitles and the English audio happen to be
separate tracks (we would know if you had shown your console output!),
it's just a matter of a copy operation where those tracks are not
selected/mapped.

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