VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. I posted about this on Stack Overflow, but I actually got zero responses, so hopefully I can get help here.

    I wasn't sure if this should be posted under Video Streaming or Conversion, so if it needs to be moved I understand.

    First let me paste what I posted at SO:

    I have a media site where I can upload video files. After upload, they are converted to MP4 using ffmpeg and then ffmpeg2theora converts that to OGV.

    I have recently discovered that some videos that I upload do not play any sound when using the HTML5 player in Firefox/Chrome, but do have sound when using the fallback Flash player in IE.

    I've downloaded and checked the processed files and they both still have sound, so the issue seems to be related to the HTML5 player rather than loss of audio during processing.

    I double-checked my ffmpeg command line and realized I didn't specify any audio options:

    ffmpeg2 -i "inputfile" -vcodec libx264 -profile:v baseline -level 3 "outputfile" 2>&1'

    Since only some of the files didn't play audio while some did, this led me to believe that the audio track was being copied directly during the processing and if the original file didn't have audio supported by HTML5, then it output file would have the same result.

    I realized this means I have to force re-encoding of the audio stream, so I tried a few things but had no success with any.

    I tried 'libfaac' as many online posts suggested, but this resulted in an 'unknown codec' error. Further reading led me to find that 'libfaac' was no longer included with ffmpeg builds. I must have gotten mine after that.

    I tried the "Native AAC" codec by simply using the following options:

    ffmpeg2 -i "inputfile" -vcodec libx264 -profile:v baseline -level 3 -acodec aac "outputfile" 2>&1'

    With this I got the following error: "Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height".

    The only codec that didn't give me some sort of error was 'libvo_aacenc'. However, even though the processing completed without error, I still got no audio when played in the HTML5 player.

    What am I doing wrong?

    NOTE (just in case this is relevant): This is currently being run on a Windows host using the ffmpeg executable, but we will soon be moving to a Linux host.
    Ultimately, all I need is to make sure that the videos can be played across all major browsers and such (of course), so any help to lead me toward that goal is very much appreciated. Hopefully it can be as simple as having a working ffmpeg command line.

    Thanks.


    UPDATE:
    I just noticed that I'm having the same problem with audio files. Some I can hear and some I can't.
    Last edited by vertigoelectric; 9th May 2013 at 14:26.
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Perhaps it would be easier to help if you have a link to download the conversion, or use MediaInfo to see what the audio is and how it differs from those that play correctly.
    Quote Quote  
  3. I tried 'libfaac' as many online posts suggested, but this resulted in an 'unknown codec' error. Further reading led me to find that 'libfaac' was no longer included with ffmpeg builds.
    ffmpeg like it's shipped with most distros is totally out-of-date -> normally I would always recommend to build ffmpeg manually (there are tons of scripts out there to automate the build process with all the wanted plugins)

    ffmpeg2 -i "inputfile" -vcodec libx264 -profile:v baseline -level 3 -acodec aac "outputfile" 2>&1'

    With this I got the following error: "Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height".
    Then how about adding some parameters which specify the audio&video settings some more?

    The only codec that didn't give me some sort of error was 'libvo_aacenc'. However, even though the processing completed without error, I still got no audio when played in the HTML5 player.

    What am I doing wrong?
    you might want to configure bit rate, sample rate , channel count,...

    + I Agree with Budman1 a working and a not working sample could help.

    Cu Selur

    Ps.: I would recommend to remux the output with mp4box since, ffmpegs mp4s tend to cause problems.
    Quote Quote  
  4. Hey guys. I really appreciate your help, but after jumping the gun in assuming that something was wrong with the file, it seems that it's only doing this on MY computer... so it's my browser or PC that is the culprit. I'm so sorry for wasting your time and sincerely appreciate the time you put into trying to help.
    Quote Quote  
  5. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    This probably doesn't help, but I've found a lot of inconsistency with ffmpeg based encoders. For a linux example, I've found that using the file export/convert function in openshot has successfully converted a number of video files that nothing else I've tried would work on. Including other encoders that use ffmpeg.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!