[FFmpeg-user] Convert .256 to avi with audio

Steve Boyer steveboyer85 at gmail.com
Wed Jul 29 22:33:31 CEST 2015

On Wed, Jul 29, 2015 at 3:09 PM, André Luís Duarte
<andrelduarte-at-yahoo.com.br at ffmpeg.org> wrote:
> Hi guys. Need to do a skill in a video that was recorded in a security camera and the video file has the extension .264. The video file can be viewed in the program provided by company (H264Player). The video is displayed with sound normally for this player. I need to check the sound level contained in the video files, for that would use some software that exhibits me this information. I tried to convert the file to avi using the following command in ubuntu 14:04:
> ffmpeg sudo -i -f H264 Video1.264 -vcodec copy -acodec copy --the filename.avi.

Probably shouldn't run ffmpeg as root, as your resulting video will be
owned by root and can easily cause all kinds of permission issues.

>     Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 352x240, 25 fps, 25 tbr, 1200k tbn, 50 tbc
> Output #0, avi, to 'Video1.avi':
>   Metadata:
>     ISFT            : Lavf56.40.101
>     Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 352x240, q=2-31, 25 fps, 25 tbr, 50 tbn, 50 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help

We see that the audio stream isn't recognized as going into the final
AVI file here.

> ...
>     Last message repeated 1 times
> frame=107918 fps=15109 q=-1.0 Lsize=  372978kB time=01:11:56.94 bitrate= 707.8kbits/s
> video:367913kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.376595%
> The conversion was successful, but the audio is not inserted in the output file filename.avi.
> I tried to visualize using VLC, the VLC displays the video (Vídeo1.264) correctly, but without audio as well.

What I'm guessing is that the "-f H264" is telling ffmpeg that you
want to export a .264 container format - which only contains video
information - and that is why you aren't getting audio. ffmpeg will
natively look at the output file (a .AVI here) and will adjust
automatically, or you can specify "-f AVI" instead. I'd honestly, just
remove the "-f" option entirely.


More information about the ffmpeg-user mailing list