Support and General Use > Plugins/Viewers
Wrong duration header when joining .mpg files with cat:
dreamlayers:
Unfortunately, the popularity of an answer online doesn't guarantee its accuracy. These files have timestamps, and cat does nothing about those. It often seems to work properly because many players are very error-tolerant, but the file certainly isn't correct.
jccc:
--- Quote from: dreamlayers on September 06, 2010, 02:44:28 PM ---Unfortunately, the popularity of an answer online doesn't guarantee its accuracy. These files have timestamps, and cat does nothing about those. It often seems to work properly because many players are very error-tolerant, but the file certainly isn't correct.
--- End quote ---
These are very strange responses. I suppose I'll no longer trust rockbox.org or ffmpeg.org, favoring instead more authoritative sources re: encoding video for small mp3 players.
Llorean:
If you encode with many of the suggested settings here it'll be just fine. Using a tool like "cat" to merge files is very different from encoding.
If you start from a good source you're fine, but trying to use already compressed and possibly split files can often lead to additional difficulties. MPEG is streamable which is more or less why you can cat files together and expect many players (especially those that will accept streamed content) to be able to play it, not necessarily with functional seeking.
If Rockbox can't play the cat'ed file completely through that *may* be a bug, but you shouldn't really expect seeking to work if you've used a tool completely unaware of the format such as cat to merge the files. Instead you'll want something more intelligent to fix the containers.
jccc:
--- Quote from: Llorean on September 06, 2010, 02:17:06 PM ---Instead of using sameq, have you tried using the "copy" codec, to just copy the stream into a new mpeg file? I'm pretty sure sameq decodes and re-encodes which not only takes longer, but as you've noted results in a file size increase.
--- End quote ---
Aha. This looks like the right answer (and I was not aware of the "copy" codec option).
Unfortunately this also looks like it may be an active bug in ffmpeg:
https://roundup.ffmpeg.org/issue807
Using "-acodec copy" works, but gives me the same fattened file. Using "-vcodec copy" (with or without the former) gives me the error mentioned in that bug report: "av_interleaved_write_frame(): Error while opening file"
*sigh*
Onward...
Llorean:
You could try mencoder which I believe also has a copy codec.
This is all a container issue, so anything which can copy the streams and rebuild the container should be good. VLC might also be an option.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version