Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Running multiple commands on FFMPEG Android Studio
2 juin 2016, par Ali AsheerI have compiled https://github.com/WritingMinds/ffmpeg-android-java on my Android Studio and it's working fine, i have successfully executed these 3 commands:
Adding text:
new String[]={"-i",file1.toString(), "-i", water,"-filter_complex","drawtext=fontsize=60:fontfile=/system/fonts/DroidSans.ttf:fontcolor=green:text=AAAA:x=(w-tw)/2:y=(50-th)/2", final_output}
Adding Watermark:
new String[]{"-i",inputVideoFilePath, "-i",overlayImagePath,"-preset", "ultrafast","-filter_complex", "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2", "-codec:a", "copy", outputVideoFilePath
Add Padding:
new String[]{"-i",file1.toString(), "-i", water,"-filter_complex","[0:v]pad=iw:ih+100:0:(oh-ih)/2:color=white", final_output2};
Now i want to combine these three how do i accomplish that? So far i have tried padding with text:
new String[]{"-i",file1.toString(), "-i", water,"-filter_complex","[0:v]pad=iw:ih+100:0:(oh-ih)/2:color=white","drawtext=fontsize=60:fontfile=/system/fonts/DroidSans.ttf:fontcolor=green:text=AAAA:x=(w-tw)/2:y=(50-th)/2", final_output2};
But i get this error :
Input #1, png_pipe, from '/storage/emulated/0/watermark.png': Duration: N/A, bitrate: N/A Stream #1:0: Video: png, rgb24(pc), 200x125, 25 tbr, 25 tbn, 25 tbc [NULL @ 0xb5c9fc00] Unable to find a suitable output format for 'drawtext=fontsize=60:fontfile=/system/fonts/DroidSans.ttf:fontcolor=green:text AAAA:x=(w-tw)/2:y=(50-th)/2' drawtext=fontsize=60:fontfile=/system/fonts/DroidSans.ttf:fontcolor=green:text=AAAA:x=(w-tw)/2:y=(50-th)/2: Invalid argument
Any kind of help would be great!
-
Where is a place where ffmpeg player connects to server and starts buffering ?
2 juin 2016, par DimaMy app shows HLS streams, for showing I use ffmpeg player. A problem is that the player doesn't change streams url relatively to current bandwidth. So I implemented logic about calculating bandwidth, but I cannot find where I have to implement url changing. I figured out that read_data method responsibles for buffering data. In this case I have to change url before calling read_data but I cannot find from what place it calls. So my question is Where is that place where the player connects to server and starts buffering data? Maybe someone faced with same problem. Or knows ffmpeg well and know this place where is better to place change url logic. Please let me know, I open for all proposals
-
encoder 'aac' not enable exception while processing video for slowing
2 juin 2016, par Amna MirzaWhile chaging playback speed of video (making video slow) following exception occurs using FFMPEG android java library.
[aac @ 0x416c26f0] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
-
ffmpeg image extracted from video, quality issue
2 juin 2016, par RahulI am trying to extract the jpeg images from the rtsp stream. I observed that generated image quality is not good. bottom portion of the image is always blurred or pixelated.
If i stream same video in VLC player everything works as expected. Has anyone seen this issue before any help is greatly appreciated. Image generated from ffmpeg
-
ffmpeg not working in script - moov atom not found
2 juin 2016, par user1490563I made a simple script that divides a
flv
file into multiple parts, converts them all to.mp4
individually and then merge all of them to form a final mp4 file. I did this to save time and convert large files in parallel.However, I am stuck because the command that normally runs on command line for
ffmpeg
, doesn't run via script.I am kind of stuck here and will like to have some assistance.
#!/bin/bash #sleep 5 filenametmp=$1; filename=`echo "$filenametmp" | awk '{split($0,a,"."); print a[1]}'` echo $filename output="$filename-output" filenamewithoutpath=`echo "$output" | awk '{split($0,a,"/"); print a[4]}'` echo $output $filenamewithoutpath /usr/bin/ffmpeg -i $filenametmp -c copy -map 0 -segment_time $2 -f segment $output%01d.flv #sleep 10 #echo "/bin/ls -lrt /root/storage/ | /bin/grep $filenamewithoutpath | /usr/bin/wc -l" filecounttmp=`/bin/ls -lrt /opt/storage/ | /bin/grep $filenamewithoutpath | /usr/bin/wc -l` filecount=`expr $filecounttmp - 1` echo $filecount for i in `seq 0 $filecount` do suffix=`expr 0000 + $i` filenametoconvert="$output$suffix.flv" convertedfilename="$output$suffix.mp4" echo $filenametoconvert /usr/bin/ffmpeg -i $filenametoconvert -c:v libx264 -crf 23 -preset medium -vsync 1 -r 25 -c:a aac -strict -2 -b:a 64k -ar 44100 -ac 1 $convertedfilename > /dev/null 2>&1 & done sleep 5 concatstring="" for j in `seq 0 $filecount` do suffix=`expr 0000 + $j` convertedfilenamemp4="$output$suffix.mp4" #concatstring=`concat:$concatstring|$convertedfilenamemp4` echo "file" $convertedfilenamemp4 >> $filename.txt #ffmpeg -i concat:"$concatstring" -codec copy $filename.mp4 #ffmpeg -f concat -i $filename.txt -c copy $filename.mp4 done echo $concatstring ffmpeg -f concat -i $filename.txt -c copy $filename.mp4 rm $output* rm $filename.txt
I run any flv file like this :
./ff.sh /opt/storage/tttttssssssssss_573f5b1cd473202daf2bf694.flv 20
I get this error message :
moov atom not found
I am on Ubuntu 14.04 LTS version, standard installation of ffmpeg.