Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Renaming Carrierwave extension before saving it [on hold]
2 septembre 2013, par JanI am trying to get a mp3 version of a wav which gets watermarked by using ffmpeg.
Spoken in steps:
- upload wav (works)
- watermark it (works also)
- make a mp3 version (does not work)
The upload and watermarking step is done correctly.
My problem is, that ffmpeg evaluates the destination format by reading its file extension name (which is wav in my case). How can I rename the extension before it get's saved?
ffmpeg -i watermarked.wav -acodec libmp3lame -f mp3 watermarked.wav HOW CAN I RENAME THIS BEFORE IT GET SAVED? ^^^
The above snip (-f forcing the codec and format) does NOT it's job and
def full_filename(for_file=file) super.chomp(File.extname(super)) + '.mp3' end
is happening too late (after processing)
Do I have to make a seperate (second) tempfile and remove the watermarked.wav? Or do I have to make a "seperate process" and take ? And when yes, how?
I am trying this since weeks...
many, many, many thanks in advance
-
System.Diagnostics.Process calling FFMPEG fails with international character
1er septembre 2013, par Petter BrodinI'm using
System.Diagnostics.Process
to launch FFMPEG, and it works as intended on paths that only contain non-special characters.string strParam = "C:\myFolder\foo.png"; Process ffmpeg = new Process(); ffmpeg.StartInfo.UseShellExecute = false; ffmpeg.StartInfo.RedirectStandardOutput = true; ffmpeg.StartInfo.FileName = Path_FFMPEG; ffmpeg.StartInfo.Arguments = strParam; ffmpeg.Start(); ffmpeg.WaitForExit();
The above example works perfectly, but if I use "c:\myFolder\føø.png" I get the following error message:
Could find no file with path 'C.\myFolder\f├©├©.png'
This looks like some kind of encoding error, but that's where my ideas stop.
-
FFmpeg for Windows Phone development
1er septembre 2013, par Akash LanghaniI have used FFmpeg in ASP.Net web-based applications. Now I want to use it for Windows Phone development.
Is it possible to use it? If yes, then how?
-
FFmpeg : AAC muxing into two different files in the same loop : The 2nd file is corrupted [on hold]
1er septembre 2013, par user2677612We are using FFmpeg libraries git-ee94362 libavformat v55.2.100. Our purpose is to mux synthetic video and audio-file audio to 2 different files (in the same loop) with the the same format and parameters.
With MP3 input, both M3U8 outputs are OK:
Output file #0: Total number of frames is: video = 229, audio = 347.
Output file #1: Total number of frames is: video = 229, audio = 347.
But with AAC input, the 1st M3U8 output is OK, whereas the 2nd one - is not:
Output file #0: Total number of frames is: video = 403, audio = 690.
Output file #1: Total number of frames is: video = 3, audio = 690.
It is exactly the same code in the main loop. We do not use the "aac_adtstoasc" filter in case of M3U output. By the way, the problem exist both with and without the filter, since in case of MP4 output, the 1st output file is OK, whereas the 2nd one - is not, - as well.
Moreover:
1) I have implemented the main loop as Windows threads, separated for every output file.
2) I have separated input files, as well (i.e. use two identical input files). The problem remains!
It seems that video PTS begins to be corrupted (wrong-calculated) for the 2nd (3rd, etc.) output file.
If somebody is known about such a problem? If yes, what can be a solution/workaround? Thank you.
-
Concatenating video files with ffmpeg, no sound in output file [on hold]
1er septembre 2013, par JunaidI am concatenating different AVI video files. The input files has been specified in
input.txt
in the order required. First video file does not have sound track, but subsequent files have.After completion the resulting the operation, the output does not have audio!
If I remove first video files from input then resulting video gets sound. So it means the output format follows the first item in input list. How can I solve this problem.
Please suggest the options in ffmpeg; not in any other tools like mencoder.
ffmpeg -f concat -i inputs.txt -c copy test.avi ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers built on Jun 27 2013 09:22:45 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1) configuration: --prefix=/home/junaid/ffmpeg_build --extra-cflags=-I/home/junaid/ffmpeg_build/include --extra-ldflags=-L/home/junaid/ffmpeg_build/lib --bindir=/home/junaid/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab libavutil 52. 37.101 / 52. 37.101 libavcodec 55. 17.100 / 55. 17.100 libavformat 55. 9.100 / 55. 9.100 libavdevice 55. 2.100 / 55. 2.100 libavfilter 3. 77.101 / 3. 77.101 libswscale 2. 3.100 / 2. 3.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 3.100 / 52. 3.100 [concat @ 0x335a880] Invalid stream index 1 [concat @ 0x335a880] max_analyze_duration 5000000 reached at 5000000 microseconds Input #0, concat, from 'inputs.txt': Duration: N/A, bitrate: N/A Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (xvid / 0x64697678), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc Output #0, avi, to 'test.avi': Metadata: ISFT : Lavf55.9.100 Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 25 fps, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help [concat @ 0x335a880] Invalid stream index 1 Last message repeated 6368 times frame= 3793 fps=0.0 q=-1.0 size= 11108kB time=00:02:37.96 bitrate= 576.1kbits/Invalid stream index 1 [concat @ 0x335a880] Invalid stream index 1 Last message repeated 7173 times frame= 7921 fps=7801 q=-1.0 size= 22928kB time=00:05:30.16 bitrate= 568.9kbitsInvalid stream index 1 [concat @ 0x335a880] Invalid stream index 1 Last message repeated 6614 times frame=11729 fps=7688 q=-1.0 size= 27057kB time=00:08:08.96 bitrate= 453.3kbitsInvalid stream index 1 [concat @ 0x335a880] Invalid stream index 1 Last message repeated 6247 times frame=15324 fps=7565 q=-1.0 size= 44956kB time=00:10:38.92 bitrate= 576.4kbitsInvalid stream index 1 [concat @ 0x335a880] Invalid stream index 1 Last message repeated 6553 times frame=19096 fps=7516 q=-1.0 size= 64014kB time=00:13:16.24 bitrate= 658.6kbitsInvalid stream index 1 [concat @ 0x335a880] Invalid stream index 1 Last message repeated 6753 times frame=22983 fps=7558 q=-1.0 size= 79848kB time=00:15:58.36 bitrate= 682.5kbitsInvalid stream index 1 [concat @ 0x335a880] Invalid stream index 1 Last message repeated 7011 times frame=27019 fps=7610 q=-1.0 size= 94130kB time=00:18:46.68 bitrate= 684.4kbitsInvalid stream index 1 [concat @ 0x335a880] Invalid stream index 1 Last message repeated 1302 times frame=27772 fps=7658 q=-1.0 Lsize= 96618kB time=00:19:18.08 bitrate= 683.5kbits/s video:95921kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.726908%