dust42 1 Posted December 17, 2024 Posted December 17, 2024 i recently came across a video that refused to play, its normal, now and then, even though the video was marked as h264 however, i tried re-encoding the video multiple times and it still wouldn't play, played fine via vlc on the desktop these were the ffmpeg settings i was using ffmpeg -y -i x.mkv -c:v libx264 -preset ultrafast -qp 0 y.mp4 and ffmpeg -y -i x.mkv -map 0:v:0 -map 0:a:0 -vcodec libx264 -acodec aac -map_metadata -1 y.mp4 both of the above did not work. would appreciate if anyone can share the correct settings for ffmpeg to encode a video to play with emby android server thanks
Luke 42077 Posted December 17, 2024 Posted December 17, 2024 Hi, have you tried the emby server convert media feature? Convert Media 1
dust42 1 Posted December 18, 2024 Author Posted December 18, 2024 @Lukethanks for replying i haven't tried the convert feature because my android device has only 4gb ram i do have a pc that has 8gb ram and is running on linux so was hoping for a solution using ffmpeg or handbrake or something similar thanks
visproduction 315 Posted December 19, 2024 Posted December 19, 2024 This app could possible fix your MP4 video and it works from command line: https://www.videohelp.com/software/MP4Box 1
dust42 1 Posted December 19, 2024 Author Posted December 19, 2024 3 hours ago, visproduction said: This app could possible fix your MP4 video and it works from command line: https://www.videohelp.com/software/MP4Box thanks for replying, is there a specific preset you use? , thanks
visproduction 315 Posted December 19, 2024 Posted December 19, 2024 (edited) Dust, when you run it, the app actually auto fixes a lot of the metadata issues. It seems like it remuxes the video, if needed. I use it with a batch file in Windows so the Emby media page shows the right original language. For checking the video and setting the media language to English for any .mp4 in a directory or subdirectories, this und2en.bat (undetermined to English) file does the trick. for /R %%f in (*.mp4) do "C:\Program Files\GPAC\MP4Box.exe" -lang 2=en "%%f" echo completed pause You can change the -lang 2=fr for French, de for German etc. and create separate batch files. This batch could reassign hundreds of videos in a library directory and all subdirectories to be set as English with one click, if you wanted to do that. Just put the batch file in the main directory and click. It also checks for other issues and fixes them. I run all mp4's through this and all my h.264 codec media plays back directly with no problem. mp4box_set_language_batch_files.zip Edited December 19, 2024 by visproduction 1
Solution dust42 1 Posted December 20, 2024 Author Solution Posted December 20, 2024 for anyone who stumbles across this thread and is looking for a solution using a linux os with ffmpeg, you can try ffmpeg -y -i x.mkv -c:v libx264 -profile:v baseline -c:a aac -ar 44100 -ac 2 -b:v 384k -movflags +faststart y.mp4 this worked for me 1
visproduction 315 Posted December 20, 2024 Posted December 20, 2024 (edited) Response was suppose to be a different forum post - Sorry - removed. Edited December 20, 2024 by visproduction
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now