[FFmpeg-user] Efficiently reading a remote file with ffmpeg
My use case requires transcoding a remote file that’s can’t be stored locally. I was hoping to use http protocol to input the file into ffmpeg. This works, but I’m observing this to be a very expensive operation, so am looking for suggestions. What I see is that ffmpeg starts out with a Range request “0-“ (which brings in the entire file), followed by a number of open-ended requests (no ending offset) at different positions, each of which makes the http server return the large chunks of the file again, from the starting position to the very end. For example, http requests for a short 10MB file look like this: bytes=0- bytes=10947419- bytes=36- bytes=3153008- bytes=5876422- Is what I’m seeing matching what people thing should be happening ? If so, is there another method that would be better for my use case. I control the server where the video file resides, so I’m flexible in what runs there. Any help is greatly appreciated ___ 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
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). (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. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] MPD file creation using FFMpeg fails validation check
> Not sure why ffmpeg has not fixed this as yet. Not sure why you didn't send a patch (made with "git format-patch") to fix this as yet... Please do not top-post here! Thank you for analyzing this, Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] MPD file creation using FFMpeg fails validation check
Just found out that the MPD validation issue was because the MPD attributes for xmlns and xsi:schemaLocation should be this xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011" instead of xmlns="urn:mpeg:DASH:schema:MPD:2011" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011" Not sure why ffmpeg has not fixed this as yet. But now that MPD validation has succeeded I am getting Schematron validation error! This is the error location="/*[local-name()='MPD' and namespace-uri()='urn:mpeg:dash:schema:mpd:2011']"> The On-Demand profile shall be identified by the URN "urn:mpeg:dash:profile:isoff-on-demand:2011". The live profile shall be identified by the URN "urn:mpeg:dash:profile:isoff-live:2011". The main profile shall be identified by the URN "urn:mpeg:dash:profile:isoff-main:2011". The full profile shall be identified by the URN "urn:mpeg:dash:profile:full:2011". The mp2t-main profile shall be identified by the URN "urn:mpeg:dash:profile:mp2t-main:2011". The mp2t-simple profile shall be identified by the URN "urn:mpeg:dash:profile:mp2t-simple:2011".The Dolby AC-4 profile shall be identified by " http://dashif.org/guidelines/dashif#ac-4";. The multichannel audio extension with MPEG-H 3D Audio profile shall be identified by " http://dashif.org/guidelines/dashif#mha1";. Schematron validation not successful - DASH is not valid! Appreciate your help. Regards, *Rahul * On Sat, Jan 16, 2016 at 12:47 PM, Rahul Prasad wrote: > TL;DR DASH manifest file (mpd) created using ffmpeg fails the validation > test and also fails to play. > > This is what I did: > > Step 1: Transcoded 2 video files with different resolution and bitrate > (without audio stream) > > > > > *ffmpeg -y -i file1.mp4 -c:v libvpx -vf scale=-2:270 -quality good > -cpu-used 0 -b:v 400k -maxrate 400k -bufsize 400k -keyint_min 150 -g 150 > -an -f webm -dash 1 file1-270.webmffmpeg -y -i file1.mp4 -c:v libvpx -vf > scale=-2:360 -quality good -cpu-used 0 -b:v 1200k -maxrate 1200k -bufsize > 1200k -keyint_min 150 -g 150 -an -f webm -dash 1 file1-360.webm* > Step 2: Separately transcoded the audio stream > > > *ffmpeg -y -i file1.mp4 -c:a libvorbis -b:a 128k -vn -f webm -dash 1 > file1-audio.webm* > Step 3: Created the Dash manifest file > > > *ffmpeg -f webm_dash_manifest -i file1-270.webm -f webm_dash_manifest -i > file1-360.webm -f webm_dash_manifest -i file1-audio.webm -c copy -map 0 > -map 1 -map 2 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1 > id=1,streams=2" file1.mpd* > When I run this I get > this > warning "Output file is empty, nothing was encoded (check -ss / -t / > -frames parameters if used)". However, the output file > gets > created. > > Now when I tried to run this file through DASH validation ( > http://dashif.org/conformance.html) it said "MPD validation failed". > Another validation tool (http://www-itec.uni-klu.ac.at/dash/?page_id=605) > threw this error > > > *Line:Col[8:57]:cvc-elt.1: Cannot find the declaration of element > ‘MPD’.MPD validation not successful – DASH is not valid!* > > > > Regards, > Rahul Prasad > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user