FFmpeg PNG+MP3 = FLV - ffmpeg

I need to create a FLV video from a MP3 file and a PNG image, and I tried the following ffmpeg command:
/usr/bin/ffmpeg -y -i file.png -i file.mp3 -acodec libmp3lame -vcodec flv -y -ac 1 -ab 32000 -ar 22050 file.flv
I obtained a FLV video file with the correct audio and the image, but it is not seekable in VLC, so I'm looking where I'm wrong.
Could you help me, please?
Thank you very much!

Related

Ffmpeg Add image overlay on rmtp stream

I have a m3u8 input and I convert it to a rmtp stream using this command:
ffmpeg -re -i "https://<url>.m3u8" -af asetpts=N/SR/TB -c:v copy -c:a aac -ar 44100 -ab 128k -ac 2 -f flv -flvflags no_duration_filesize -s 1920x1080 "rtmp://<url>"
But I would like to add my logo on the top right part of the stream, I didn't manage to do it, do someone know how to do it?
Thanks

ffmpeg convert audio to ogg and keep album cover

If I convert an audio file with an album cover thank's to:
ffmpeg -i sample1.flac -ar 48000 -vn -c:a libvorbis -b:a 320k sample1.ogg
My sample1.ogg file doesn't have any album cover. Is there a way to ask explicitly to ffmpeg to keep the cover ?
instead "-vn" write "-c:v libtheora -q:a 10".
-vn - means no video, picture is frame of video in ffmpeg
Sum up of answers I found: Remove the option -vn which means: no video, because thumbnail are frame of video. Use libtheora instead of libvorbis. If you get a bitrate error, remove option -b:a 320k. At the end we get:
ffmpeg -i file.flac -c:v libtheora -q:v 10 -c:a libvorbis file.ogg
This gives you a file with an audio and a video content.
If you prefer to extract thumbnail in a separate file (to re-add it later for example), use:
ffmpeg -i file.flac -an -vcodec copy thumbnail.jpg
Thank's to Баяр Гончикжапов for his help and answers!

ffmpeg error when I make TS file

I use ffmpeg to make video from audio/image to mp4.
I want merge/concatenate two mp4 video.
I have this to make mp4 video:
ffmpeg -i "background.png" -i "audio.mp3" -y -r 30 -b 2500k -acodec ac3 -ab 384k -vcodec mpeg4 "result.mp4"
This, it works!
To concatenate two mp4 video, I must pass by ts files.
ffmpeg -i "result.mp4" -codec copy -bsf:v hevc_mp4toannexb intermediate1.ts
But, I have this error:

Transcoding with ffmpeg libfaac reduces the audio duration

I have to transcode a mpegts file: input.ts(H.264 and AAC)
So I use the following command line:
ffmpeg -y -i input.ts -acodec libfaac -vcodec copy out.ts
But I find that the duration of output.ts's audio is shorter than that of the input.ts!
If I do the following iterations, the output's audio will be shorter and shorter.
ffmpeg -y -i out.ts -acodec libfaac -vcodec copy out-iter1.ts
ffmpeg -y -i out-iter1.ts -acodec libfaac -vcodec copy out-iter2.ts
ffmpeg -y -i out-iter2.ts -acodec libfaac -vcodec copy out-iter3.ts
ffmpeg -y -i out-iter3.ts -acodec libfaac -vcodec copy out-iter4.ts
ffmpeg -y -i out-iter4.ts -acodec libfaac -vcodec copy out-iter5.ts
My ffmpeg's version is 0.6.6. libfaac's version is 1.28.
input.ts's audio duration is 10.432 seconds. out-iter5.ts's audio duration is 10.56 seconds
And I have also tried ffmpeg with version 0.11.
And it makes the audio longer than the original input.
So my question is: how to make sure the output's audio duration is same as the input's audio.
Since libfaac will make the audio shorter, how can I compensate for it?
(For some reason I can't use -acodec copy directly.) Any suggestions?

Missing of image when conversion from flv to 3gp

I use in command line for ffmpeg
-i Input.flv -vcodec h263 -b 256k -r 15 -s 320x240 -acodec libopencore_amrnb \
-ab 7.4k -ar 8000 -ac 1 -f 3gp Output.3gp
The result is audio-only, without video. But when the 176x144, it works great.
What's wrong in using of frame size (320x240)? And what is the solution?
Are you sure there is no video in the resulting Output.3gp file? Is it possible that the end device does not support 320x240?
It would help significantly if you were to include the entire FFmpeg output in your question.

Resources