ffmpeg generated video that VLC cannot play?

Useful and helpful Windows specific command line samples and examples.
Post Reply
virtualpaul
Posts: 4
Joined: Tue Jun 05, 2018 11:03 am

ffmpeg generated video that VLC cannot play?

Post by virtualpaul » Tue Jun 05, 2018 11:16 am

I have two problems.

I am converting OTA recordings (.ts) to a format that is smaller and more compatible with the PS4 Plex client (.mp4). It works most of the time but sometimes I get a video that VLC does not seem to be able to play.

1- I am wondering if there is a problem with my command line?
ffmpeg.exe -i video.ts -i video.meta -map_metadata 1 -vcodec libx264 -profile:v high -level:v 4.1 -crf 18 video.mp4


2- I had a previous problem when using the following. VLC would not play the audio (even though the original .ts file played fine), complaining that "AC-3" codec was not supported:
ffmpeg.exe -i video.ts -i video.meta -map_metadata 1 -codec copy video.mp4
You can see more information here about this second problem:
https://forum.videolan.org/viewtopic.ph ... 67#p472867

therube
Posts: 25
Joined: Thu Nov 02, 2017 7:41 pm

Re: ffmpeg generated video that VLC cannot play?

Post by therube » Wed Jun 06, 2018 1:45 am

As a start I would skip the converting part & simply transcode the .ts to .mp4.

> ffmpeg.exe -i video.ts -c copy out.mp4

and see what that does?


You're not specifically setting any parameters for the audio part. Is that your intention?
Your sample doesn't seem to be (over) there any longer?
You could always cut a short segment of your video & upload it.
> ffmpeg -i video.ts -c copy -t 0:03:00 out3min.ts
What version of VLC?
Will other players (mplayer, mpc-hc, mpv) successfully play the (converted) clip?

virtualpaul
Posts: 4
Joined: Tue Jun 05, 2018 11:03 am

Re: ffmpeg generated video that VLC cannot play?

Post by virtualpaul » Thu Jun 07, 2018 9:10 pm

Thanks for your reply.

Like I mentioned. A lot of the transcoding works so I am guessing I am not too far. Perhaps one of the parameter is not compatible with another one in certain cases?

For audio, I was originally just using "-codec copy" but it did not seem to work in VLC so I removed that option.

I have uploaded another sample with a similar problem (VLC not able to play audio) here:
http://www.filedropper.com/nightgallery ... adeaddruid

version of VLC is : 3.0.1
windows media player works fine with audio playing correctly.

Then I wanted to reduce the size from .ts (mp2?) to .mp4 but keep as much quality as I could. And after some trial and errors, I learned about codec limitations with Plex on PS4 so that is why I am using those settings. But I am not sure if they make sense for ffmpeg.

I tried to cut a 3 min sample like you suggested but got an error:
[... @ ] moov atom not found video.mp4: invalid data found when processing input

I'll try with another sample when I get this problem again. Note that I am having quite many different problems with those options. Yesterday I got a movie that converted properly but it stopped at 1:18 instead of the whole movie 2:00. Both movies play fine but the converted .mp4 is truncated to 1:18. Got more than one like this and there is plenty of room left on the drive.

Another thing. I am wondering what is the most time consuming option(s) for transcoding. It takes several hours to convert a video and would like to optimize this if possible.

virtualpaul
Posts: 4
Joined: Tue Jun 05, 2018 11:03 am

Re: ffmpeg generated video that VLC cannot play?

Post by virtualpaul » Tue Jun 12, 2018 11:32 am

therube wrote:
Wed Jun 06, 2018 1:45 am
As a start I would skip the converting part & simply transcode the .ts to .mp4.

> ffmpeg.exe -i video.ts -c copy out.mp4

and see what that does?


You're not specifically setting any parameters for the audio part. Is that your intention?
Your sample doesn't seem to be (over) there any longer?
You could always cut a short segment of your video & upload it.
> ffmpeg -i video.ts -c copy -t 0:03:00 out3min.ts
What version of VLC?
Will other players (mplayer, mpc-hc, mpv) successfully play the (converted) clip?
Hi,
I uploaded another sample in case you have not noticed.
Thanks.

Post Reply