Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

I get a black screen with audio after merging a png and wav file with ffmpeg


I have merged a png image with a wav file into an mp4 file using ffmpeg...

ffmpeg -loop 1
-i "C:\reiTemp\2caf8d21-b07d-407f-9b2e-ebe84390d114.png"
-i "C:\reiTemp\244f4815-b3fb-4f70-8f1c-37edad22212c.wav"
-c:v libx264 -strict experimental
-codec:v mpeg4
-vf "scale=400:300"
-t 21.3
"C:\Domains\realityengineering.net\wwwroot\media\guru\130438044361506556\06fa3252-783e-461f-8280-8cd1112af295.mp4"

After the merge I can play it in QuickTime but when I try to play it in JWPlayer 5.9 I can hear the audio but I cannot see the image, the screen is black.

http://media.howdoyouguru.com/guru/130438044361506556/06fa3252-783e-461f-8280-8cd1112af295.mp4

I tried codec h264 but then I couldn't see the image in QuickTime or JWPlayer.

Thanks you for the help!!
Gary

14 Community Answers

MisterNeutron

Best Answer 

Run your MP4 through Handbrake with the default options, plus check "Web optimized."

http://handbrake.fr/

View in conversation

MisterNeutron

Best Answer  User  
0 rated :

Run your MP4 through Handbrake with the default options, plus check "Web optimized."

http://handbrake.fr/

gary

User  
0 rated :

This is a asp.net web handler (there are multiple web handlers) that use ffmpeg to merge audio and video. It would take a lot of effort to change everything over to handbrake, if that's even possible.

MisterNeutron

User  
0 rated :

Well, at least try it, just to determine whether or not it's an encoding problem. And it does, absolutely, have to be encoded with H.264 - JW Player doesn't support anything else.

Ethan Feldman

JW Player Support Agent  
0 rated :

http://support.jwplayer.com/customer/portal/articles/1403635-media-format-support

gary

User  
0 rated :

That worked with handbrake. Then I changed the codec back to h264 and I still get a black screen.

gary

User  
0 rated :

This is the command line options I used with ffmpeg...
-loop 1
-i "C:\reiTemp\aa2116f1-05f4-4c07-9981-07d8d38588db.png"
-i "C:\reiTemp\0a8c84a6-99b3-4aca-9d6c-d5f2725fd713.wav"
-c:v libx264 -strict experimental
-codec:v h264
-vf "scale=400:300"
-t 21.3 "C:\Domains\realityengineering.net\wwwroot\media\guru\130438044361506556\fe390854-10d3-4efd-97f2-d9f0b9ed93db.mp4"

Thanks

Ethan Feldman

JW Player Support Agent  
0 rated :

What does experimental do?

gary

User  
0 rated :

I'm not sure. I got the basic options from another post online. I've removed it but it didn't make any difference.

gary

User  
0 rated :

I found it in the documentation...

strict integer (decoding/encoding,audio,video)’
Specify how strictly to follow the standards.

Possible values:

‘very’
strictly conform to a older more strict version of the spec or reference software

‘strict’
strictly conform to all the things in the spec no matter what consequences

‘normal’
‘unofficial’
allow unofficial extensions

‘experimental’
allow non standardized experimental things, experimental (unfinished/work in progress/not well tested) decoders and encoders. Note: experimental decoders can pose a security risk, do not use this for decoding untrusted input.

gary

User  
0 rated :

I added the -strict option back in and set it to strict, no change

Ethan Feldman

JW Player Support Agent  
0 rated :

Hm, I am not that familiar with ffmpeg. I know that HandBrake works though.

gary

User  
0 rated :

Does handbrake have a command line interface?

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes.

https://trac.handbrake.fr/wiki/CLIGuide

MisterNeutron

User  
0 rated :

I know very little about ffmpeg, and nothing about the option to merge files, but try starting with these arguments, and no others:

-i "yourfile" -vf -acodec libvo_aacenc -vcodec libx264 -movflags faststart

This question has received the maximum number of answers.